I'm building a flow that needs the total amount of (external) parts in a geometry feature. I need the total amount of parts from a single (thus 1) or multi-part (2+) feature for further statistical analysis. To get this i used the PartCounter that would give me the _part_count which returns the number of parts in the geometry. For multis and aggregates, this is the number of parts, and for paths, this is the number of segments. Otherwise, it is one.
I would expect that, when using this on a single feature (donut). It would return the value 1 but in the attached example, and all other donuts that i tried, it returns the total amount of donuts + total amount of external parts.
Would it be possible to get the partcount without the inner boundaries with another transformer without needing to fill the donutsholes with a DonuHoleFilter? or just get the outer boundary part count?
Filling the donuts is quite time and CPU consuming (example for 10k objects but sets with x million could also be processed and this would take several hours extra) :
28.6 seconds. (CPU: 27.3s user, 1.0s system) VS 1 minute 51.8 seconds. (CPU: 63.4s user, 22.6s system)
Problem in short:
Getting value 51 but would like to have value 1 (1 object, not the inner + outer boundaries).