Wednesday, 13 November 2019

postgis - Point in polygon algorithm for multiple polygons


I've a Google map with bunch of polygons on it.


Here is a problem I'm interested in: Given a lat,lng point, what's the best way to determine all the polygons that this point lies in?


The obvious way is to run a "point in polygon" algorithm iteratively for each polygon, but I was wondering if there an efficient algorithm to answer such queries especially if you have thousands of polygons.





No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...