Re: [sqlite] Question about SQLite and spatial data

2005-09-08 Thread Noel Frankinet

Rajan, Vivek K wrote:


I have a need to store spatial and connectivity data (think verilog
netlist with x, y coordinate information) in a persistence on-disk file.
I am looking at different SQL-based databases and am wondering if anyone
has recommendations/opinions on how good SQLite is for:

 - Storing spatial data. An examples, documentation and support links

 - Performing spatial queries and indexing for very large hierarchical
data set



Please advice.



Rajan


 




No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.18/91 - Release Date: 6/09/2005
 


Hello,

I do it. I have a collection of graphical classes (line, polylines, 
) than can be saved and retrieved from sqlite. I use the 2.8. The 
shape are saved as blob encoded in text. When drawing or selecting, 
shapes are pulled from the Geometry column via sqlite call-back mechanism.
Shape class have a static factory method that takes the blob pulled from 
db as parameter and return a well formed object.


The table schema is made from a primary key , 4 int for a bounding box, 
a the geometry blob.
I try now to make a spatial index (quadtree or rtree) but I already have 
good performance by selecting bounding box.


Best wishes

--
Noël Frankinet
Gistek Software SA
http://www.gistek.net



Re: [sqlite] Question about SQLite and spatial data

2005-09-07 Thread Puneet Kishor

I work with spatial data, so I will take a stab at answering this.

On Sep 7, 2005, at 2:35 PM, Rajan, Vivek K wrote:


I have a need to store spatial and connectivity data (think verilog
netlist with x, y coordinate information) in a persistence on-disk 
file.
I am looking at different SQL-based databases and am wondering if 
anyone

has recommendations/opinions on how good SQLite is for:

  - Storing spatial data. An examples, documentation and support links

  - Performing spatial queries and indexing for very large hierarchical
data set



there is nothing special about spatial data when it comes to storing. 
What is special is making sense of it, either when inserting it or when 
retrieving it. Unless it is coming from a GPS stream, in which case it 
is just a bunch of numbers, spatial data usually describes geographic 
features in terms of points, lines, and polygons.


Some trick is involved in converting such spatial features into strings 
of linked numbers that can be stored in the database, and then some 
more trick is involved in performing spatial queries such as buffers 
(SELECT cols FROM tab WHERE somecol IS WITHIN 2 meters OF 
someothercol), overlays (SELECT cols FROM tab WHERE somecol IS 
CONTAINED IN someothercol), etc. Once you have selected the features, 
you need some way to display them -- therein lies the third trick.


What you need is an application layer that (1) performs the above 
mentioned tricks; (2) and another  application that displays your 
results. Such an application layer can be fairly db neutral, as ESRI's 
Spatial Data Engine (ArcSDE) is (http://www.esri.com) but it requires 
SQL Server or Oracle, or it can be a db-specific implementation such as 
PostGIS. PostGIS is a recommended and preferred weapon of choice. As 
the name indicates, it works with PostGres, is free and open source, 
and is most excellent (http://postgis.refractions.net). Combine PostGIS 
with the free and opensource MapServer (http://mapserver.gis.umn.edu) 
and you have a most excellent solution. I worked with PostGIS and 
MapServer, and I can say the above from firsthand experience.


The latest version of MySQL has built-in spatial capabilities, but I 
haven't seen them in action, only in docs, and if you Google, you can 
also find a custom MySQL-based spatial data engine that someone wrote.



--
Puneet Kishor



[sqlite] Question about SQLite and spatial data

2005-09-07 Thread Rajan, Vivek K
I have a need to store spatial and connectivity data (think verilog
netlist with x, y coordinate information) in a persistence on-disk file.
I am looking at different SQL-based databases and am wondering if anyone
has recommendations/opinions on how good SQLite is for:

  - Storing spatial data. An examples, documentation and support links

  - Performing spatial queries and indexing for very large hierarchical
data set

 

Please advice.

 

Rajan