spatial-index

Error creating spatial index on MySql BLOB column

Hi, I am trying to add a spatial index to a table column named Location of type BLOB. If I try this: ALTER TABLE route ADD SPATIAL INDEX(Location); I get: Error: BLOB/TEXT column 'Location' used in key specification without a key length But in the official docs for MySql 5.1 (the version I am using), it clearly says when...

Can I create a "Covering, Spatial" index in SQL Server 2008?

I currently have a site with a table that has Lat/Long float columns, and an index over those 2 columns plus another one I need to retrieve. I'm constantly querying this table to get the rows that fall within a radius from a certain point (I'm actually getting a square for speed), but I only need the fields that are already indexed, so ...

Best Performance-Critical Algorithm for Solving Nearest Neighbor

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...

Is there any documented free R-Tree implementation for .NET?

I found some open source R-Tree implementations in C#, but none with documentation nor signs of being used by someone else than the developer. ...

Know of any C# spatial data libraries?

I'm looking at implementing spatial queries in .NET without using SQL2008. The first requirement is to be able to create a (BTree styled) spatial index and be able to query it. Although SQL 2008 ships with .NET libraries for the types, you need to use SQL for the spatial indexes. HAs anybody used any .NET libraries for spatial data (O...

Spatial lucene simple query doesn't work?

Hi, does anyone have any experiences using the lucene's spatial search component (lucene 3.0)? I tried a very simple example but could not get the search to return anything, see below for all the codes import java.io.IOException; import org.apache.lucene.analysis.WhitespaceAnalyzer; import org.apache.lucene.document.Document; import o...

What is an infinite scaleless quadtree called?

2D spatial indexing question: What do you call a data structure that is essentially an infinite* quadtree whose nodes contain neither absolute coordinates nor absolute scales -- in which the coordinate system of each node has been normalized to the unit square (0,0)-(1,1), and in which the top-level node is not fixed absolutely? It's a...

What is a SPATIAL INDEX and when should I use it?

Like most of the average PHP web developers I use MySql as a RDBMS. MySql (as other RDBMS also) offers SPATIAL INDEZ features, but I'm don't get it very well. I goole for it but I don't found clear real world examples to clearify my bad knowledge about it. Could someone explain me a little bit what is a SPATIAL INDEX and when should I u...

Speeding up PostgreSQL query where data is between two dates

I have a large table (> 50m rows) which has some data with an ID and timestamp: id, timestamp, data1, ..., dataN ...with a multi-column index on (id, timestamp). I need to query the table to select all rows with a certain ID where the timestamp is between two dates, which I am currently doing using: SELECT * FROM mytable WHERE id = ...

Spatial Index for Rectangles With Fast Insert

Hello, I'm looking for a data structure that provides indexing for Rectangles. I need the insert algorithm to be as fast as possible since the rectangles will be moving around the screen (think of dragging a rectangle with your mouse to a new position). I've looked into R-Trees, R+Trees, kD-Trees, Quad-Trees and B-Trees but from my un...

Selecting a good SQL Server 2008 spatial index with large polygons

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 t...

How to implement Spatial(Geo-Location) searching in Grails?

Hi, I am working on Grails 1.3.2 with MySql. I need to store the latitude and longitude of certain locations in the database and then on the basis of the user's current location, I need to return the items that are within a particular radius of that location. So, we basically have the following requirements: Search for places with-in ...

How can I speed up this Sql Server Spatial query?

Hi folks, I have (what I think) is a simple Sql Server spatial query: Grab all the USA States that exist inside some 4 sided polygon (ie. the viewport/bounding box of a web page's google/bing map) SELECT CAST(2 AS TINYINT) AS LocationType, a.Name AS FullName, StateId, a.Name, Boundary.STAsText() AS Boundary, CentrePoint.STAsT...

What does SQL Server do for spatial data outside the bounding box of the index?

I read an article that says: The (x-min,y-min) and (x-max,y-max) coordinates determine the placement and dimensions of the bounding box. The space outside of the bounding box is treated as a single cell that is numbered 0. I took this to mean that everything "outside" the index is actually indexed in a special place, so i...

Why are my spatial searches slower in SQL Server than PostGIS?

I'm working on moving some spatial searching capabilities from Postgres with PostGIS to SQL Server and I'm seeing some pretty terrible performance, even with indexes. My data is around a million points, and I want to find out which of those points are within given shapes, so the query looks something like this: DECLARE @Shape GEOMETRY ...

Any spatial index support in the standard PostgreSQL installation?

I'm new to PostgreSQL. For the default install of PostgreSQL (no extension like PostGIS), if there's geographic fields defined in my table, then what kinds of index does PostgreSQL support? I didn't find any information on the spatial index in the manual. ...

Way to improve performance in MySQL on POINT(lat, long)

I have an application that needs to query a table with latitude and longitude coordinates, which are stored using MYSQL's POINT datatype. I have a stored function that finds nearby lats and longs within a given radius of a given GPS location. However, my table will contain hundreds of thousands of entries, so performance needs to be opt...