The service permits to convert an address in its coordinates, and viceversa converts coordinates in a readable address. The service uses Open Street Map datasource to resolve addresses.
At the moment service is accessible to anonymous users.
Result data type
{ "responseHeader": { "status": 0, "QTime": 23, "params": { "indent": "true", "q": "+city:trento +street:einaudi +osm_key:highway +osm_value:bus_stop", "_": "1385137263472", "wt": "json" } }, "response": { "numFound": 2, "start": 0, "docs": [ { "id": 276034, "coordinate": "46.052705,11.128174", "osm_id": 1125127505, "name": "Gramsci / Einaudi", "osm_key": "highway", "osm_value": "bus_stop", "street": "Gramsci / Einaudi", "postcode": "38100", "country": "Italia", "country_de": "Italien", "country_en": "Italy", "country_fr": "Italie", "country_it": "Italia", "city": "Trento", "city_it": "Trento", "places": "Man Malpensada, Clarina, Trento, Trento, Trentino-Alto Adige/Südtirol", "ranking": 0 }, { "id": 180800, "coordinate": "46.052891,11.129685", "osm_id": 546145689, "name": "Verona / Einaudi", "osm_key": "highway", "osm_value": "bus_stop", "street": "Verona / Einaudi", "postcode": "38100", "country": "Italia", "country_de": "Italien", "country_en": "Italy", "country_fr": "Italie", "country_it": "Italia", "city": "Trento", "city_it": "Trento", "places": "Cernidor, Clarina, Trento, Trento, Trentino-Alto Adige/Südtirol", "ranking": 0 } ] } }
The result fields aren't mandatory, so empty values are omitted from the result.
Field meaning:
Resources to have more details about osm_key and osm_value:
Returns all element matching address in input
territoryservice.data.read
GET /core.geocoder/spring/address?address= Host: dev.smartcommunitylab.it Accept: application/json
Response is ordered: first elements of type street, bus stop and then other element types.
In Data types paragraph an example of response.
Returns all element within given distance from a input point
territoryservice.data.read
GET /core.geocoder/spring/location?latlng= Host: dev.smartcommunitylab.it Accept: application/json
See Data types paragraph for a result example
Below some example of SOLR REST API invocation. The parameters are inherited by Apache Solr search platform.
https://geo.smartcommunitylab.it/core.geocoder/collection1/select?q=*%3A*&fq=%7B!geofilt%7D&sort=geodist()+asc&wt=json&indent=true&spatial=true&pt=46.05125%2C11.12361&sfield=coordinate&d=0.1&omitHeader=true
https://geo.smartcommunitylab.it/core.geocoder/collection1/select?q=street%3Aeinaudi&fq=%7B!geofilt%7D&sort=geodist()+asc&wt=json&indent=true&spatial=true&pt=46.05125%2C11.12361&sfield=coordinate&d=1&omitHeader=true
https://geo.smartcommunitylab.it/core.geocoder/collection1/select?q=%2Bcity%3Atrento+%2Bstreet%3Aeinaudi+%2Bosm_key%3Ahighway&wt=json&indent=true
https://geo.smartcommunitylab.it/core.geocoder/collection1/select?q=%2Bcity%3Atrento+%2Bstreet%3Aeinaudi+%2Bosm_key%3Ahighway+%2Bosm_value%3Abus_stop&wt=json&indent=true
For more details about query syntax visit these resources:
Response example is described in Data types paragraph
The geocoding engine consists of an opportunely wrapped instance of Photon.
The geocoder software is released under Apache License 2.0.
The geocoder data are derived from the Photon DB. Their usage respects the terms of the original ODbL license.