Crates.io | lv03 |
lib.rs | lv03 |
version | 0.1.1 |
source | src |
created_at | 2020-09-25 09:44:23.590359 |
updated_at | 2021-10-24 20:57:30.800732 |
description | Conversion between the Swiss coordinate system (LV03/CH1903 or LV95/CH1903+) and WGS84 coordinates |
homepage | https://github.com/niederb/lv03 |
repository | https://github.com/niederb/lv03 |
max_upload_size | |
id | 292791 |
size | 38,848 |
This crate provides methods to convert Wgs84 coordinates into the Swiss coordinate formats LV03 (Landesvermessung 1903 or CH1903) and LV95 (Landesvermessung 1995 or CH1903+).
See Wikipedia for more information:
https://en.wikipedia.org/wiki/Swiss_coordinate_system
Based on the formulas described in the document "Näherungsformeln für die Transformation zwischen Schweizer Projektionskoordinaten und WGS84" by the "Bundesamt für Landestopografie swisstopo". The formulas are only an estimation. Accuracy should be within 1 meter or 0.1'' respectively.
See this document for implementation details:
https://www.swisstopo.admin.ch/de/swisstopo/dokumente.detail.document.html/swisstopo-internet/de/documents/geo-documents/ch1903wgs84_d.pdf.html
// Federal building
let lv03 = Lv03::new(199_498.43, 600_421.43, 542.8).unwrap();
let wgs84 = lv03.to_wgs84();
// Matterhorn peak
let wgs = Wgs84 {
longitude: 7.65861,
latitude: 45.97642,
altitude: 4532.9,
};
let lv03 = wgs.to_lv03().unwrap();
For manual conversions Swisstopo provides an online tool:
https://www.swisstopo.admin.ch/de/karten-daten-online/calculation-services/navref.html