-
1. Re: Exposing WKBGeometry via Teiid
shawkins Jun 7, 2017 10:02 AM (in response to jollyfella)When using the Teiid importer, PostGIS geometry columns should automatically be recognized as a Teiid geometry column. There are a host of spatial system functions we support: Spatial Functions · Teiid Documentation
You should also be able to integrate Teiid several platforms, see GeoServer Integration · Teiid Documentation and QGIS Integration · Teiid Documentation
-
2. Re: Exposing WKBGeometry via Teiid
jollyfella Jun 7, 2017 11:25 AM (in response to shawkins)Thanks Steven! How do i go about exposing this (bytearray) in the Teiid vdb.xml as BLOB?
-
3. Re: Exposing WKBGeometry via Teiid
shawkins Jun 7, 2017 12:04 PM (in response to jollyfella)Can you provide more context for what you asking? What is the native type of the source column, and what type is Teiid exposing it as?
A postgresql bytea column will typically import as a blob automatically.
-
4. Re: Exposing WKBGeometry via Teiid
jollyfella Jun 8, 2017 9:12 AM (in response to shawkins)I have exposed the geometry column "geom" in Postgresql to the vdb. But I am unsure as to how/where to add the function
ST_GeomFromWKB(bin [, srid])
I only have the vdb.xml file, which contains description, property, model with properties and translator with properties. -
5. Re: Exposing WKBGeometry via Teiid
shawkins Jun 8, 2017 9:35 AM (in response to jollyfella)If it's a geometry type column in the database, then it should already be a geometry column in Teiid.
Have you examined the metadata exposed by your vdb to see what the column type is? You can use a database exploration tool like squirrel or even just query sys.columns.
-
6. Re: Exposing WKBGeometry via Teiid
jollyfella Jun 8, 2017 2:51 PM (in response to shawkins)data_type is 1111, type_name is geometry so I assume this is the BLOB?
-
7. Re: Exposing WKBGeometry via Teiid
shawkins Jun 8, 2017 2:59 PM (in response to jollyfella)To clarify, is that the metadata directly from JDBC access to postgresql? Or is that from Teiid?
In Teiid the geometry type is effectively an extension of blob that allows it to be used in all of the functions that were linked earlier. When transferred to the Teiid client the value effectively becomes a blob.