BoundingBox mixes up its corners
1ec5 opened this issue · 0 comments
1ec5 commented
The BoundingBox
struct encodes and decodes northwest and southeast coordinates, in that order, whereas the GeoJSON specification expects southwest and northeast coordinates:
turf-swift/Sources/Turf/BoundingBox.swift
Lines 48 to 49 in bd5227e
If an application decodes GeoJSON, the in-memory representation is incorrect. If an application creates a BoundingBox
programmatically and encodes it to GeoJSON, the GeoJSON is incorrect.
BoundingBox
was probably copied from MapboxDirections’ CoordinateBounds
type, which was fixed in mapbox/mapbox-directions-swift#348.
/cc @mapbox/navigation-ios @frederoni