dartclub / geotypes

MIT License
1 stars 1 forks source link

Support nested GeometryCollections #5

Open jsiedentop opened 8 months ago

jsiedentop commented 8 months ago

as described here

To maximize interoperability, implementations SHOULD avoid nested GeometryCollections. Furthermore, GeometryCollections composed of a single part or a number of parts of a single type SHOULD be avoided when that single part or a single object of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could be used instead.

Related to the RFC, nested GeometryCollections are supported. I think this is something we should support in the future. To meet the SHOULD AVOID, this could be a linter warning and we provide a quick fix for this case. This strategy could allow the user to decide for themselves how they want to handle this case.

In case of turf, we would be strict and handle the warning as an error (as it is already handled in the current implementation).