I am trying to export to a geojson file (to upload to Mapbox). Unfortunately, 5 out of my 736 features have a type of GeometryCollection. The remainder of the features are MultiPolygon and Polygon. Mapbox is unable to work with the GeometryCollection. I tried using a GeometryCoercer with the Geometry Type set to fme_multi, but all of the features go through the Untouched port. I also tried running the 5 through a GeometryRefiner. This converts 2 of the 5 to MultiPolygon, but I can't seem to get the remaining 3. I have been trying to figure out how to use the GeometryPartExtractor, but I can't seem to get the syntax correct (this is all quite new to me). I'm also wondering if my lack of understanding of the Geometry XQuery syntax is the reason I can't get the GeometryCoercer to work. If anyone has any experience with this, I would greatly appreciate the advice. Thank you.
Solved
How to convert GeometryCollection to MultiPolygon
Best answer by caracadrian
Try sending the 5 (3) geometries through Deaggregator, GeometryFilter for Area and then Aggregator to recreate MultiPolygons with GroupBy on a common attribute.
Also, inspect the non area features coming out of GeometryFilter to figure out the cause of the problem.
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.