Spatial indexing

I want to create a large database of GPS coordinates that can be requested by saying "Return all coordinates within" n "meters [of this coordinate]."

I would like to know how to implement Quadtree indexing in Sqlserver2008?

I want to write a .net module that calls a query that uses a square tree so that I can quickly restore objects.

How can I implement the above functions?

Thanks in advance

+6
sql-server quadtree geospatial
source share
2 answers
CREATE TABLE mytable (id INT NOT NULL, mypoint GEOGRAPHY NOT NULL, ...) CREATE SPATIAL INDEX SX_mytable_mypoint ON mytable (mypoint) SELECT * FROM mytable WHERE mypoint.STDistance(geography::STGeomFromText(N'POINT (latitude longitude)', 4326) <= @N 
+5
source share

I know that your article specifically refers to the implementation of QuadTree in SqlServer2008, but as an option you can use one implemented in managed code.

Let's go to my article: http://www.codeproject.com/KB/recipes/QuadTree.aspx

+1
source share

All Articles