Content pfp
Content
@
https://opensea.io/collection/dev-21
0 reply
0 recast
2 reactions

doug pfp
doug
@pfeffunit
What's the best approach for flexible geocoding in NYC that can handle descriptive locations like '3rd Ave between 30th and 40th St' and return coordinates for that area? Looking for solutions that can process both specific addresses and approximate area descriptions!
2 replies
0 recast
8 reactions

keccers pfp
keccers
@keccers.eth
I feel like this is something @jc4p might know. lol. Idk. If you don’t Kasra don’t be mad I just feel like you know everything about esoteric data sourcing and handling
1 reply
0 recast
2 reactions

Kasra Rahjerdi pfp
Kasra Rahjerdi
@jc4p
google geocoder sucks at this, yahoo geocoder is slightly better but doesn't get context very well (like you have to tell it it's Manhattan), best is to use a dual layer where you rely on Google geocoder for most things then if it has no results use something like this: https://gist.github.com/jc4p/6c45368fa8dedc5c782d1457f04394d2
2 replies
0 recast
2 reactions

Kasra Rahjerdi pfp
Kasra Rahjerdi
@jc4p
this code for me spits out: Address: 3rd Ave Between 30th and 40th St Latitude: 40.745937, Longitude: -73.977566 Message: The approximate midpoint of 3rd Avenue between 30th and 40th Streets in Manhattan, New York City, is at latitude 40.745937 and longitude -73.977566. The lat/long comes out to 3rd ave and 34th st
2 replies
0 recast
2 reactions

doug pfp
doug
@pfeffunit
alright i ended up with a mix of gemini flash and http://locatenyc.io/ for intersection coords, then geo math for some buffer, and generate geoJSON from it. e.g "3rd ave btw 60th and 70th" will use the LLM to generate JSON like this: { "type": "specific_street_segment", "main_street": "3rd Ave", "start_intersection": "60th St", "end_intersection": "70th St", "borough": "Manhattan" } Then i can get the intersections and geocode them, then generate the JSON (outside of the LLM). Also works for more vague areas, even with typos because LLMs are great: "anything from 14th st to 20th st, btw 1st ave and 3rd ae" => { "type": "region", "avenue_start": "1st Ave", "avenue_end": "3rd Ave", "street_start": "14th St", "street_end": "20th St", "borough": "Manhattan" } Computers! They did it again!
0 reply
0 recast
1 reaction