Skip to main content
2 of 2
added 50 characters in body
Andrea Aime
  • 17.7k
  • 1
  • 20
  • 29

If you cannot code in Java I'm afraid there are no solutions, unless the multi-geometry structure is regular, for example, if there are always 3 sub-geometries, then you can use getGeometryN and test its type in 3 different rules, summing up to 9 separate rules (one with a filter testing point for geometry 1, one for testing line for geometry 1, and so on).

If you can code in Java, then you could easily write a filter function that returns a multi-X geometry of the chosen type, e.g., given a geometry collection return a multipoint (the subset of points in the original collection), or a multiline, or a multipolygon. Then you can have only 3 rules working against geometry collections of whatever size, and styling the specific geometry subset accordingly.

See this tutorial on how to write functions: https://docs.geotools.org/latest/userguide/tutorial/function.html

Andrea Aime
  • 17.7k
  • 1
  • 20
  • 29