Aslak Raanes
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [Geolocation] Only country from some reverse adressesLooking at https://wiki.openstreetmap.org/wiki/Key:place the list might contain
- city_block
- neighbourhood
- quarter
- suburb
- borough
- city
- allotments
- farm
- isolated_dwelling
- hamlet
- village
- town
(
allotments
andfarm
might not be that useful)- municipality
- subdistrictcounty
- district
- province
- region
- state
- country
In some cases there is also the
name
that might be useful. E.g.:$ curl -s "https://nominatim.openstreetmap.org/reverse?format=json&lat=48.85830&lon=2.29487&zoom=18" | jq
{
"place_id": 115316935,
"licence": "Data ? OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
"osm_type": "way",
"osm_id": 5013364,
"lat": "48.8582599",
"lon": "2.2945006358633115",
"class": "tourism",
"type": "attraction",
"place_rank": 30,
"importance": 0.5868325701744196,
"addresstype": "tourism",
"name": "Tour Eiffel",
"display_name": "Tour Eiffel, 5, Avenue Anatole France, Quartier du Gros-Caillou, Paris 7e Arrondissement, Paris, ?le-de-France, France métropolitaine, 75007, France",
"address": {
"tourism": "Tour Eiffel",
"house_number": "5",
"road": "Avenue Anatole France",
"city_block": "Quartier du Gros-Caillou",
"suburb": "Paris 7e Arrondissement",
"city_district": "Paris",
"city": "Paris",
"ISO3166-2-lvl6": "FR-75C",
"state": "?le-de-France",
"ISO3166-2-lvl4": "FR-IDF",
"region": "France métropolitaine",
"postcode": "75007",
"country": "France",
"country_code": "fr"
},
"boundingbox": [
"48.8574753",
"48.8590453",
"2.2933119",
"2.2956897"
]
}Forum: Plugins
In reply to: [Geolocation] Only country from some reverse adressesI now see that this is more a result of wheter this is a city, village, town etc.
% curl -s "https://nominatim.openstreetmap.org/reverse?format=json&accept-language=en&lat=52.475697&lon=13.36397" | jq .address
{
"amenity": "S-Bhf. Südkreuz / Hildegard-Knef-Platz",
"road": "Hildegard-Knef-Platz",
"suburb": "Sch?neberg",
"borough": "Tempelhof-Sch?neberg",
"city": "Berlin",
"ISO3166-2-lvl4": "DE-BE",
"postcode": "10829",
"country": "Germany",
"country_code": "de"
}
% curl -s "https://nominatim.openstreetmap.org/reverse?format=json&accept-language=en&lat=52.475697&lon=13.36397" | jq .display_name
"S-Bhf. Südkreuz / Hildegard-Knef-Platz, Hildegard-Knef-Platz, Sch?neberg, Tempelhof-Sch?neberg, Berlin, 10829, Germany"while
% curl -s "https://nominatim.openstreetmap.org/reverse?format=json&accept-language=en&lat=62.576187&lon=11.388272" | jq .address
{
"house_number": "25",
"road": "Bergmannsgata",
"quarter": "Sm?hagan",
"farm": "?sen",
"town": "R?ros",
"municipality": "R?ros",
"county": "Tr?ndelag",
"ISO3166-2-lvl4": "NO-50",
"postcode": "7374",
"country": "Norway",
"country_code": "no"
}
% curl -s "https://nominatim.openstreetmap.org/reverse?format=json&accept-language=en&lat=62.576187&lon=11.388272" | jq .display_name
"25, Bergmannsgata, Sm?hagan, ?sen, R?ros, Tr?ndelag, 7374, Norway"
Viewing 2 replies - 1 through 2 (of 2 total)