2 stable releases

new 3.100.4 Feb 16, 2025
3.100.0 Feb 15, 2025

#45 in Geospatial

Download history 461/week @ 2025-02-11

461 downloads per month

Apache-2.0

1MB
25K SLoC

🌍 gdal-win

πŸ—ΊοΈ GDAL for Rust / Windows 🎯

gdal-win configures prebuilt GDAL libraries and bindings for Rust development on Windows. It automatically sets up GDAL binaries obtained from GISInternals and utilizes the GDAL Rust wrapper / bindings from georust/gdal.

✨ Features

  • ⚑ Precompiled GDAL binaries for Windows x64 from GISInternals.
  • πŸ¦€ Rust bindings to GDAL from georust/gdal.
  • πŸ”§ Automatically configures GDAL using gdal-setup internally.
  • πŸ› οΈ Simplifies GDAL setup for Rust developers on Windows.

πŸ“¦ Setup

Ensure you have Rust installed. You can then add gdal-win to your Rust project by including the following in your Cargo.toml:

[package]
name = "gdal-win-example"
version = "0.1.0"
edition = "2021"

[dependencies]
gdal-win = "*"

[build-dependencies]
gdal-setup = "*"

Ensure your project includes a build.rs file to set up GDAL automatically:

// build.rs
fn main() {
    gdal_setup::setup();
}

This will configure the necessary environment for GDAL during the build process, including setting up Static Libraries (gdal_i.lib) and DLLs.

πŸ”₯ Example Usage

Here is an example main.rs to get the GDAL version report:

use gdal_win::version::VersionInfo;

fn main() {
    let report = VersionInfo::version_report();
    println!("GDAL Version Report:\n{}", report);
}

More Examples: https://github.com/georust/gdal/tree/master/examples

πŸ–₯️ Compatibility

  • βœ… Tested and working on Windows x64.

πŸ“œ License

This project follows the licensing terms of georust/gdal and GDAL libraries from GISInternals.

πŸ’– Acknowledgments

  • πŸ¦€ GeoRust for maintaining the Rust GDAL bindings.
  • πŸŽ‰ GISInternals for providing Windows builds of GDAL.

🀝 Contributions & Issues

We welcome feature requests, bug reports, and improvements! Feel free to open an issue or submit a pull request. πŸš€

Dependencies

~3–13MB
~169K SLoC