Point in Polygon with geoJSON in Python
问题 I have a geoJSON database with lots of polygons (census tracts specifically) and I have lots of long,lat points. I am hoping that there would exist an efficient Python code to identify which census tract a given coordinate is in, however so far my googling hasn't revealed anything. Thanks! 回答1: I found an interesting article describing how to do exactly what you are looking to do. TL;DR: Use Shapely You will find this code at the end of the article: import json from shapely.geometry import