Hi Andrea, Thanks for your email. I've created and configured the table and its geometry column by following the instructions provided in hatbox's quick start guide (http://hatbox.sourceforge.net/h2quickstart.html). Not running the extra step you've provided below might be what I'm missing. I'll have a go at that tomorrow and let you know how I go.
Thanks again, Gerson On 28/11/11 6:35 PM, "Andrea Aime" <[email protected]> wrote: >On Mon, Nov 28, 2011 at 6:27 AM, Gerson Galang <[email protected]> >wrote: >> Hi, >> I've been playing with H2 DB so I could use it on the tests I've been >> writing for our system. I found that hatbox 1.0.b7 which is packaged >>with >> gt-jdbc-h2 (8.0-M1) module made my tests throw a >> "java.lang.AbstractMethodError: >> net.sourceforge.hatbox.jts.InsertTrigger.close()V" exception. I updated >>the >> version of hatbox in my dependency listing and excluded the one that >>came >> with gt-jdbc-h2 and that made it work. > >There is likely something wrong with your setup, the H2 module is >compiled and tested >multiple times a day off both trunk and 2.7.x branches by this >buildbot without issues: >http://hudson.opengeo.org/hudson/view/geotools/ > >> Now the problem is, geotools doesn't seem to integrate well with H2 DB. >>I >> have about 3 entries in my table all of them being point geometries. >> Calling getBounds on the featureSource gives me back >>"ReferenceEnvelope[0.0 >> : -1:0, 0.0 : -1.0]" which is wrong because it should be returning 138, >>151 >> 38, -36. I called getCoordinateReferenceSystem() on the FeatureType >>object >> and it returned null instead of "EPSG:4283". Is this a gt-jdbc-h2 bug >>or >> are the capabilities I'm after, not yet implemented? > >Every build runs a couple of hundred unit tests against jdbc-h2, those >include bound >computation methods. That is not to say there are no bugs, it may well >be that you're >hitting a case that is not well covered, but it should be something not >obvious. > >As for the lack of spatial reference system, there is probably something >wrong >in the database setup, you are missing the geometry metadata. >Did you call AddGeometryColumn? > >Here is how a spatial table is setup: >http://svn.osgeo.org/geotools/branches/2.7.x/modules/plugin/jdbc/jdbc-h2/s >rc/test/java/org/geotools/data/h2/H2TestSetup.java >and here are some of the tests I was referring to: >http://svn.osgeo.org/geotools/branches/2.7.x/modules/plugin/jdbc/jdbc-h2/s >rc/test/java/org/geotools/data/h2/H2FeatureSourceTest.java >http://svn.osgeo.org/geotools/branches/2.7.x/modules/library/jdbc/src/test >/java/org/geotools/jdbc/JDBCFeatureSourceTest.java > >Cheers >Andrea > > >-- >------------------------------------------------------- >Ing. Andrea Aime >GeoSolutions S.A.S. >Tech lead > >Via Poggio alle Viti 1187 >55054 Massarosa (LU) >Italy > >phone: +39 0584 962313 >fax: +39 0584 962313 > >http://www.geo-solutions.it >http://geo-solutions.blogspot.com/ >http://www.youtube.com/user/GeoSolutionsIT >http://www.linkedin.com/in/andreaaime >http://twitter.com/geowolf > >------------------------------------------------------- ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
