mapbox/turf-swift

Missing GeometryCollection support

bryanrahn opened this issue · 3 comments

Will this be supported eventually, or was it intentionally left out?

1ec5 commented

Looks like it was an oversight. This library definitely needs to support all the types specified in the GeoJSON specification; otherwise, it could fail to decode perfectly valid GeoJSON.

Exactly; I'm seeing FeatureCollectionTests fail if I swap out it's geoJSON file with one that has GeometryCollection. @1ec5 do you have any idea how when this might be supported?

1ec5 commented

I took a quick look at it, but it looks like it’s going to be difficult to implement GeometryCollection until we revamp the GeoJSON model objects in #91. Otherwise, the fact that there’s no single type representing all geometries means it’s very awkward to represent GeometryCollection’s heterogeneous collection of geometries, a particular problem when it comes to conforming to Equatable.