Skip to main content
Question

Specifying the geometry type when writing from ESRI Shapefile into PostGIS

  • November 11, 2020
  • 6 replies
  • 152 views

Hi, I am using FME to write a Shapefile to PostGIS and I am wondering if there is a way that you can specify that it writes polygons only? When it is writing into PostGIS it is coming in as an unknown geometry with a warning triange!

6 replies

david_r
Celebrity
  • November 11, 2020

Have you looked at the GeometryFilter? Would that help?


nielsgerrits
VIP
Forum|alt.badge.img+54

In the writer parameters, uncheck “create generic geometry”. Then safe as default. Not your fault, everybody asks this when using it for the first time.


  • Author
  • November 11, 2020

​Thank you for your replies.  When I use "Geometry filter" and select "area" it writes as multipolygon in the PostGIS table and then it doesn't allow the table to be edited in QGIS.

 

I couldn't find "create generic geometry" - I did try unchecking "Create Generic Spatial Columns" but then this failed to write anything from the table.


nielsgerrits
VIP
Forum|alt.badge.img+54
albionlou wrote:

​Thank you for your replies.  When I use "Geometry filter" and select "area" it writes as multipolygon in the PostGIS table and then it doesn't allow the table to be edited in QGIS.

 

I couldn't find "create generic geometry" - I did try unchecking "Create Generic Spatial Columns" but then this failed to write anything from the table.

When you leave the Create Generic Spatial Columns checked, FME will write to a multi geometry type spatial column. QGIS does not support multi geometry type spatial columns, as far as I know.

 

When you uncheck it, you can define what kind of geometry you want to write:

PostGISParametersFeatureWriterParametersIf you want to edit the geometry using PostGIS, you also need to add a ID field. I use a field pkey, type serial, Index PrimaryKey.

FeatureWriterParametersUserAttributes


  • Author
  • November 12, 2020
nielsgerrits wrote:

When you leave the Create Generic Spatial Columns checked, FME will write to a multi geometry type spatial column. QGIS does not support multi geometry type spatial columns, as far as I know.

 

When you uncheck it, you can define what kind of geometry you want to write:

PostGISParametersFeatureWriterParametersIf you want to edit the geometry using PostGIS, you also need to add a ID field. I use a field pkey, type serial, Index PrimaryKey.

FeatureWriterParametersUserAttributes

​Thank you but in my "Feature Writer" I don't have the drop -down option "postgis_polygons". I am using FME 2020

 

FME_Query


nielsgerrits
VIP
Forum|alt.badge.img+54
nielsgerrits wrote:

When you leave the Create Generic Spatial Columns checked, FME will write to a multi geometry type spatial column. QGIS does not support multi geometry type spatial columns, as far as I know.

 

When you uncheck it, you can define what kind of geometry you want to write:

PostGISParametersFeatureWriterParametersIf you want to edit the geometry using PostGIS, you also need to add a ID field. I use a field pkey, type serial, Index PrimaryKey.

FeatureWriterParametersUserAttributes

This is because "Create Generic Spatial Columns" is checked. If you uncheck it, you can choose a geometry type.

 

Please, @safeemployee safeemployee​  uncheck this by Default.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings