Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Latest commit

 

History

History
63 lines (47 loc) · 1.83 KB

README.md

File metadata and controls

63 lines (47 loc) · 1.83 KB

gdal-static-swift

Build Status codecov Maintainability

This is GDAL static library builded for ios platform, with swift binding

This library moved to https://github.com/syngenta/gdal-swift

Installation

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'

TileProvider

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)
}

Demo

For running Demo run commands:

cd Demo
pod install

GDAL static library compilation

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