Skip to main content

Hello, I am trying to generate dynamic POSGIS tables from spatialite data, however I cannot seem to force FME to create POSTGIS tables with Point / Line / Polygon geometric columns, they get forced to Geometry every time.

imageAs you can see, I have geometry set from schema definition, I have disabled creation of generic geometry columns. My features look like this:

imageHowever when I look into the database, the table created looks like this:

imageSRID is generated correctly, but geom geometry(Geometry,5514) should be geom geometry(Polygon,5514)...

I have found similar question, from 7 years ago, is it possible that this has not been fixed? They are using feature writer, I am using normal writer.

https://community.safe.com/s/question/0D54Q000080hcErSAI/featurewriter-postgis-writes-generic-geometry-column

 

PostgreSQL 13.10 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit

FME: FME(R) 2022.0.0.2 (20220518 - Build 22343 - WIN64) 

I can still reproduce this. Tried to work around it using the recently added SchemaScanner but this didn't work either, so the solution probably lies in the PostGIS writer's mapping from fme_geometry to postgis geometry.

 

If I needed this now I would try to work around it by creating the tables using a SQLExecutor based on the Schema Features the FeatureWriter produces. This way you can do the mapping yourself. Then using a FeatureWriter to insert into the created tables.


Reply