Skip to main content
Question

Dynamic featureWriter - PostGIS Format : force native geometry type

  • June 5, 2026
  • 0 replies
  • 13 views

arthur_bazin
Contributor
Forum|alt.badge.img+19

I have mixed data that includes lines, polygons, curves and curved_polygons.

I want all these features to go into my PostGIS databases, two tables :

  • “my_lines” defined as geometry(multicurve)
  • “my_surfaces” defined as geometry(multisurface)

Here some remind about Postgis geometries : 

  • multicurve geometry type allows you to store polylines and curves in the same column
  • multisurface geometry allows you to store polygons and curve polygons in the same column

Here is an blog post I wrote on the sibject : https://blog.arthurbazin.com/sig/bien-demarrer-avec-les-sig#types_de_geometries

For reading, no problem at all for FME. For writing, I can specify the geometry type :

If I have polygons, they are casted as multisurfaces and all is good.

But when it comes to dynamic, how can I achieve to set this parameter dynamically ? 

I’ve try to use “from first feature” but curvedpolygons objects (even if I cast them to multi) are not mapped to multicurve ou multisurface and I can have polygons as first features (I can not control the order).
Note : for cuves (lines), you can use the pathBuilder to convert it into geometries that will be cast to postgis_multicurve. But nothing for polygons :-(

I’ve try to use “from schema definition” but I can not find a fme_geometry_type that correspond to postgis_multisurface or postgis_multicurve.

I’ve looked into the Postgis.fmf metafile but it seems there is no specific geometry type mapping.

So, is there a way to define a native geometry datatype to use with a dynamic writer ?