Scott,
Yes, the SELECT is very simple, but slow. I have tens of thousands of
records and I need the data very fast (embedded realtime system). Some
databases natively support spatial searches, using KD-trees or R-Trees or
Quad-trees to improve the search speed. I found an article that explains
how to implement a custom-spatial search in SQL 2007:
"Using Table Valued Functions in SQL Server
2005 to Implement a Spatial Data Library"
But the solution is very specific to SQL server. I thought there might be
other tricks that might be common for implementing a fast spatial search in
a database that doesn't natively support this feature.
Thanks in advance,
David
-----Original Message-----
From: Scott Baker [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 23, 2007 10:52 AM
To: [email protected]
Subject: Re: [sqlite] Spatial searches
David Thieme wrote:
> I've been looking for a WinCE embedded database that supports spatial
> searches. We are already using SQLite for a very small application; we're
> hoping that someone may have some tricks/hints on how to implement fast
> searches on spatial data with SQLite. A typical search would be finding
> items whose lat/lon falls within a given rectangle (e.g., hotel's closest
to
> my car). If not, can someone recommend a WinCE database engine that
> supports spatial searches?
Wouldn't that be something simple like...
SELECT Foo WHERE Lat > 1.2 AND LAT < 1.4 AND LONG > 5.6 AND LONG < 6.0?
That'll give you a rectangle of values pretty easy. In fact I've
implemented that in another database. Pretty easy really.
--
Scott Baker - Canby Telcom
RHCE - System Administrator - 503.266.8253
----------------------------------------------------------------------------
-
To unsubscribe, send email to [EMAIL PROTECTED]
----------------------------------------------------------------------------
-
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------