Releases: Outdooractive/gis-tools
Releases · Outdooractive/gis-tools
v1.0.0
v0.6.6
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.4
v0.5.3
v0.5.0
This release adds Codable support for all GeoJSON types:
let featureCollection = FeatureCollection([Point(Coordinate3D(latitude: 0.0, longitude: 100.0))])!
let data = try JSONEncoder().encode(featureCollection)
let fc = try JSONDecoder().decode(FeatureCollection.self, from: data)
It also adds a helper for loading unknown GeoJSONs:
let someGeoJson = GeoJsonReader.geoJsonFrom(jsonString: "{\"type\":\"Point\",\"coordinates\":[100.0,0.0]}")!
switch someGeoJson.type {
case .point: ...
}
// or
switch someGeoJson {
case let point as Point: ...
}
In general, I recommend to use the various FeatureCollection
initializers since they will wrap any valid GeoJSON object into a FeatureCollection
with which you can then work.
v0.4.0
Add support for GeoJSON Number Identifiers (thanks @sena-mike !)