Re:Ask HN: Storing spatial data in SQL
by Azuldolphin on Wednesday November 17, 2010 @11:24PM
(#1916862)
I'm hoping to use PostgreSQL (because I'm using Heroku;) ), but I read up on how MS Sql Server implements spatial indexes. Basically, it recursively divides the coordinate system into quadrants. Then, when looking for a range of coordinates, it can figure out which quadrants are covered by that range and efficiently query them using b-trees. Very cool. I wonder if PostgreSQL spatial support works similarly...
Use PostGIS!
Heroku supports it -> http://www.mail-archive.com/[email protected]/msg04556...
They also let you perform spatial operations/queries. You can even store GPS 'polygons' and perform queries such as find ones that overlap, find the polygon which covers a specific point, etc. The spatial query support is amazing.
Indexing the Geography datatype is also supported.
http://www.microsoft.com/sqlserver/2008/en/us/spatial-data.a...