No project description provided
Project description
Python interface for the official swisstopo’s REFRAME jar library
About REFRAME
Info about DLL / Source: https://shop.swisstopo.admin.ch/de/products/geo_software/DLL_info
GeoSuite calculation module for planimetric and/or height transformation for application in the Swiss national survey and the cadastral survey. The REFRAME library allows all transformations of coordinates and heights, which are relevant in Switzerland and available in the REFRAME for GeoSuite software, except UTM projection:
GPSREF (ETRF93 <-> LV95)
FINELTRA (LV95 <-> LV03)
CHGEO2004 (geoid model)
HTRANS (LHN95 <-> LN02)
The REFRAME library may be distributed to third parties and integrated into commercial products, but it must be delivered to the customer free of charge.
ReframeLibrary/Documentation/developper_manual.pdf contains all technical information about REFRAME library.
ReframeLibrary/Documentation/refsys_d.pdf contains information and formulas about transformations and projection
Installation
Just install the package:
pip install swissreframe
Requirements
Java x64/x86 (swissREFRAME starts a JVM to execute REFRAME jar library, tested with 8.0_231)
Python 3 (tested with 3.7.5)
JPype1 (tested with 0.7.0)
Example / Usage
from swissreframe import Coordinate, initialize_reframe
r = initialize_reframe()
This should work. But you can also specify path to reframeLib.jar:
r = initialize_reframe(path_reframeLib_jar = r'D:\jar\reframeLib.jar')
and also path to jvm.dll:
r = initialize_reframe(path_jvm_dll = r'C:\Program Files\Java\jre1.8.0_231\bin\server\jvm.dll')
Now you can use the methods REFRAME.compute_reframe and REFRAME.compute_gpsref
result1 = r.compute_reframe((600000.1, 200000.1, 200), 'lv03_military', 'lv95', 'ln02', 'lhn95')
print(result1)
result2 = r.compute_gpsref((2600000.1, 1200000.1, 200), 'lv95_to_etrf93_geographic')
print(result2)
Output:
(2600000.182999904, 1200000.1660008044, 199.92481259693554)
(7.438633764230579, 46.95108371391055, 249.62218793481588)
Or you can use class Coordinate and its methods:
coord = Coordinate(type='plane', planimetric_frame='lv03_military', altimetric_frame='ln02',
coordinates=(600000.1, 200000.1, 200.1))
print(coord.ETRF95_geocentric)
Output:
(4325124.392962725, 564701.4910050733, 4638236.373010437)
Documentation
Coming soon
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file swissREFRAME-1.1.2.tar.gz
.
File metadata
- Download URL: swissREFRAME-1.1.2.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdc62d5b1833bd47b16cc9a29c1abd77674eab94930c3d15a6ca8cf4b67d48eb |
|
MD5 | ee4c0bdd117a2fe8d15cad5a49fa6579 |
|
BLAKE2b-256 | d0177b4b32ebc7f02d8a960ab037ebfee7ed55f318241d0eea0d31e81dbdee02 |