I used this endpoint:
https://api3.geo.admin.ch/rest/services/api/SearchServer?searchText=Veia%20da%20Lai%2015%207440%20Andeer&origins=address,zipcode&type=locations
to get the latitude and longitude information.
Response:
{ "results": [ { "attrs": { "detail": "veia da lai 15 7440 andeer 3701 andeer ch gr", "featureId": "190177223_0", "geom_quadindex": "030332001220331220113", "geom_st_box2d": "BOX(752083.7385821516 163395.43022642954,752083.7385821516 163395.43022642954)", "label": "Veia da Lai 15 <b>7440 Andeer</b>", "lat": 46.60449981689453, "lon": 9.42383861541748, "num": 15, "objectclass": "", "origin": "address", "rank": 7, "x": 163395.4375, "y": 752083.75, "zoomlevel": 10 }, "id": 1402518, "weight": 100 } ] }Point 2:
Using the latitude and longitude above, I made another request to the endpoint:
https://api3.geo.admin.ch/rest/services/ech/MapServer/identify?layers=all:ch.kantone.cadastralwebmap-farbe&sr=4326&geometry=9.42385,46.60447&geometryFormat=geojson&geometryType=esriGeometryPoint&limit=2&tolerance=0&returnGeometry=true&lang=en
Response:
{ "results": [ { "type": "Feature", "featureId": 377807, "bbox": [ 9.423647, 46.604311, 9.424065, 46.604556 ], "layerBodId": "ch.kantone.cadastralwebmap-farbe", "layerName": "CadastralWebMap", "id": 377807, "geometry": { "type": "Polygon", "coordinates": [ [ [9.423649, 46.604368], [9.423657, 46.604397], [9.423702, 46.604562], [9.424063, 46.604499], [9.424004, 46.604304], [9.423649, 46.604368] ] ] }, "properties": { "ak": "GR", "number": "666", "identnd": "GR0000003701", "egris_egrid": "CH415672077747", "realestate_type": null, "geoportal_url": "geogr.mapplus.ch/viewer/geogr/?lang=de&basemap=av&blop=1&x=2762500&y=1170000&zl=1&hl=0&layers=bodenbedeckung|gwr_address|lokalisationsplan|coord_grid|coord_grid_white|av_wms_bw|av_wms_yellow|rutschgebiete|av_fpnr|geb_nummer_nichtoffizell|bb_proj|ls_proj|gde_grenzen|av_stand&op=0.5|1|1|1|1|1|1|1|1|1|1|1|1|0.5", "label": "GR" } } ] }I want to know how to get the altitude for this location from the GeoAdmin.ch API. I know about the altitude service here:
https://api3.geo.admin.ch/services/sdiservices.html, but I got stuck when trying to use it.
To use the altitude service, it requires the easting and northing coordinates in LV03 (EPSG:21781) or LV95 (EPSG:2056).
Can anyone provide a clear explanation on how to get the altitude using the GeoAdmin.ch API?
--
You received this message because you are subscribed to the Google Groups "GeoAdminCh API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoadmin-api...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/geoadmin-api/52cf4ded-933f-42a2-acea-01734ee0b936n%40googlegroups.com.