MaxRev.Gdal.WindowsRuntime.Minimal
3.9.3.266
Prefix Reserved
See the version list below for details.
dotnet add package MaxRev.Gdal.WindowsRuntime.Minimal --version 3.9.3.266
NuGet\Install-Package MaxRev.Gdal.WindowsRuntime.Minimal -Version 3.9.3.266
<PackageReference Include="MaxRev.Gdal.WindowsRuntime.Minimal" Version="3.9.3.266" />
paket add MaxRev.Gdal.WindowsRuntime.Minimal --version 3.9.3.266
#r "nuget: MaxRev.Gdal.WindowsRuntime.Minimal, 3.9.3.266"
// Install MaxRev.Gdal.WindowsRuntime.Minimal as a Cake Addin #addin nuget:?package=MaxRev.Gdal.WindowsRuntime.Minimal&version=3.9.3.266 // Install MaxRev.Gdal.WindowsRuntime.Minimal as a Cake Tool #tool nuget:?package=MaxRev.Gdal.WindowsRuntime.Minimal&version=3.9.3.266
gdal.netcore
A simple (as is) build engine of GDAL library for .NET.
Provides a minimal setup without requirements to install heavy GDAL binaries into your system.
Packages (NuGet)
MaxRev.Gdal.Core <br>
MaxRev.Gdal.WindowsRuntime.Minimal <br>
MaxRev.Gdal.LinuxRuntime.Minimal <br>
MaxRev.Gdal.MacosRuntime.Minimal <br>
Table Of Contents
<details> <summary>Show</summary> <p>
- Packages (NuGet)
- Table Of Contents
- About this library
- How to use
- Supported runtimes
- Using GDAL functions
- Development
- How to compile on Windows
- How to compile on Unix
- About build configuration
- Building runtime libraries
- FAQ
- Q: Packages does not work on CentOS 7, Ubuntu 18.04
- Q: Can I compile it on Ubuntu or another Unix-based system?
- Q: Projections are not working as expected
- Q: Some drivers complain about missing data files
- Q: Missing {some} drivers, can you add more?
- Q: GDAL functions are not working as expected
- Q: Some types throw exceptions from SWIG on Windows
- Q: In some methods performance is slower on Unix
- Q: OSGeo.OGR.SpatialReference throws System.EntryPointNotFoundException exception
- Q: Packages does not work on MacOS Catalina or lower
- Q: The first run on MacOS is slow and takes more than 3 seconds
- Q: BadImageFormatException on Windows
- Q: Publishing the project with runtime packages
- About and Contacts
- Acknowledgements
<small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small>
</p> </details>
About this library
What is this library
- Only generates assemblies and binds everything into one package.
- Provides easy access to GDAL by installing only core and runtime package
- DOES NOT require installation of GDAL. From 3.7.0 version GDAL_DATA is also shipped. While it contains the
proj.db
database you may requireproj-data
grid shifts.
What is not
- Does not compile all drivers. Only configured, they are listed below. By default GDAL has a lot of internal drivers.
- Does not change GDAL source code.
- Does not extend GDAL methods.
How to use
Universal package
- Install universal package - MaxRev.Gdal.Universal. It references all runtime packages and the core package. They will be automatically installed during restore. Note that this may increase the size of your nuget cache.
dotnet add package MaxRev.Gdal.Universal
Separate core and runtime packages
- Install core package - MaxRev.Gdal.Core
dotnet add package MaxRev.Gdal.Core
- Install libraries for your runtime. You can install one of them or all with no conflicts. There is no requirement to install all of them or GDAL binaries. If you work on Windows and Linux you can skip MacOS package and vice versa.
# windows supported only for x64
dotnet add package MaxRev.Gdal.WindowsRuntime.Minimal
# install linux bundle which references both arm64 and x64 binaries
dotnet add package MaxRev.Gdal.LinuxRuntime.Minimal
# or install a specific runtime
dotnet add package MaxRev.Gdal.LinuxRuntime.Minimal.arm64
dotnet add package MaxRev.Gdal.LinuxRuntime.Minimal.x64
# install macos bundle which references both arm64 and x64 binaries
dotnet add package MaxRev.Gdal.MacosRuntime.Minimal
# or install a specific runtime
dotnet add package MaxRev.Gdal.MacosRuntime.Minimal.arm64
dotnet add package MaxRev.Gdal.MacosRuntime.Minimal.x64
Initialize libraries in runtime
using MaxRev.Gdal.Core;
// call it once, before using GDAL
// this will initialize all GDAL drivers and set PROJ6 shared library paths
GdalBase.ConfigureAll();
- Profit! Use it in ordinary flow. See the section below for more info.
Supported runtimes
- Windows x64 (.NET Framework 4.6.1+, .NET Standard 2.0+, .NET 6/7/8+)
- Linux x64/arm64 (.NET Framework 4.6.1+, .NET Standard 2.0+, .NET 6/7/8+)
- MacOS x64/arm64 (.NET Framework 4.6.1+, .NET Standard 2.0+, .NET 6/7/8+)
This means you can build .NET Framework applications on Linux/MacOS using Mono. Also, any project based on NET Standard 2.0 or higher can utilize this library.
Using GDAL functions
If you're struggling using GDAL functions. Here's a good place to start:
Development
How to compile on Windows
Enter win directory to find out how.
How to compile on Unix
Detailed guide is here - unix.
How to compile on macOS
Detailed guide is here - osx.
About build configuration
The package configuration is marked as minimal. That means you don't have to install GDAL binaries. Also, some uncommon drivers are not available (were not built).
Drivers included PROJ, GEOS, and more than 200 other drivers.
To view the complete list of drivers, see: tests/gdal-formats/supported_drivers.md.
NOTE: Runtime drivers availability may differ. Ask me about a specific driver for runtime. Please issue if I need to mention any packages.
Starting version 3.9.0 the packages can be compiled and run on .NET Framework 4.6.1+. The libraries and gdal-data will be automatically copied to the output directory. See tests/MaxRev.Gdal.Core.Tests.NetFramework for more info.
Building runtime libraries
Each runtime has to be build separately, but this can be done concurrently as they are using different contexts (build folders). Primary operating bindings (in gdal.core package) are build from windows. Still, the resulting core bindings are the same on each runtime package (OS).
To make everything work smoothly, each configuration targets the same drivers and their versions, respectively.
To start building for a specific runtime, see the README.md in a respective directory.
FAQ
Q: Packages does not work on CentOS 7, Ubuntu 18.04
A: These are old distros and are out of support (EOL). Use docker (see this Dockerfile how to package your app) or a newer distro (GLIBC 2.31+). Packages for older systems are difficult to maintain. From 3.6.x version the Debian 11 distro is used. See this for more info.
Q: Can I compile it on Ubuntu or another Unix-based system?
A: Yes, you can (see unix folder for readme). All you have to do, is to choose one of the latest distros like Ubuntu 22.04 or Debian 11 (recommended). From the 3.6.x version the Debian 11 distro is used by default. It was changed because of EOL of the previous distro (see answer above). Prior to 3.6.x version packages were built on CentOS - glibc of version 2.17. It's the lowest version (in my opinion) that suits all common systems (Ubuntu, Debian, Fedora).
Q: Projections are not working as expected
A: This package only contains the proj.db
database. Make sure you have installed proj-data
package. It contains aditional grid shifts and other data required for projections. Add path to your data folder with MaxRev.Gdal.Core.Proj.Configure()
. See this for more info.
Q: Some drivers complain about missing data files
A: This is related to the previous package versions (prior to 3.7.0). From 3.7.0 version, GDAL_DATA
folder is also shipped with core package.
Q: Missing {some} drivers, can you add more?
A: Feel free to contribute and I will help you you to add them. Here's the my additional answer.
Q: GDAL functions are not working as expected
A: Try to search an issue on github. In 98% of cases, they are working fine.
Q: Some types throw exceptions from SWIG on Windows
A: Yes, currently there are some redundant types in OGR namespace. This will be fixed in the next builds.
Q: In some methods performance is slower on Unix
A: Apparently, it's not a fault of the build engine. I did not face this issue and I use this packages in several production environments.
Q: OSGeo.OGR.SpatialReference throws System.EntryPointNotFoundException exception
A: That's a problem with swig bindings. Please, use SpatialReference type from OSR namespace. More info here and here.
Q: Packages does not work on MacOS Catalina or lower
A: The current version of packages was compiled on MacOS Ventura and 11.3 SDK respectively. Consider updating your system to at least MacOS 13. The systems that reached EOL (end-of-life) won't be supported.
Q: The first run on MacOS is slow and takes more than 3 seconds
A: It's a known issue related to the linking of the shared libraries. If you find any solution/workaround, please let me know.
Currently, linker tries to find all shared libraries in the @loader_path/
. It should point to the executable directory.
Q: BadImageFormatException on Windows
A: Ensure that you are using the same architecture for your project and the runtime package. If you are using AnyCPU, you should use only the x64 runtime package. See the sample project for details in tests/MaxRev.Gdal.Core.Tests.NetFramework.
Q: Publishing the project with runtime packages
A: There are several ways to publish. One important thing to keep in mind, that you have to ensure the output folder contains either runtimes/<os>-<arch>/native
path, gdal-data
folder and maxrev.gdal.core.libshared/proj.db
. In most cases this should be handled automatically by dotnet. Usually, we release a runtime-dependent binary. The end user will have to install the .NET runtime, but the size of the app will be small and the build time is faster. Otherwise, you can publish a self-contained app which will include all required .NET runtime libraries. More details on publishing can be found here. Also, see the sample dockerized project for details in tests/MaxRev.Gdal.Core.Tests/Dockerfile.
About and Contacts
This work is based on GDAL and GDAL bindings by jgoday.
Contact me in Telegram - MaxRev.
Enjoy!
Acknowledgements
As the maintainer of this repository, I want to express my heartfelt thanks to Verge Agriculture Inc.. They generously provided the necessary resources that made compiling the macOS bindings and the latest versions of GDAL possible.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.1
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on MaxRev.Gdal.WindowsRuntime.Minimal:
Package | Downloads |
---|---|
MaxRev.Gdal.Universal
GDAL (3.10.0) minimal libraries package. Drivers included PROJ (9.5.0), GEOS, SQLITE3, CURL, JPEG, PNG, HDF4, HDF5, and others. Targets linux-arm64 runtime. Target Frameworks: netstandard[2.1|2.0], netframework 4.6.1+, net6.0, net7.0, net8.0 |
|
AsGeo
Package Description |
|
BP70.Models
Package Description |
|
LgkProductions.Geo.Gdal
Package Description |
|
ZhunWang.DJI.KMZ.Core
大疆KMZ航线工具 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
3.10.0.306 | 1,793 | 11/13/2024 | |
3.10.0.296 | 1,280 | 11/7/2024 | |
3.9.3.292 | 292 | 11/7/2024 | |
3.9.3.287 | 200 | 11/7/2024 | |
3.9.3.266 | 277 | 11/5/2024 | |
3.9.2.271 | 126 | 11/6/2024 | |
3.9.2.259 | 200 | 11/5/2024 | |
3.9.1.247 | 28,651 | 8/14/2024 | |
3.9.1.244 | 2,289 | 8/11/2024 | |
3.9.1.242 | 233 | 8/10/2024 | |
3.9.1.240 | 233 | 8/9/2024 | |
3.9.0.218 | 11,333 | 6/14/2024 | |
3.8.3.259 | 70,539 | 1/26/2024 | |
3.7.0.100 | 72,993 | 5/12/2023 | |
3.6.4.400 | 6,441 | 5/11/2023 | |
3.6.4.100 | 1,104 | 5/6/2023 | |
3.6.3.100 | 958 | 5/2/2023 | |
3.6.2.200 | 2,296 | 5/2/2023 | |
3.6.1.110 | 66,086 | 12/27/2022 | |
3.6.1.100 | 877 | 12/22/2022 | |
3.6.0.100 | 1,611 | 12/12/2022 | |
3.3.3.110 | 121,760 | 1/5/2022 | |
3.2.0.310 | 15,554 | 10/25/2021 | |
3.2.0.300 | 73,087 | 3/7/2021 | |
3.2.0.250 | 57,409 | 1/4/2021 | |
3.2.0.200 | 1,123 | 12/16/2020 | |
3.2.0.110 | 635 | 12/12/2020 | |
3.2.0.100 | 613 | 12/12/2020 | |
3.1.2.110 | 936 | 12/5/2020 | |
3.1.0.100 | 30,231 | 6/30/2020 | |
3.0.1.35 | 18,287 | 12/28/2019 | |
3.0.1.30 | 530 | 12/26/2019 | |
3.0.1.25 | 4,697 | 10/20/2019 | |
3.0.1.2 | 599 | 10/10/2019 | |
3.0.0.4 | 1,938 | 7/20/2019 | |
3.0.0.1 | 577 | 6/26/2019 | |
3.0.0 | 732 | 6/26/2019 |
- GDAL 3.9.3
- PROJ 9.5.0
- GEOS 3.13.0