jmapb / nycaabs

NYC Address and BIN Search
MIT License
7 stars 2 forks source link

[wishlist] Reverse geocoding #2

Open grischard opened 2 years ago

grischard commented 2 years ago

For a given lat/lon, find out the BIN.

The current workaround is to find an address on that block, and browse that block.

grischard commented 1 year ago

https://data.cityofnewyork.us/Housing-Development/Building-Footprints/nqwf-w8eh shows BINs and links to open data for buildings. From there, we find out we can reverse geocode a BIN like https://data.cityofnewyork.us/api/geospatial/7w4b-tj9d?lat=40.73438696737975&lng=-73.9594219014033&zoom=17 , documented at https://dev.socrata.com/foundry/data.cityofnewyork.us/7w4b-tj9d

https://www.nyc.gov/site/planning/data-maps/open-data/dwn-pluto-mappluto.page has the open data we'd need for BBLs. A BBL can be reverse geocoded from https://planninglabs.carto.com/api/v2/sql?q=SELECT%20bbl%20FROM%20dcp_mappluto%20where%20ST_intersects(ST_MakePoint(-73.958434%2C40.740195)%3A%3Ageography%2C%20the_geom)%20LIMIT%2010%3B&format=json . Other available formats include geojson and csv - try https://planninglabs.carto.com/api/v2/sql?q=SELECT%20*%20FROM%20dcp_mappluto%20where%20ST_intersects(ST_MakePoint(-73.958434%2C40.740195)%3A%3Ageography%2C%20the_geom)%20LIMIT%2010%3B&format=geojson