Skip to content

Releases: Outdooractive/gis-tools

v1.11.0

18 Mar 09:52
fc20eea
Compare
Choose a tag to compare
  • Added withWindingOrder(:) and forceWindingOrder(:)
  • Added BoundingBox.position(of:) - position of a coordinate in relation to a bounding box
  • Added conversion shortcuts to Int and Double that convert some value to meters (like 10.kilometers or 2.feet)

v1.10.0

10 Mar 09:46
cbbb513
Compare
Choose a tag to compare
  • Added a shortcut to Coordinate3D: func mapTile(atZoom zoom: Int) -> MapTile

  • Added methods to GeometryCollection, MultiLineString, MultiPoint and MultiPolygon for adding/removing objects (like they already existed in FeatureCollection)

  • Improved bounding box handling

This version now not only updates bounding boxes for the outermost container object, but also updates the bounding boxes for all contained objects.

So, when you did this before:

let multiPolygon = MultiPolygon([...many polygons...])
let featureCollection = FeatureCollection([multiPolygon])
featureCollection.updateBoundingBox()

... only the bounding box of the featureCollection was updated which was a problem if you had e.g. a country MultiPolygon with many non-overlapping polygons and did many featureCollection.contains(coordinate) checks.
So if the coordinate was inside the FeatureCollection, all the polygons where still checked separately.

Now, updateBoundingBox() will also update the bounding boxes for contained objects in GeometryCollection, FeatureCollection , MultiLineString, MultiPoint and MultiPolygon which will speed up certain checks considerably.

v1.8.5

10 Jan 16:26
a84053b
Compare
Choose a tag to compare

Added rewind and rewinded to all GeoJson objects.

/// Returns the receiver with the outer ring counterclockwise and inner rings clockwise.

v1.8.3

12 Aug 15:07
a8118bc
Compare
Choose a tag to compare

Added MapTile(boundingBox:maxZoom:)

v1.8.2

30 Jul 09:09
98feada
Compare
Choose a tag to compare

Added FeatureCollection.propertiesSummary()

v1.8.1

29 Jul 15:31
32b933f
Compare
Choose a tag to compare
  • Bugfix: Holes in polygons where not subtracted from the outer ring area
  • Added FeatureCollection.enumerateProperties()

v1.8.0

25 Jul 12:42
8303092
Compare
Choose a tag to compare

Added GISTool.convertToDegrees(fromMeters:atLatitude:)

Also added GISTool.convertToCoordinate(fromPixelX:pixelY:atZoom:tileSideLength:projection:) and GISTool.metersPerPixel(atZoom:latitude:tileSideLength:) (they were in MapTile before)

v1.7.1

03 Jul 07:12
Compare
Choose a tag to compare

Add accessor for RFC compliant JSON in Coordinate3D

v1.7.0

02 Jul 12:24
831a87e
Compare
Choose a tag to compare

Always include the m value of Coordinate3D in JSON

The m value of Coordinate3D will now always be includeded in the JSON dump of a coordinate. This means that a null value will be added for the altitude if the coordinate's altitude is nil.

let coordinateM = Coordinate3D(latitude: 15.0, longitude: 10.0, altitude: nil, m: 1234)
let coordinateDataM = try JSONEncoder().encode(coordinateM)
print(String(data: coordinateDataM, encoding: .utf8)) // [10,15,null,1234]

v1.6.0

14 Jun 14:32
Compare
Choose a tag to compare
  • Some Swift 6 updates
  • Added BoundingBox.tileCover(atZoom:)
  • Added Identifiable conformance to Feature