I'm making requests to reverse nominatin service to get address. In the response in JSON format I get an object like that:
Where can I find the complete list of every possible fields of "address" object? In this example there are: furniture, house_number, road, suburb, city_district, city, county, state, postcode, country and country_code. asked 17 Jan '18, 14:30 gsv91 |
You can use this as guide for the most common fields https://github.com/OpenCageData/address-formatting/blob/master/conf/components.yaml There are hundreds of others, in this case 'furniture'. But also 'restaurant' or 'bank'. Those you can usually treat as the name of a place (or ignore). answered 17 Jan '18, 15:15 mtmail Wouldn't it be better to look in the Nominatim code instead ? Isn't OpenCage another geocoder, which might show different fields ?
(17 Jan '18, 15:21)
escada
3
The address-formatting library works for multiple geocoders, including Nominatim. Usually the question for all fields comes up when a user wants to create formatted address strings. But you're right, I was making assumptions. The relevant Nominatim code is https://github.com/openstreetmap/Nominatim/blob/6c1977b448e8b195bf96b6144674ffe0527e79de/lib/lib.php#L63
(17 Jan '18, 15:30)
mtmail
|