NYC Addresses returns incorrect city, post codes, latlng
See original GitHub issueAddress queries within New York City return incorrect locations. For example, the address 860 Broadway returns multiple results with different city values, post codes, and latlng. This is inconsistent with the absolute correct address
"query": "860 Broadway, Manhattan Community Board 3, New York, United States of America",
"suggestion": {
"name": "860 Broadway",
"administrative": "New York",
"county": "New York County",
"city": "Manhattan Community Board 4",
"country": "United States of America",
"countryCode": "us",
"type": "address",
"latlng": {
"lat": 40.7697,
"lng": -73.982
},
"postcode": "10022",
"highlight": {
"name": "<em>860 Broadway</em>",
"city": "<em>Manhattan Community Board</em> 4",
"administrative": "<em>New York City (New York</em>)",
"country": "<em>United States of America</em>",
"county": "<em>Manhattan (New York</em> County)"
},
"value": "860 Broadway, Manhattan Community Board 4, New York, United States of America"
}
}```
```{
"query": "860 Broadway, Manhattan Community Board 1, New York, United States of America",
"suggestion": {
"name": "860 Broadway",
"administrative": "New York",
"county": "New York County",
"city": "Manhattan Community Board 1",
"country": "United States of America",
"countryCode": "us",
"type": "address",
"latlng": {
"lat": 40.7059,
"lng": -74.0134
},
"postcode": "10003",
"highlight": {
"name": "<em>860 Broadway</em>",
"city": "<em>Manhattan Community Board 1</em>",
"administrative": "<em>New York City (New York</em>)",
"country": "<em>United States of America</em>",
"county": "<em>Manhattan (New York</em> County)"
},
"value": "860 Broadway, Manhattan Community Board 1, New York, United States of America"
}
}```
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Reverse geocoding (address lookup) request and response
The reverse geocoder matches political entities (countries, provinces, cities and neighborhoods), street addresses, and postal codes. The full list of ...
Read more >Geocode addresses — geo • tidygeocoder - Jesse Cambon
If FALSE (default) then only latitude and longitude columns are returned from the geocoding service. mode. set to 'batch' to force batch geocoding...
Read more >Obtaining up-to-date list of US ZIP Codes with Latitude and ...
The Census Bureau creates ZIP Code Tabulation Areas (ZCTA) based on their address database. If it's appropriate to your work you could try ......
Read more >R convert zipcode or lat/long to county - Stack Overflow
This can take flexible input, such as the address or lat/lon, and returns Address, city, county, state, country, postal code, etc, as a...
Read more >US Zip Codes Database - Simplemaps.com
Free and commercial databases of US zip codes and their associated city, state, latitude, longitude, demographics and more. CSV, Excel, SQL format.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The data is actually pulled from OSM, and then processed using Nominatim, and the issue comes from there:
Nominatim defines two ways of being a city: either having the
place:city
tag being set explicitly, or having a rank of16
in the administrative rank. You don’t really have to know what this all means. Only that there are two ways to define cities in Nominatim.Because of that definition, features in Manhattan actually belong to two cities: New York City (place:city tag), and Manhattan Community Board X (rank 16). You can see this on
broadway
as processed by Nominatim: https://nominatim.openstreetmap.org/details.php?place_id=187073832We can’t ignore rank 16 cities because this is actually used a lot, and is actually the official defining criterion for a city (link).
We’ll try to find a way to circumvent this edge case, but I don’t have any ETA or roadmap to share on that front.
Thanks for reopening the issue on a separate ticket 😉 Will take a look at it