Closed mtmail closed 3 months ago
Place nodes with admin_level
again. They tend to be set for capitals and then refer to admin level of the administration they are the capital for. The geocodejson formatter should ignore everything that isn't a boundary=administrative
.
https://nominatim.openstreetmap.org/reverse?accept-language=en&addressdetails=1&format=geocodejson&lat=41.00488&lon=28.98016
returns level4 twice
It's not obvious because tools like JSON browser plugin, jq or some parsers ignore the second occurance silently. In fact duplicate keys seem to be allowed https://stackoverflow.com/questions/21832701/does-json-syntax-allow-duplicate-keys-in-an-object . The parser I'm using fails when it encounters a duplicate key.
I'll provide a PR for the output formatting but I wonder if the issue is deeper or if it's possible the values for the same level could also be different.