GeoServer Integration

GeoServer is an open source server for geospatial data. It can be integrated with Teiid to serve geospatial data from a variety of sources.

Prerequisites

  • Have GeoServer installed. By default this will be in a different container than the Teiid WildFly instance, but it should be possible to deploy into the same WildFly instance. Teiid integration was initially tested with GeoServer version 2.6.x, and was later updated to support 2.8.x and 2.12.x with TEIID-5236

  • Your Teiid installation should already be setup for pg/ODBC access. This allows the built-in support of GeoServer for PostGIS/PostgreSQL to be used.

  • Have a VDB deployed that exposes one or more tables containing an appropriate Geometry column.

    1. The Teiid system table GEOMETY_COLUMNS will be used by GeoServer. Please ensure that the relevant geometry columns have the appropriate srid and coord_dimensions, which may require setting the {http://www.teiid.org/translator/spatial/2015}srid and {http://www.teiid.org/translator/spatial/2015}coord_dimension extension property on the geometry column.

GeoServer Configuration

This process will need to be repeated for each VDB schema you are exposing that contains geospatial data.

  1. Using the GeoServer admin web application, select Stores → Add new Store. Under Vector Data Sources, select PostGIS.

  2. Using the non-JNDI connection, fill in the Teiid server host, ODBC port, database (VDB Name with optional version), user, and password, schema (schema/model from the target VDB).

    1. If your VDBs contain target schema or table names with % or _, Teiid must be configured to use the same default like escape character '\' as PostgreSQL to properly respond to metadata queries. Either the system property org.teiid.backslashDefaultMatchEscape must be set to true or the Teiid session variable backslashDefaultMatchEscape must be set to true - for example enter "select cast(teiid_session_set('backslashDefaultMatchEscape', true) as boolean)" in the "Session startup SQL" to configure just this GeoServer connection pool.

  3. Follow the typical GeoServer instructions for creating a Layer based upon the Teiid store.

    1. Note that the PostGIS function ST_Estimated_Extent is not supported by Teiid and the execution will be shown in the logs as an error when selecting to compute the bounding box from the data.

Additional Considerations

  • If you are integrating a PostgreSQL source, you must not re-expose the geometry_columns or geography_columns tables. This is because GeoServer makes unqualified queries that reference geometry_columns and the query should resolve against the Teiid system table instead.

  • Teiid does not by default expose a GT_PK_METADATA, which is optionally used by GeoServer

results matching ""

    No results matching ""