Data Type: ‘Geometry’

To create a spatially-enabled table, use the built-in <createTable> or <addColumn> tag. On the nested <column> tag specify a type of “Geometry”.

Available Parameters

The geometry type may have the following parameters that mimic the format used by the PostGIS 2 typmod.

Parameter Description Required For Supports
Geometry Type The geometry type of the data in the column (e.g. Geometry, Point, MultiLineString, Polygon, GeometryCollection, etc). derby, h2, postgresql
SRID The Spatial Reference ID of the data in the column. derby, h2 derby, h2, postgresql
As a Best Practice, the parameters should always be provided and match those in <createSpatialIndex>.

Example

<changeSet id="1" author="bob">
   <addColumn tableName="home">
      <column name="location" type="geometry(Point, 4326)"/>
   </addColumn>
</changeSet>

Database Support

Database Notes
Derby Translates to the VARCHAR(32672) FOR BIT DATA type.
H2 Translates to the BINARY type.
MySQL The parameters are ignored
Oracle Translates to the SDO_GEOMETRY type. The parameters are ignored
PostgreSQL The parameters are optional