spatial-query

How do you use MySQL spatial queries to find all records in X radius? [closed]

半城伤御伤魂 提交于 2019-11-30 15:50:40
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I have a table in a MySQL database with a spatial geometry column of type POINT. I'd like to be able to take a point at the center of a map and find all records within X miles (or whatever distance) of it. I can

How do you use MySQL spatial queries to find all records in X radius? [closed]

老子叫甜甜 提交于 2019-11-30 15:21:26
I have a table in a MySQL database with a spatial geometry column of type POINT. I'd like to be able to take a point at the center of a map and find all records within X miles (or whatever distance) of it. I can't seem to find a good example or explanation of how to do this that doesn't get heavily into geometric math. I'm happy to go that route, but would first like to try and solve it with a true spatial database. It won't work because MySQL hasn't actually implemented the code to make this work. They only use bounding box queries. Notice there are no functions listed here: http://dev.mysql

Best Performance-Critical Algorithm for Solving Nearest Neighbor

烂漫一生 提交于 2019-11-30 12:21:18
问题 We have a list of x,y pairs. Every pair represents a point on a 2D space. I want to find the closest point from this list, to a specific point xq,yq. What is the best performance-critical algorithm for this problem? Lisp of points is not going to change; which means I do not need to perform insertion and deletion. I want just to find the nearest neighbor of a target xq,yq point in this set. Edit 1: Thanks to all! As Stephan202 has guessed correctly, I want to do this repeatedly; like a

Best Performance-Critical Algorithm for Solving Nearest Neighbor

雨燕双飞 提交于 2019-11-30 02:29:37
We have a list of x,y pairs. Every pair represents a point on a 2D space. I want to find the closest point from this list, to a specific point xq,yq. What is the best performance-critical algorithm for this problem? Lisp of points is not going to change; which means I do not need to perform insertion and deletion. I want just to find the nearest neighbor of a target xq,yq point in this set. Edit 1: Thanks to all! As Stephan202 has guessed correctly, I want to do this repeatedly; like a function. An the list is not necessarily sorted (In fact I do not understand how can it be sorted? Like a

Selecting a good SQL Server 2008 spatial index with large polygons

走远了吗. 提交于 2019-11-30 00:38:18
I'm having some fun trying to pick a decent SQL Server 2008 spatial index setup for a data set I am dealing with. The dataset is polygons, representing contours over the whole globe. There are 106,000 rows in the table, the polygons are stored in a geometry field. The issue I have is that many of the polygons cover a large portion of the globe. This seems to make it very hard to get a spatial index that will eliminate many rows in the primary filter. For example, look at the following query: SELECT "ID","CODE","geom".STAsBinary() as "geom" FROM "dbo"."ContA" WHERE "geom".Filter( geometry:

Maximo/GIS spatial query

大憨熊 提交于 2019-11-28 07:12:01
问题 I have a work order (WO) in Maximo: The WO has Latitude(Y) and Longitude(X) coordinates in the Service Address tab. The WO has a custom zone field. And there is a spatial table (polygon layer) in a separate GIS database. I want to do spatial query to return an attribute from the polygon record that it intersects and use it to populate zone in the WO. How can I do this? (Maximo 7.6.1.1 including Maximo Spatial) 回答1: To do this live in Maximo using an automation script is possible or by writing