This is GDAL static library builded for ios platform, with swift binding
This library moved to https://github.com/syngenta/gdal-swift
For installation GDAL you can use cocoapods
pod 'gdal-swift-static'
For using pods you need to add custom source
source 'https://github.com/cropio/cocoapods-specs.git'
Class for getting tiles from visual and NDVI tif files
let provider = TileProvider()
guard let path = Bundle.main.path(forResource: "file", ofType: "tif") else {
return
}
let coordinates = TileCoordinates(x: 19747, y: 11083, z: 15)
do {
// tileSize by default 256
let data = try provider.visible(path: path, coordinates: coordinates, tileSize: 256)
print(data) // tile in Data type
} catch let error {
print(error)
}
For running Demo run commands:
cd Demo
pod install
For compilation gdal static library run this commands:
cd gdal-buld
./build-gdal-combined-lib.sh
After success compilation you will found gdal.xcframework in folder.
For using gdal with static framework you need to copy gdal parts (gdal-buld/parts) to Sources/gdal/lib
Run this script for copy parts (Old parts will be removed)
./copy_parts.sh