Skip to content

v2.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 26 Jan 11:09
· 0 commits to 681286991bbd249604fd3b177630d95a1a5a53b7 since this release

This release introduces several major changes in H2GIS synchronized with the new H2 2.X series.
Besides many dozens of fixed bugs, performance improvements, more adherence to a standard SQL syntax and new data type (e.g JSON),
the H2GIS geometry encoding and syntax declaration is now aligned with the PostGIS one.

The geometry encoding to store the value in H2 is the EWKB (extended well-known binary) format. The EWKB format is not an OGC standard, but a PostGIS specific format that includes the spatial reference system (SRID) identifier. Its textual representation using the WKT (well-known text) uses the pattern :

'SRID=4326;POINT(0 0)'

H2 supports POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, and GEOMETRYCOLLECTION geometries with the following coordinate dimension 2D (XY), Z (XYZ), M (XYM), and ZM (XYZM).

H2 provides the same syntax as PostGIS to build a table with a geometry data type.

e.g
CREATE TABLE mygeometrytable (ID INTEGER, GEOM GEOMETRY);
CREATE TABLE mygeometrytable (ID INTEGER, GEOM GEOMETRY(POINT));
CREATE TABLE mygeometrytable (ID INTEGER, GEOM GEOMETRY(POINT, 4326));
CREATE TABLE mygeometrytable (ID INTEGER, GEOM GEOMETRY(POINTZ, 4326));
CREATE TABLE mygeometrytable (ID INTEGER, GEOM GEOMETRY(POINTZM, 4326));
CREATE TABLE mygeometrytable (ID INTEGER, GEOM GEOMETRY(POINTM, 4326));

Note that

  • all databases created by H2 1.4.200 and older versions won't be compatible.
  • H2GIS needs at least JAVA 11

Please check the H2 change log since 2.X series here https://github.com/h2database/h2database/releases

Changelog for v2.0.0

  • Add changelog, contributing, header markdown files.
  • Fix SHPRead function to support null value (#1132)
  • Remove encoding argument on GeoJSONWrite / GeoJSONRead (#1130)
  • Improve TSVRead function (#1129)
  • AscRead and GeoJson read functions supports gz file (#1122 #1127)
  • Improve FileDriver (Shp and Dbf) to limit the number of columns (#1008)
  • Align create table geometry with PostGIS (#921)
  • Add ST_SVF function (#885)
  • Add ST_Point function (#848)
  • Add support to create index on a linked file (shp or dbf file) (#720)
  • Upgrade Java to 11
  • Upgrade H2 to 2.0.202
  • Upgrade to JTS 1.18.2
  • Add new function ST_VariableBuffer
  • Add new function ST_SubDivide (#1152)
  • Update H2 from 2.0.202 to 2.0.204
  • Added a workaround due to the new column type name returned for geometry data type
    eg GEOMETRY(POINT) instead of only GEOMETRY
  • Update H2 from 2.0.204 to 2.0.206
  • Add a new module to run sql script tests (disable by default)
  • Update ST_Force3D, ST_Force4D and ST_Force3DM to be inline with PostGIS
  • Update ST_UpdateZ to force the dimension when the z value is updated.
  • Update H2 from 2.0.206 to 2.1.210 to fix a memory issue and improve Geometry dimension check
    (#1233 and #1243)
  • Fix ST_MenSize to avoid expensive conversion (#1247)
  • Add method to create Datasource object
  • Update the dependencies Poly2Tri and java-network-analyzer
  • Restore transaction with batch setAutoCommit to false