GDAL is a translator library for raster and vector geospatial data formats that is released under an X/MIT style Open Source License by the Open Source Geospatial Foundation. As a library, it presents a single raster abstract data model and single vector abstract data model to the calling application for all supported formats. It also comes with a variety of useful command line utilities for data translation and processing. The NEWS page describes the January 2020 GDAL/OGR 3.0.4 release.
The AppVeyor file might be a good starting point for a a recipe for Visual Studio 2017. See https://github.com/OSGeo/gdal/blob/v3.0.4/appveyor.yml
GDAL 3.x depends on PROJ version 6 (source code of PROJ: https://github.com/OSGeo/PROJ)
Besides, it seems there are quite a bit of dependencies tied to the support of various GDAL drivers (a driver roughly corresponds to a file format, though some drivers may be gateways to many formats):
The recipe could possibly have options to decide which drivers to support.
There is also this where we can have a look at: https://github.com/osechet/conan-gdal
Gdal has a lot of optional dependencies (and transitive dependencies).
For the moment, here is what is missing in CCI to be able to create a proper recipe:
| library | url | PR |
|--------|----|----|
| proj | https://github.com/OSGeo/PROJ | https://github.com/conan-io/conan-center-index/pull/1272 |
| geos | https://trac.osgeo.org/geos | https://github.com/conan-io/conan-center-index/pull/829 |
| libgeotiff | https://github.com/OSGeo/libgeotiff | https://github.com/conan-io/conan-center-index/pull/1317 |
| libkml | https://github.com/libkml/libkml | https://github.com/conan-io/conan-center-index/pull/792 |
| cryptopp | https://cryptopp.com | https://github.com/conan-io/conan-center-index/pull/1724 |
| lerclib | https://github.com/Esri/lerc | https://github.com/conan-io/conan-center-index/pull/1159 |
| freexl | https://www.gaia-gis.it/fossil/freexl/index | https://github.com/conan-io/conan-center-index/pull/1846 |
| raslib | https://rasdaman.org | |
| libspatialite | https://www.gaia-gis.it/fossil/libspatialite/index | |
| rasterlite2 | https://www.gaia-gis.it/fossil/librasterlite2/index | |
| ogdi | https://github.com/libogdi/ogdi | |
| fyba | https://github.com/kartverket/fyba | |
| crunch | https://github.com/BinomialLLC/crunch | |
| netcdf-c | https://github.com/Unidata/netcdf-c | |
| kealib | http://kealib.org/ | |
| libbpg | https://bellard.org/bpg | |
| armadillo | http://arma.sourceforge.net | |
| tiledb | https://github.com/TileDB-Inc/TileDB | |
| cfitsio | https://heasarc.gsfc.nasa.gov/fitsio | https://github.com/conan-io/conan-center-index/pull/1121 |
| poppler | https://github.com/freedesktop/poppler | |
| podofo | https://sourceforge.net/projects/podofo | |
| pdfium | https://pdfium.googlesource.com/pdfium | |
| sfcgal | https://github.com/Oslandia/SFCGAL | |
| libopencad | https://github.com/sandyre/libopencad | |
| epsilon | https://sourceforge.net/projects/epsilon-project/ | |
| charls | https://github.com/team-charls/charls | https://github.com/conan-io/conan-center-index/pull/1039 |
| libdap | https://www.opendap.org/pub/source | |
| file-geodatabase-api | https://github.com/Esri/file-geodatabase-api | |
| opencl-headers | https://github.com/KhronosGroup/OpenCL-Headers/ | |
| qhull | https://github.com/qhull/qhull | https://github.com/conan-io/conan-center-index/pull/1728 |
| mongo-cxx-driver | https://github.com/mongodb/mongo-cxx-driver | |
| pcraster-rasterformat | https://github.com/pcraster/rasterformat | |
| hdf4 | https://portal.hdfgroup.org/display/support/Download+HDF4 | https://github.com/conan-io/conan-center-index/pull/1070 |
| mariadb-connector-c | https://github.com/mariadb-corporation/mariadb-connector-c | |
(+ their transitive -eventually optionals- dependencies: pnetcdf, lapack, libidn, nss, fontconfig, cairo...)
and maybe others... (I don't take into account close commercial libraries)
Thanks @SpaceIm,
From this post on the OSGeo wiki (5 years old though), it seems the GDAL can be configured to build with only a minimal set of drivers. It should help reducing the number of dependencies.
./configure \
--prefix=${PREFIX} \
--with-geos \
--with-geotiff=internal \
--with-hide-internal-symbols \
--with-libtiff=internal \
--with-libz=internal \
--with-threads \
--without-bsb \
--without-cfitsio \
--without-cryptopp \
--without-curl \
--without-dwgdirect \
--without-ecw \
--without-expat \
--without-fme \
--without-freexl \
--without-gif \
--without-gif \
--without-gnm \
--without-grass \
--without-grib \
--without-hdf4 \
--without-hdf5 \
--without-idb \
--without-ingres \
--without-jasper \
--without-jp2mrsid \
--without-jpeg \
--without-kakadu \
--without-libgrass \
--without-libkml \
--without-libtool \
--without-mrf \
--without-mrsid \
--without-mysql \
--without-netcdf \
--without-odbc \
--without-ogdi \
--without-openjpeg \
--without-pcidsk \
--without-pcraster \
--without-pcre \
--without-perl \
--without-pg \
--without-php \
--without-png \
--without-python \
--without-qhull \
--without-sde \
--without-sqlite3 \
--without-webp \
--without-xerces \
--without-xml2
There could be enough value in supporting only the drivers which dependencies are available in CCI or bincrafters, and increase the support later from there.
Now that PROJ is in CCI, GDAL can be packaged with available drivers. There is a nice configure.ac of ~6000 lines to check :sweat_smile:
@SpaceIm, nice! It does not seem so daunting anymore 馃槂
Well, after a first attempt of packaging, gdal configure.ac seems to be very fragile regarding dependencies (one of the first AC_CHECK_LIB fails on PROJ, probably because it doesn't rely on pkg_config to list PROJ dependencies).
It will take time.
I've made some progress.
I'm not too far from a working recipe for 3.1.0
Some conflicts in CCI need to be fixed because some recipes depends on different versions of the same dependency, that gdal can't override (because they are not direct dependencies).
Most helpful comment
Gdal has a lot of optional dependencies (and transitive dependencies).
For the moment, here is what is missing in CCI to be able to create a proper recipe:
| library | url | PR |
|--------|----|----|
| proj | https://github.com/OSGeo/PROJ | https://github.com/conan-io/conan-center-index/pull/1272 |
| geos | https://trac.osgeo.org/geos | https://github.com/conan-io/conan-center-index/pull/829 |
| libgeotiff | https://github.com/OSGeo/libgeotiff | https://github.com/conan-io/conan-center-index/pull/1317 |
| libkml | https://github.com/libkml/libkml | https://github.com/conan-io/conan-center-index/pull/792 |
| cryptopp | https://cryptopp.com | https://github.com/conan-io/conan-center-index/pull/1724 |
| lerclib | https://github.com/Esri/lerc | https://github.com/conan-io/conan-center-index/pull/1159 |
| freexl | https://www.gaia-gis.it/fossil/freexl/index | https://github.com/conan-io/conan-center-index/pull/1846 |
| raslib | https://rasdaman.org | |
| libspatialite | https://www.gaia-gis.it/fossil/libspatialite/index | |
| rasterlite2 | https://www.gaia-gis.it/fossil/librasterlite2/index | |
| ogdi | https://github.com/libogdi/ogdi | |
| fyba | https://github.com/kartverket/fyba | |
| crunch | https://github.com/BinomialLLC/crunch | |
| netcdf-c | https://github.com/Unidata/netcdf-c | |
| kealib | http://kealib.org/ | |
| libbpg | https://bellard.org/bpg | |
| armadillo | http://arma.sourceforge.net | |
| tiledb | https://github.com/TileDB-Inc/TileDB | |
| cfitsio | https://heasarc.gsfc.nasa.gov/fitsio | https://github.com/conan-io/conan-center-index/pull/1121 |
| poppler | https://github.com/freedesktop/poppler | |
| podofo | https://sourceforge.net/projects/podofo | |
| pdfium | https://pdfium.googlesource.com/pdfium | |
| sfcgal | https://github.com/Oslandia/SFCGAL | |
| libopencad | https://github.com/sandyre/libopencad | |
| epsilon | https://sourceforge.net/projects/epsilon-project/ | |
| charls | https://github.com/team-charls/charls | https://github.com/conan-io/conan-center-index/pull/1039 |
| libdap | https://www.opendap.org/pub/source | |
| file-geodatabase-api | https://github.com/Esri/file-geodatabase-api | |
| opencl-headers | https://github.com/KhronosGroup/OpenCL-Headers/ | |
| qhull | https://github.com/qhull/qhull | https://github.com/conan-io/conan-center-index/pull/1728 |
| mongo-cxx-driver | https://github.com/mongodb/mongo-cxx-driver | |
| pcraster-rasterformat | https://github.com/pcraster/rasterformat | |
| hdf4 | https://portal.hdfgroup.org/display/support/Download+HDF4 | https://github.com/conan-io/conan-center-index/pull/1070 |
| mariadb-connector-c | https://github.com/mariadb-corporation/mariadb-connector-c | |
(+ their transitive -eventually optionals- dependencies: pnetcdf, lapack, libidn, nss, fontconfig, cairo...)
and maybe others... (I don't take into account close commercial libraries)