Skip to main content
Solved

Geometry Missing in Clipped Output when Writing to GeoPackage in FME

  • October 29, 2024
  • 7 replies
  • 177 views

jugoslaviaa
Enthusiast
Forum|alt.badge.img+6

I am working with a table from a GeoPackage in FME, reading it and clipping based on intersections between categories. When writing the output, the unclipped parts are successfully written to Writer 1 without any issues in the output GeoPackage. However, the clipped parts are written without geometry, even though I can see the attributes correctly in the visual preview on the attribute expose just before writting. 

I'm confident that I’ve set the geometry type correctly in the writer. What could I be missing here?

 

 

 

 

Best answer by nielsgerrits

Hard to say without seeing the geometries, but I suspect that the way the geometries are clipped, the outside featrue has 2 geometry parts. If the clippee is a horizontal bar and the clipper a vertical bar, the outside result is one feature with two geometry parts. That is an aggregate.

I think QGIS does support multipolygons, but it might be possible the aggregate created by the clipper is not the type of aggregate QGIS can handle. But I think it is possible to recreate the aggrgate in the way QGIS likes them using deaggregators and aggregators.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

nielsgerrits
VIP
Forum|alt.badge.img+62

This should just work as expected. Can you confirm the writer type is OGC GeoPackage? How do you check the result, have you opened the geopackage in QGIS?


jugoslaviaa
Enthusiast
Forum|alt.badge.img+6
  • Author
  • Enthusiast
  • October 29, 2024

@nielsgerrits This is my writer. I have opened it in QGIS and i cannot see the geometry only the attribute 

 

 


jugoslaviaa
Enthusiast
Forum|alt.badge.img+6
  • Author
  • Enthusiast
  • October 29, 2024

@nielsgerrits  I used the GeometryExtractor and saw that after clipping, the geometry type became a GeometryCollection. I then used the Deaggregator after clipping, and the problem is now solved.


nielsgerrits
VIP
Forum|alt.badge.img+62

@nielsgerrits  I used the GeometryExtractor and saw that after clipping, the geometry type became a GeometryCollection. I then used the Deaggregator after clipping, and the problem is now solved.

Ah yes geometrycollections and QGIS. 


jugoslaviaa
Enthusiast
Forum|alt.badge.img+6
  • Author
  • Enthusiast
  • October 29, 2024

@nielsgerrits why does clipper cause this? Do you know? 


nielsgerrits
VIP
Forum|alt.badge.img+62
  • Best Answer
  • October 29, 2024

Hard to say without seeing the geometries, but I suspect that the way the geometries are clipped, the outside featrue has 2 geometry parts. If the clippee is a horizontal bar and the clipper a vertical bar, the outside result is one feature with two geometry parts. That is an aggregate.

I think QGIS does support multipolygons, but it might be possible the aggregate created by the clipper is not the type of aggregate QGIS can handle. But I think it is possible to recreate the aggrgate in the way QGIS likes them using deaggregators and aggregators.


s.jager
Influencer
Forum|alt.badge.img+22
  • Influencer
  • October 29, 2024

QGIS does support multipolygons

It does. But it has to be a proper MultiPolygon, consisting ONLY of proper polygons (possibly with holes and islands). But a lot of databases, storage solutions and applications do not like Geometry Collections. It’s a subtle difference, but it does prevent from writing quite often. I’ve been bitten by this one as well. For FME it is the safe option, since you can’t be 100% sure what types of geometry result, but in the more strict applications/databases it can cause a refusal to store/display/deal with the result. So the safest way is to use a GeometryFilter before re-aggregating geometries.