Hello,--
In a project for the Swiss government, for which we do the maintenance and support, we are
currently using the REST API 2.5 from api.geo.admin.ch. As we were informed by the customer
this API will shortly be deprecated.
During the analysis of the new version 3.0 we figured out, that some of the features we
were using, are not explicitly available in the API 3.0. Therefore we maybe need a little
help/input from your side.
We are using the geo.admin.ch API to:
- Search Towns (Orte, Gemeinden)
- Search Streets (Strassen)
With the API 2.5 we used the following services:
Search for towns (Orte)
Sample request Towns: https://api.geo.admin.ch/swisssearch/geocoding?query=Bern&no_geom=true&format=raw
The result is then filtered, to have a clean result list: origin not-in ['address', 'district', 'kantone'] && objectorig <> 'sn25'
Return value: name or gemname (gemname, kanton)
Streets (Strassen):
Sample request: https://api.geo.admin.ch/swisssearch/geocoding?query=Eigerpl&no_geom=true&format=raw&services=address
Return value: strname1 deinr (ort_27)
Now the major issue is, that the parameter format=raw (returns all the available properties of the selected feature(s)) which
was available in API 2.5 does no longer exist in API 3.0.
One option would be to use the “feature_id” found in “attrs” to get detailed information about a feature but
this would lead into a 1 to n problem which which will most likely cause performance troubles, as we have in
general pretty long result lists.
What would you propose? Is there maybe an other elegant way to get towns and streets separately?
Thanks in advance for your support
Marc Schmid
You received this message because you are subscribed to the Google Groups "GeoAdmin API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoadmin-api...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello,
Thanks for your mail.
We will add the feature id in the location search. You can expect to have this until the end of the month.
Best regards,
Cédric
De : geoadm...@googlegroups.com [mailto:geoadm...@googlegroups.com] De la part de msc...@puzzle.ch
Envoyé : lundi 12 mai 2014 12:36
À : geoadm...@googlegroups.com
Cc : g...@space.ch
Objet : Re: Migrating https://api.geo.admin.ch/swisssearch/geocoding to https://api3.geo.admin.ch/rest/services/api/SearchServer
--
Yes, you can expect to have feature_id. In addition, a layer parameter will reference the corresponding layer.
Best regards,
Cédric
De : geoadm...@googlegroups.com [mailto:geoadm...@googlegroups.com] De la part de msc...@puzzle.ch
Envoyé : mardi 13 mai 2014 12:14