Skip to main content

When I convert features from a EGDB to a gpkg not all polygons are transfered coorectly. Some polygons are written as a null geometry. I am unknown with gpkg's so I guess I am doing something wrong but what? Any one has a answer to this?

I think these are nested aggregates (collections of collections), which are not supported in GeoPackage. You can test this by putting a Deaggregator before the writer, set to Flatten All Levels.


I think these are nested aggregates (collections of collections), which are not supported in GeoPackage. You can test this by putting a Deaggregator before the writer, set to Flatten All Levels.

I have tried this but the result is the same. I can find the features but they are FMEnull.


Try reading the Geopackage back into FME and compare with your input data (e.g. ChangeDetector) to isolate the problematic geometries. For example, Geopackage does not support ellipses.

See also: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/geopackage/quick_facts_geopackage.htm

Also make sure that you have a recent version of FME.


Can you read the EGDB data into the FME Data Inspector and query a feature that doesn't transfer correctly? Then take a screenshot of the info window and post it here. That would help. It sounds like there is something different about that geometry, but without seeing the data it's impossible to say what.

Also, check the FME log file for warning messages. It will likely tell you if a feature is being demoted to null geometry for any reason.

As far as I can tell, aggregates - even nested aggregates - are supported in GeoPackage, so it shouldn't be that. Maybe these are a different dimension (e.g. 3d instead of 2d)? I believe a GeoPackage table only permits one type of geometry, so maybe these don't match the chosen type and are being dropped for that reason?


Can you read the EGDB data into the FME Data Inspector and query a feature that doesn't transfer correctly? Then take a screenshot of the info window and post it here. That would help. It sounds like there is something different about that geometry, but without seeing the data it's impossible to say what.

Also, check the FME log file for warning messages. It will likely tell you if a feature is being demoted to null geometry for any reason.

As far as I can tell, aggregates - even nested aggregates - are supported in GeoPackage, so it shouldn't be that. Maybe these are a different dimension (e.g. 3d instead of 2d)? I believe a GeoPackage table only permits one type of geometry, so maybe these don't match the chosen type and are being dropped for that reason?

Attached the feature information of Feature that is not correctly copied to the gpkg. If I use QGIS to create the geopackage all features are copied correctly as far as I can see.


Attached the feature information of Feature that is not correctly copied to the gpkg. If I use QGIS to create the geopackage all features are copied correctly as far as I can see.

If you upload the feature as a FFS we can try to reproduce you issue.

Have you checked it using a GeometryValidator? No selfintersections / consecutive duplicate points? No warnings in the log?


Attached the feature information of Feature that is not correctly copied to the gpkg. If I use QGIS to create the geopackage all features are copied correctly as far as I can see.

There are warnings in the logs. They are the culprits I guess. The GeometryValidator does point out issue's but not or not all the features that fail to copy to the gpkg. So I think that the issue is indeed the geometry type. But is there an easy way to filter these and correct them? Filtering them with the GeometryFilter or by Attribute (FME_geometry or FME_type) does not give the required results.

 

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_v' has geometry type 'geopackage_polygon' and cannot accept the current feature with a geometry of type 'geopackage_curvepolygon'. Skipping feature

... Last line repeated 32 times ...

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_v' has geometry type 'geopackage_polygon' and cannot accept the current feature with a geometry of type 'geopackage_curvepolygon'. Skipping feature

... Last line repeated 26 times ...

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

... Last line repeated 2 times ...

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

... Last line repeated 3 times ...

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

... Last line repeated 9 times ...

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

... Last line repeated 4 times ...

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

... Last line repeated 3 times ...

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

... Last line repeated 2 times ...

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

... Last line repeated 5 times ...

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

... Last line repeated 2 times ...

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

... Last line repeated 4 times ...

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

... Last line repeated 5 times ...

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature

... Last line repeated 2 times ...


Can you read the EGDB data into the FME Data Inspector and query a feature that doesn't transfer correctly? Then take a screenshot of the info window and post it here. That would help. It sounds like there is something different about that geometry, but without seeing the data it's impossible to say what.

Also, check the FME log file for warning messages. It will likely tell you if a feature is being demoted to null geometry for any reason.

As far as I can tell, aggregates - even nested aggregates - are supported in GeoPackage, so it shouldn't be that. Maybe these are a different dimension (e.g. 3d instead of 2d)? I believe a GeoPackage table only permits one type of geometry, so maybe these don't match the chosen type and are being dropped for that reason?

@mark2atsafe​ You are correct my memory tricked me. GeoPackage does accept nested aggregates, but it's QGIS can't handle them. Hence no errors in the log.

@bbo​ I see 4 unique messages in the log you posted:

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_v' has geometry type 'geopackage_polygon' and cannot accept the current feature with a geometry of type 'geopackage_curvepolygon'. Skipping feature
 
OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature
 
OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

This tells you want to add geopackage_curvepolygon to a geopackage_polygon table. These features are becoming null geometries. You can fix this using a ArcStroker before the writer, which will stroke the arcs to lines.

 

On top of this, the source contains aggregates, but the target geometry type geopackage_polygon, can't have these. So the writer is deaggregating these features to let them fit in the target table. As an alternative, you can switch the target geometry type to geopackage_multipolygon.


@mark2atsafe​ You are correct my memory tricked me. GeoPackage does accept nested aggregates, but it's QGIS can't handle them. Hence no errors in the log.

@bbo​ I see 4 unique messages in the log you posted:

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_v' has geometry type 'geopackage_polygon' and cannot accept the current feature with a geometry of type 'geopackage_curvepolygon'. Skipping feature
 
OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature
 
OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

This tells you want to add geopackage_curvepolygon to a geopackage_polygon table. These features are becoming null geometries. You can fix this using a ArcStroker before the writer, which will stroke the arcs to lines.

 

On top of this, the source contains aggregates, but the target geometry type geopackage_polygon, can't have these. So the writer is deaggregating these features to let them fit in the target table. As an alternative, you can switch the target geometry type to geopackage_multipolygon.

Added workspace template (FME 2020.1).


@mark2atsafe​ You are correct my memory tricked me. GeoPackage does accept nested aggregates, but it's QGIS can't handle them. Hence no errors in the log.

@bbo​ I see 4 unique messages in the log you posted:

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_v' has geometry type 'geopackage_polygon' and cannot accept the current feature with a geometry of type 'geopackage_curvepolygon'. Skipping feature
 
OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature
 
OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

This tells you want to add geopackage_curvepolygon to a geopackage_polygon table. These features are becoming null geometries. You can fix this using a ArcStroker before the writer, which will stroke the arcs to lines.

 

On top of this, the source contains aggregates, but the target geometry type geopackage_polygon, can't have these. So the writer is deaggregating these features to let them fit in the target table. As an alternative, you can switch the target geometry type to geopackage_multipolygon.

Thank you for the help. I did not realise the Arcstroker would be of help with Polygons. Learned something new this day.


@mark2atsafe​ You are correct my memory tricked me. GeoPackage does accept nested aggregates, but it's QGIS can't handle them. Hence no errors in the log.

@bbo​ I see 4 unique messages in the log you posted:

OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_v' has geometry type 'geopackage_polygon' and cannot accept the current feature with a geometry of type 'geopackage_curvepolygon'. Skipping feature
 
OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_compoundcurve'. Skipping feature
 
OGCGEOPACKAGE writer: Feature type 'ARCGIS_ZWOLLE_DTZ_OBJ_VKV_dsg_l' has geometry type 'geopackage_linestring' and cannot accept the current feature with a geometry of type 'geopackage_circularstring'. Skipping feature

This tells you want to add geopackage_curvepolygon to a geopackage_polygon table. These features are becoming null geometries. You can fix this using a ArcStroker before the writer, which will stroke the arcs to lines.

 

On top of this, the source contains aggregates, but the target geometry type geopackage_polygon, can't have these. So the writer is deaggregating these features to let them fit in the target table. As an alternative, you can switch the target geometry type to geopackage_multipolygon.

You probably can do it also the other way around, using geopackage_curvepolygon, but then you need to find a way to change the not curved polygons. And not sure if it accepts aggregates either.


Reply