I'm trying to figure out how to go about returning a set of r开发者_如何学Cecords 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
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.
with this I have solve my similar issue... hope it helps.
精彩评论