[SoC] Mid-term H2 Spatial Index

Premysl Vohnout premek at vohnout.cz
Tue Jul 8 18:01:07 EDT 2008


Hi all,
I'm writing report what I have done till mid-term.

I'm working with H2 module from geotools trunk.

I have made small change in pom.xml. I have changed version of h2 engine 
to 1.0.74 because there is possibility of using overload function. This 
was needed to use GeomFromText with one parameter (Geometry g) or with 
two parameters (Geometry g, int SRID).

My main tasks for mid-term evalution was to get working some functions. 
This was mainly done in spatialdbbox project but I wasn't able to find 
svn for this project where can I checkout maven project so I temporarily 
move org.openplans.spatialdbbox.JTS into org.geotools.data.h2.JTS but I 
think that it would be wise to put into 
org.openplans.spatialdbbox.h2.JTS. In this class I implemented new methods:

AddGeometryColumn
    - for this method I've created function getGeometryTypes 
(List<String>) which return list of possible geometry types. This is 
used for check if user insert good geometry type.
    - in this method is also checked if user insert good dimension and 
there is also created constraint for checking of inserting adequate 
geometry type.
    - when new Geometry column is created new row is inserted into 
geometry_columns.

Area
AsWKB
Equals
GeomFromWKB
Intersects - with BBox Check
Length

Changed functions:
Envelope
    - because this method returns Envelope type but it should returns 
Geometry type (Polygon). There arise small problem because in 
org.geotools.data.h2.H2Dialect is working with Envelope as Envelope I've 
created AsEnvelope function and changed that in 
org.geotools.data.h2.H2Dialect.encodeGeometryEnvelope

GeomFromText
    - this wasn't changed but it was overload. Because sometimes is 
geometry created without SRID so now is possible GeomFromText('POINT(1 
1)')) also.


I hope that this is all :)

Greets Premysl Vohnout.


More information about the Soc mailing list