Skip to main content

Whenever I write features into a GeoPackage Table, this table is registered in the GPKG_GEOMETRY_COLUMNS table. FME registers all the tables I create with geometry_type_name: GEOMETRY. I expected that FME would register my table with point features as geometry type POINT, tables with polygon features as POLYGON, etc., as prescribed in the GeoPackage-specification. Tables registered as GEOMETRY are recognized by QGIS as a feature class with unknown feature type. Which makes sense.

How do I enforce FME to register the correct geometry type for my tables, preferably in a workbench with a dynamic reader (PostGIS) and writer (GeoPackage)?

Wim

Maybe the example from Dale in this question helps you? writing-geometries-with-geopackage-writer-is-not-possible


edit: since FME 2020, the OGC GeoPackage Writer can create tables with specific geometry types, so we don't need the following workaround anymore.

 

It's not a perfect solution, but I made a little workaround that accomplishes what you want to do geomtypes.zip

 

 

Basically, I dynamically write some feature types with various geometry types. Simultaneously I check if only one kind of geometry type was written to each feature type. If so, then I use a SQLExecutor to update the `gpkg_geometry_columns` table for that feature type.

 

As far as the actual OGC Geopackage Writer supporting this behaviour (writing tables with specific geometry types): we haven't implemented that at this time. However, it's certainly something we could look into. Would you like to create a Knowledge Center Idea for writing GeoPackage tables with particular geometry types?

 


edit: since FME 2020, the OGC GeoPackage Writer can create tables with specific geometry types, so we don't need the following workaround anymore.

 

It's not a perfect solution, but I made a little workaround that accomplishes what you want to do geomtypes.zip

 

 

Basically, I dynamically write some feature types with various geometry types. Simultaneously I check if only one kind of geometry type was written to each feature type. If so, then I use a SQLExecutor to update the `gpkg_geometry_columns` table for that feature type.

 

As far as the actual OGC Geopackage Writer supporting this behaviour (writing tables with specific geometry types): we haven't implemented that at this time. However, it's certainly something we could look into. Would you like to create a Knowledge Center Idea for writing GeoPackage tables with particular geometry types?

 

Hi Jake,

 

 

Although your workbench isn't compatible with my FME-version (my organisation isn't up to the latest-and-greatest yet) I get the idea. It's not perfect, indeed; it's a wprkaround. I'l try to reconstruct your workbench in my FME-version.

 

 

For a while I thought that the format attribute GEOPACKAGE_TYPE would be used to to define the geometry type of a Geopackage table. Alas...

 

 

I'll post an Idea as you suggests.

 

 

Wim

 

 

Addendum:

 

Idea registerd.

 


Maybe the example from Dale in this question helps you? writing-geometries-with-geopackage-writer-is-not-possible

Not reallly. But thanks for your reply anyway.

 

 


Reply