Reputation: 1
A Geotools/JTS MultiPolygon contains a list of geometries.
Do those geometries have to be Polygons, or could one of them be another MultiPolygon (or even something else)?
Same question also arises for MultiPoints and MultiLineStrings.
thx g
Upvotes: 0
Views: 110
Reputation: 10976
Possibly but it may cause unexpected problems down the line. It would be better to either "promote" your Polygon
s to MultiPolygon
s or make the List
hold Geometry
s (or possibly their common interface Polygonal
).
If you mix geometry types in a List
you will have problems writing them to most DataStore
s which expect a consistent data type.
Upvotes: 0