Reputation: 1310
I'm trying to figure out how to go about returning a set of records which have coordinates within a polygon.
I have looked at the MySQL spacial extensions but they don't currently support searching within a specified polygon, only within the minimal bounding rectangle of the polygon.
I was wondering if anyone has come across this problem before and knew of any solutions?
Thanks
Upvotes: 1
Views: 793
Reputation: 4753
There probably isn't (and won't be) built-in support for that, because determining if a point is within a generic polygon is a rather complex problem.
Perhaps you should get the "candidate" points that fit into the bounding rectangle, then find the ones in the actual polygon by running them through one of those PIP algorithms.
Upvotes: 1