-
Notifications
You must be signed in to change notification settings - Fork 5
2. Initialize the H2GIS spatial extension
Bocher edited this page Nov 3, 2015
·
6 revisions
In order to use H2GIS, you need to install the spatial extension and populate the database with some geometries.
- Go the GeoServer Tools page. Select H2 console.
- Fill the H2 database web console with the good parameters (database name = path/h2gisdb, login = sa, password = empty)
- Click on connect and the built-in web interface of the H2 Database will appear.
- In the H2 scripting console, copy-paste the following commands to add the spatial extension.
CREATE ALIAS IF NOT EXISTS SPATIAL_INIT FOR
"org.h2gis.h2spatialext.CreateSpatialExtension.initSpatialExtension";
CALL SPATIAL_INIT();
- After that, all spatial functions will be added. See the geometry_columns view that collects all metadata for each geometry tables and the spatial_ref_table that stores all coordinate system parameters used to apply transformation on geometries.