开发者

Finding row with coordinates inside a defined polygon in MySQL

开发者 https://www.devze.com 2023-03-05 02:17 出处:网络
I\'m trying to figure out how to go about returning a set of r开发者_如何学Cecords which have coordinates within a polygon.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号