15 releases (breaking)

0.10.0 Oct 8, 2021
0.8.0 Apr 27, 2021
0.7.2 Jan 5, 2021
0.7.0 Dec 19, 2020
0.0.1 Jan 21, 2015

#4 in #geospatial

Download history 187/week @ 2021-07-06 218/week @ 2021-07-13 250/week @ 2021-07-20 532/week @ 2021-07-27 312/week @ 2021-08-03 419/week @ 2021-08-10 347/week @ 2021-08-17 603/week @ 2021-08-24 587/week @ 2021-08-31 879/week @ 2021-09-07 796/week @ 2021-09-14 572/week @ 2021-09-21 511/week @ 2021-09-28 505/week @ 2021-10-05 443/week @ 2021-10-12 355/week @ 2021-10-19

2,108 downloads per month
Used in less than 6 crates

MIT license

2MB
66K SLoC

gdal

Documentation Build Status

GDAL bindings for Rust.

So far, you can:

  • open a raster dataset for reading/writing
  • get size and number of bands
  • get/set projection and geo-transform
  • read and write raster data
  • warp between datasets
  • read and write vector data
  • access metadata

Many raster and vector functions are not available. Patches welcome :)


lib.rs:

GDAL bindings for Rust.

A high-level API to access the GDAL library, for vector and raster data.

Use

use std::path::Path;
use gdal::Dataset;

let dataset = Dataset::open(Path::new("fixtures/roads.geojson")).unwrap();
let mut layer = dataset.layer(0).unwrap();
for feature in layer.features() {
    let highway_field = feature.field("highway").unwrap().unwrap();
    let geometry = feature.geometry();
    println!("{} {}", highway_field.into_string().unwrap(), geometry.wkt().unwrap());
}

Dependencies

~0.6–1.7MB
~35K SLoC