Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.
/ gdal-static-swift Public archive
forked from syngenta/gdal-swift

GDAL static library builded for ios platform, with swift binding

Notifications You must be signed in to change notification settings

cropio/gdal-static-swift

 
 

Repository files navigation

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

About

GDAL static library builded for ios platform, with swift binding

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 78.8%
  • Shell 18.6%
  • Ruby 2.6%