The Hibernate Spatial H2 GeoDB Provider

The H2 GeoDB Provider adds support for H2 GeoDB to Hibernate Spatial. It has been tested with H2 GeoDB 0.3 and should work with any version later than that.

Important notes

  • Note that H2 GeoDB does not completely implement the OGC Simple Feature Specification. Some functions that work for PostGIS or Oracle may fail to work for H2 GeoDB.
  • Note that version 0.3 does not store the SRID with the geometry. This is due to an omission in the JTS API. Version 0.4 solved this issue by extending the JTS API, but the fix was committed in the opengeo repository. To use version 0.4, you have to include the GeoTools Maven repository ( http://repo.opengeo.org/com/vividsolutions/jts/1.12-SNAPSHOT/ ) and you cannot use other JTS versions.
  • Note that EWKT byte arrays generated by GeoDB version 0.6 (with GeoDB.gToEWKB(Geometry)) seem to have redundant bytes at positions 42-45, resulting in a incorrect EWKT. As a result, accessing EKWT objects in the database generated by GeoDB.gToEWKB with hibernate-spatial may give jts Parse Exceptions.
    See GeoDB issue #10