4.3 Link H2GIS with PostGIS - orbisgis/h2gis GitHub Wiki

Link H2GIS with a PostGIS database

If you want to link a PostGIS table with H2GIS (since v1.2.3), you just have to run this SQL query:

CREATE LINKED TABLE MY_TABLE ('org.orbisgis.postgis_jts.Driver',
 'jdbc:postgresql_h2://ip_adress:port/db_name','login','password','schema','table');

Where

  • ip_adress is the url of your PostGIS database,
  • port is the number of the server port (eg. 5432),
  • db_name is the name of the database,
  • schema is the name of the schema,
  • table is the name of the table.

Remark : the "LINKED TABLE" instruction is based on the H2Database grammar. More details HERE.