Indexing Records with Geometry from a Spatial Database (PostGIS)

Voyager Search can index records' geometries from databases,such as Oracle Spatial, MSSQL, SDE and PostgreSQL/PostGIS, that support spatial content and operations. However in some cases, notably PostGIS, geometries are not extracted as geometric objects from the database, but you can use the database's native spatial functions to convert them in to a Well-Known-Text (WKT) geometry which Voyager can use to interpret location and shape.

To index Records with Geometry from a Spatial Database (PostGIS):

  1. Go to Manage Voyager > Discovery > Locations > Add Location and select the SQL tab. 

  2. Select PostgreSQL and create a JDBC connection

  3. Note the default query absorbs the geometry column as a pure string

  4. The geometry is captured as a WKT geometry, but not represented with any spatial context in Voyager Search results

  5. Use the PostGIS functionST_AsText()to transform the geometric string into a WKT (Well-Known Text) representation of the geometry

  6. Save the Location settings, clear and rebuild the index

The PostGIS search results will include a BBOX and will be displayed on the map.