Skip to content

Releases: mapbox/turf-swift

v2.0.0-alpha.3

22 Feb 22:25
Compare
Choose a tag to compare
v2.0.0-alpha.3 Pre-release
Pre-release

Changes since v2.0.0-alpha.2:

Packaging

  • Restored support for tvOS, watchOS, and Linux.
  • This library once is once again distributed as source code.
  • When installing this library using Carthage, Carthage builds it with library evolution enabled. (#134)

Other changes

  • Replaced the Linux-specific definitions of CLLocationCoordinate2D, CLLocationDirection, CLLocationDistance, and CLLocationDegrees with LocationCoordinate2D, LocationDirection, LocationDistance, and LocationDegrees, respectively. On Apple platforms, the new types remain type aliases, so you can continue to use the familiar CL-prefixed Core Location types unless you are writing cross-platform code that supports Linux. (#132)
  • Renamed BoundingBox(_:_:) to BoundingBox(southWest:northEast:). (#132)

v2.0.0-alpha.2

09 Feb 22:15
Compare
Choose a tag to compare
v2.0.0-alpha.2 Pre-release
Pre-release

v1.2.0

22 Jan 23:23
Compare
Choose a tag to compare

Changes since v1.1.0:

  • Application extensions can now link to Turf. (#126)
  • Added the Polygon(center:radius:vertices:) initializer for creating a regular polygon that approximates a circle. (#123)
  • Added the LineString.simplified(tolerance:highestQuality:) and LineString.simplify(tolerance:highestQuality:) methods that apply Ramer–Douglas–Peucker simplification. (#124)

v2.0.0-alpha.1

19 Jan 20:06
Compare
Choose a tag to compare
v2.0.0-alpha.1 Pre-release
Pre-release

This release is a wrapper that will serve v1.1.0 of Turf-Swift as a binary. This consumption is needed so that Swift Package Manager can use Turf Swift as a dynamic dependency.

v1.2.0-rc.1

14 Jan 23:28
Compare
Choose a tag to compare
v1.2.0-rc.1 Pre-release
Pre-release

Changes since v1.2.0-beta.1:

  • Application extensions can now link to Turf. (#126)

v1.2.0-beta.1

12 Dec 00:08
Compare
Choose a tag to compare
v1.2.0-beta.1 Pre-release
Pre-release

Changes since v1.1.0:

  • Added the Polygon(center:radius:vertices:) initializer for creating a regular polygon that approximates a circle. (#123)
  • Added the LineString.simplified(tolerance:highestQuality:) and LineString.simplify(tolerance:highestQuality:) methods that apply Ramer–Douglas–Peucker simplification. (#124)

v1.1.0

06 Nov 02:39
Compare
Choose a tag to compare

Changes since v1.0.0:

  • Added CLLocationCoordinate2D.latitude and CLLocationCoordinate2D.longitude properties and a CLLocationCoordinate2D(latitude:longitude:) initializer on Linux for consistency with Core Location on Apple platforms. (#120)

v1.0.0

24 Sep 22:17
Compare
Choose a tag to compare

Changes since v0.5.0:

  • Turf now requires iOS 10.0 or above, macOS 10.12.0 or above, tvOS 10.0 or above, or watchOS 3.0 or above to run. (#112)
  • Renamed Turf.intersection(_:_:) to intersection(_:_:), working around a compiler error. (#115)
  • Renamed GeoJSON.decodedFeatueCollection to GeoJSON.decodedFeatureCollection. (#111)

v0.5.0

11 Jun 15:12
985b4bd
Compare
Choose a tag to compare

Changes since v0.4.0:

GeoJSON Representations

  • Exposed all geometries structs coordinates editable (#105)
  • Added convenience initializers for Polygon and MultiPolygon geometries, as well as MultiPolygon.contains(_:ignoreBoundary:) method (#106)

Bugfixes

  • Fixed BoundingBox to store properties in accordance to GeoJSON RFC7946 (#104)
  • Fixed LineString.closesCoordinate(to:) returned IndexedCoordinate to have correct distance value (#107)

v0.4.0

05 Jun 08:09
bd5227e
Compare
Choose a tag to compare

Changes since v0.3.0:

Packaging

  • Migrated to Swift 5. (#83)

GeoJSON representation

  • Replaced the Geometry struct with an enumeration by the same name that has an associated value for each geometry type. (#93)
  • Removed the FeatureVariant enumeration and the series of geometry-specific feature structs such as PointFeature and LineStringFeature in favor of a single Feature struct. For example, instead of creating a PointFeature instance, create a Feature instance and set its Feature.geometry property to a Point instance. (#93)
  • Added the GeometryCollection struct to represent GeoJSON geometry collections. (#93)
  • Removed the JSONType protocol and AnyJSONType struct in favor of making [String: Any?] conform to the Codable protocol. (#95)
  • This library no longer provides Codable conformance for CLLocationCoordinate2D structs, since the appropriate precision may vary from one use case to another. (#96)
  • Removed Polyline as a type alias for LineString. (#93)
  • Added initializers for converting a MultiPolygon to a GeometryCollection, a Ring to a LineString, and a Polygon to a MultiLineString. (#99)

Spatial operations

  • Added the LineString.bezier(resolution:sharpness:) method for calculating a Bézier spline. (#73)
  • Added the mid(_:_:) function for calculating the point midway between two coordinates, taking the curvature of the Earth into account. (#75)
  • Fixed an issue where LineString.sliced(from:to:) duplicated the last coordinate if to is omitted or equal to the end of the line string. (#79)
  • Fixed an issue where Polygon.contains(_:ignoreBoundary:) returned false for coordinates on a boundary coinciding with the bounding box. (#90)
  • Fixed an issue where the Polygon.contains(_:ignoreBoundary:) misinterpreted the ignoreBoundary argument to result in the opposite behavior. (#90)