[postgis-devel] Spatial DB in a Box - Postgresql Bindings

Jeremy Palmer jpalmer at paradise.net.nz
Thu Feb 17 02:50:58 PST 2005


Hi Dave,

I have tested this out and it seems very impressive. I really like the idea
the using the existing JTS code base, it really make sense. Great thinking
and initiative!

I would be very interested in seeing if this postgresql implementation could
work in other databases like MSQL 2005 (which finally supports custom
types!) and sqlite... Just a question - won't the 3D indexing system and
operators need to be created in each of the database implementations to
support the new geometry data type?


Also I was wondering if you see this project as potential complete
replacement for PostGIS library?

Cheers Jeremy

-----Original Message-----
From: postgis-devel-bounces at postgis.refractions.net
[mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of
dblasby at openplans.org
Sent: Thursday, February 17, 2005 11:45 AM
To: postgis-devel at postgis.refractions.net
Subject: [postgis-devel] Spatial DB in a Box - Postgresql Bindings

The original PostGIS (way back in 2001 - including all version up to
1.0) was based on my original ideas for putting spatial objects inside
postgresql.  These were known as "heavy weight geometries" (HWGEOM). 
There were several issues involving HWGEOMs - most notably was that
they were very big (memory size) and the implementation was difficult
to maintain.

Almost a year ago, I introduced the light-weight geometry (LWGEOM). 
This drastically reduced the size of the geometry objects and made
postgis somewhat more maintainable and extendable.  The 1.0 series of
releases are based on these lwgeoms.

I've been doing more thinking, and I've come up with a much much more
generic approach, which I'm calling "Spatial DB in a Box".  The idea is
very simple - use JTS (the Java Topology Suite) to handle all the
actual processing and use autogenerated code to handle the
communication between the database and JTS.


DATABASE <--> "glue" <--> JTS

The "glue" code is autogenerated.  This makes the system EXTREAMLY
maintainable since there's almost no code to actually maintain (see
"add a function" below). Also, any improvement made to ONE of the
supported database will find its way into ALL of the databases!

Martin Davis (the developer of JTS) has been madly adding functionality
and improvements to JTS, all of which will automatically be included in
all the "Spatial DB in a Box" databases.

You might be asking yourself how you can use a java library (JTS) in a
"C" program.  Well, I've figure out how to compile JTS (in fact any
java library) to an ".so/.dll" using GCC (GCJ).  Keeping with the
autogeneration theme, the C++ wrapper for JTS is also autogenerated.


Multiple databases can be 'spatialized'.  Currently, I have bindings
for:
PostgreSQL
Hsql (aka Hypersonic SQL)
Derby/Cloudbase

Basically, almost any database that allows for custom types and custom
functions can be easily supported.  I'd like to try this with Oracle,
and work with the MySQL folks to add real spatial functionality to
MySQL.
NOTE: MySQL doesnt allow for custom types, and its very difficult to add
custom functions so it needs a little help from the MySQL developers...

The current version is fairly simple, but supports almost all the OGC SF
SQL functions.  If you see one missing, its trivial to add it. See the
"postgresql bindings" and "add a function" below.


For more information on "Spatial DB in a Box", see:
http://docs.codehaus.org/display/GEOS/spatialDBbox

For more information on how easy it is to add functionality to all the
databases:
http://docs.codehaus.org/display/GEOS/Add+A+Function

For more information on compiling JTS, see:
http://docs.codehaus.org/display/GEOS/Compiling+JTS

For more information specific to the postgresql bindings:
http://docs.codehaus.org/display/GEOS/Postgresql+Bindings


Let me know what you think,
dave



----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/
_______________________________________________
postgis-devel mailing list
postgis-devel at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-devel






More information about the postgis-devel mailing list