MySQL查找Point最近的多边形 [英] MySQL Find Polygon Nearest to Point

查看:115
本文介绍了MySQL查找Point最近的多边形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含地理标签对象的MySQL数据库。通过使用用户绘制的边界多边形标记对象,并将我的程序导出到数据库中。边界多边形作为Polygon存储在数据库中(MySQL空间扩展类)。

我可以想到一些方法可以做到这一点,但我不是对他们中的任何人都非常满意,因为这需要是一个能够经常执行的有效过程,尽管可能只有<在相关表格中有50,000条记录。



我需要一种方法,在地球上的任何点找到与最接近的地理标记/有界对象相对应的记录。在所有情况下,它都不需要是正确的,但是,我们假设(只是发明一个数字),95%的时间。手动更正是可以接受的,如果它不需要经常进行的话。


多边形靠近拉特,在MySQL



我将编写一些应用程序级代码,以在链接问题中对距离进行interative-widening搜索。


I have a MySQL database that contains geo-tagged objects. The objects are tagged by using a bounding polygon that the user draws and my program exports into the database. The bounding polygon is stored in the database as a Polygon (the MySQL spatial extensions kind).

I can think of a couple ways to do this, but I'm not very pleased with any of them, as this needs to be an efficient process that will execute fairly often, although on probably only < 50,000 records in the pertinent table.

I need a way to, given any point on the earth, find the record that corresponds to the closest geo-tagged/bounded object. It doesn't need to be correct in all cases but, let's say (just to invent a number), 95% of the time. Manual correction is acceptable if it doesn't need to be done very frequently.

解决方案

It appears as though this question is very similar Get polygons close to a lat,long in MySQL.

I am going to write some application-level code to do an interatively-widening search on the distance in the linked question.

这篇关于MySQL查找Point最近的多边形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆