Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Aslak Raanes

    (@aslakr)

    I 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"

    https://github.com/ymichel/Geolocation-Plugin/blob/d031ed553610f5b8b416c5a0b22241224e17a0fa/geolocation.map-provider-osm.php#L144

    Plugin Author Yann

    (@ymichel)

    The addresses are currently combined out of the attributes city, suburb and country only.
    If I see your second request, it might make sense to also have town, municipality and country as alternative. Did you discover also more possible outcomes?

    Plugin Author Yann

    (@ymichel)

    BTW: I already provided the option from above in 1.9.6

    Thread Starter Aslak Raanes

    (@aslakr)

    Looking 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 and farm 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"
    ]
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.