mapbox/turf-swift

Associated-value enumeration should be for geometries, not features

1ec5 opened this issue · 1 comments

1ec5 commented

The GeoJSON model types in this library currently mirror the shape classes in the map SDK, which are inconsistent with the GeoJSON specification in several significant ways. In particular, there are multiple feature structs, one for each geometry type, and no single type unifies the various geometry types. Aside from nonconformance with GeoJSON, this approach makes it difficult to support GeometryCollection (#89).

  • Replace the FeatureVariant associated-value enumeration with a single struct Feature that contains a Geometry
  • Replace the Geometry struct with an associated-value enumeration
  • Remove the various *Feature structs in favor of Feature

/ref mapbox/mapbox-gl-native#7454
/cc @mapbox/navigation-ios @frederoni

1ec5 commented

Fixed by #93.