[−][src]Module geocoding::geoadmin
The GeoAdmin (https://api3.geo.admin.ch) provider for geocoding in Switzerland exclusively.
Based on the [Search API] (https://api3.geo.admin.ch/services/sdiservices.html#search) and [Identify Features API] (https://api3.geo.admin.ch/services/sdiservices.html#identify-features)
It uses the local swiss coordinate reference system [CH1903+ / LV95] (https://www.swisstopo.admin.ch/en/knowledge-facts/surveying-geodesy/reference-frames/local/lv95.html) (EPSG:2056) for input and output coordinates. Be aware of the switched axis names!
Example
use geocoding::{GeoAdmin, Forward, Point}; let geoadmin = GeoAdmin::new(); let address = "Seftigenstrasse 264, 3084 Wabern"; let res = geoadmin.forward(&address); assert_eq!(res.unwrap(), vec![Point::new(2_600_968.75, 1_197_427.0)]);
Structs
ForwardLocationAttributes | Geocoding result attributes |
GeoAdmin | An instance of the GeoAdmin geocoding service |
GeoAdminForwardLocation | A geocoding result |
GeoAdminForwardResponse | The top-level full JSON response returned by a forward-geocoding request |
GeoAdminParams | An instance of a parameter builder for GeoAdmin geocoding |
GeoAdminReverseLocation | A geocoding result |
GeoAdminReverseResponse | The top-level full JSON response returned by a reverse-geocoding request |
ReverseLocationAttributes | Geocoding result attributes |