views:

794

answers:

3

Has anyone tried using it and can say if it's well implemented?

-- Assaf (who spent the last few weeks getting increasingly frustrated with MySQL's deficient implementation of OpenGIS functions and is now considering switching to MSSQL)

+3  A: 

Yes it works, I have some sample code here SQL Server 2008 Proximity Search With The Geography Data Type

SQLMenace
Did you by any chance work with polygons and know whether functions like polygon/point intersection are implemented accurately or just using MBR (like in MySQL)?
Assaf Lavie
A: 

Yes, they work.

I just switched one my classes from an ESRI-ArcObject-based query using ISpatialFilter to a SqlCommand that returns the same data. It's a proximity search (return any records that are within 1000 feet of point x).

At first the ESRI query was still faster but that was due to a poorly constructed where clause that was very ineffecient (I'm still learning how to use the spatial functions in SQLSVR2008).

After some tweaking,my SQL method was faster than the ESRI method but not by much. Then I jacked my search distance up to 10000 feet and then I saw the difference. The SQL Server 2008 method was a lot faster.

(ESRI) Search Nearby Customers Elapsed Time(sec): 1.503 (SQL2008) Query Nearby Customers Elapsed Time(sec): 0.925

Although the speed differences don't have to do with the indexes, but with ESRI-ArcObjects. In my ESRI method, I'm getting my distance, x, and y from IProximityOperator and IPoint. In the SQL2008 method, I'm letting the database do all of the work: SHAPE.STX as X ,SHAPE.STY as Y ,SHAPE.STDistance(but the ArcObject developers know all about that overhead).

I'm impressed so far.

+1  A: 

Yes. They are implemented correctly. You also have PostgreSQL's PostGIS as an option, Oracle Spatial. Informix and DB2 also have implementations of a spatial type.

rburhum