Skip to main content

Hi,

When I precise some attributes into a PostGIS SQLCreator (including the geometry) in the SQL request “SELECT id, geom FROM test”, FME doesn’t recognize the geometry. Its is only seen as attribute, but not the geometry of the feature. It only finds the geometry with “SELECT * FROM test”. Do you know what can cause this error ?

I just tried here using FME 2017 and it works. Are you sure that your geometry column has been registered properly in PostGIS? Check that your table appears when you execute this:

SELECT *
FROM public.geometry_columns

Alternatively, you can cast your geometry column as e.g. WKB:

select id, ST_AsBinary(geom) as geom
from test

After the SQLCreator, insert a GeometryReplacer on the attribute "geom" using geometry type "OGC well known binary". Choose to remove the attribute to save memory, you probably don't need it anymore.


I work with FME(R) 2016.1.2.1 (20160929 - Build 16674 - WIN64) and my table appears correctly in public.geometry_columns with good attributes. More specifically it's when I add a join in the request that it loses the geometry : "SELECT test.geom
FROM test
INNER JOIN all ON test.id = all.id "


Reply