Skip to main content
Question

FeatureWriter and geometry type handling with GeoPackages

  • August 7, 2026
  • 2 replies
  • 106 views

chau
Contributor
Forum|alt.badge.img+8

I have created a very simple workspace with a creator which creates a line and writes it to a GeoPackage using a FeatureWriter.

The line is 2D, no measures, but the geometry type in the resulting GeoPackage is reported by ogrinfo as “3D Measured Multi Curve”.

I would expect the result to be a 2D LineString instead - or maybe just LineString. As seen in the image I have exported the geometry to WKT and it indeed reports it as “LINESTRING (400000 6040000,900000 6400000)”.

Is this the expected behaviour and is the FeatureWriter geometry type detection headed towards the broadest category for data instead of a more narrow approach?

The test has been done using FME Form 2026.2 (26333) on Windows.

2 replies

abbyatsafe
Safer
Forum|alt.badge.img+7
  • Safer
  • September 14, 2026

Hi ​@chau!

This is an expected behavior when writing to GeoPackages. You're correct; it's mapping to the broadest geometry type rather than the narrowest. This is because the Writer’s Automatic Schema Definition (<from first feature>) inherits the geometry from the first incoming feature, which in your case comes from the Creator’s generic <all> geometry source. This causes the writer to map to the broadest matching type (3D Measured Multi Curve). 

A workaround is to specify the geometry type by switching the Schema Definition to Manual and selecting "geopackage_linestring" under the Geometry Definition (shown below).

 

[Internal Reference: FMEENGINE-88364]


chau
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • September 15, 2026

Hi ​@chau!

This is an expected behavior when writing to GeoPackages. You're correct; it's mapping to the broadest geometry type rather than the narrowest. This is because the Writer’s Automatic Schema Definition (<from first feature>) inherits the geometry from the first incoming feature, which in your case comes from the Creator’s generic <all> geometry source. This causes the writer to map to the broadest matching type (3D Measured Multi Curve). 

A workaround is to specify the geometry type by switching the Schema Definition to Manual and selecting "geopackage_linestring" under the Geometry Definition (shown below).

 

[Internal Reference: FMEENGINE-88364]

Hi ​@abbyatsafe 

So does this mean that the geometry of the Creator object has multipart, 3D and measures by default (even though the GeometryExtractor only reports 2D linestring) or does the FeatureWriter only determine the basic geometry type (point, line, area, ...) and applies the most broad definition?