* update gdal to 3.9.1-1
This commit is contained in:
parent
b4fbb0865c
commit
4012ba16e7
108
gdal/.SRCINFO
Normal file
108
gdal/.SRCINFO
Normal file
@ -0,0 +1,108 @@
|
||||
pkgbase = gdal
|
||||
pkgdesc = A translator library for raster and vector geospatial data formats
|
||||
pkgver = 3.9.0
|
||||
pkgrel = 4
|
||||
url = https://gdal.org/
|
||||
changelog = gdal.changelog
|
||||
arch = x86_64
|
||||
license = custom
|
||||
makedepends = cmake
|
||||
makedepends = opencl-headers
|
||||
makedepends = python-setuptools
|
||||
makedepends = python-numpy
|
||||
makedepends = proj
|
||||
makedepends = arrow
|
||||
makedepends = blosc
|
||||
makedepends = cfitsio
|
||||
makedepends = curl
|
||||
makedepends = crypto++
|
||||
makedepends = libdeflate
|
||||
makedepends = expat
|
||||
makedepends = libfreexl
|
||||
makedepends = libgeotiff
|
||||
makedepends = geos
|
||||
makedepends = giflib
|
||||
makedepends = libheif
|
||||
makedepends = hdf5
|
||||
makedepends = libjpeg-turbo
|
||||
makedepends = json-c
|
||||
makedepends = libjxl
|
||||
makedepends = xz
|
||||
makedepends = libxml2
|
||||
makedepends = lz4
|
||||
makedepends = mariadb-libs
|
||||
makedepends = netcdf
|
||||
makedepends = unixodbc
|
||||
makedepends = ocl-icd
|
||||
makedepends = openexr
|
||||
makedepends = openjpeg2
|
||||
makedepends = openssl
|
||||
makedepends = pcre2
|
||||
makedepends = libpng
|
||||
makedepends = podofo
|
||||
makedepends = poppler
|
||||
makedepends = postgresql-libs
|
||||
makedepends = qhull
|
||||
makedepends = libspatialite
|
||||
makedepends = sqlite
|
||||
makedepends = swig
|
||||
makedepends = libtiff
|
||||
makedepends = libwebp
|
||||
makedepends = xerces-c
|
||||
makedepends = zlib
|
||||
makedepends = zstd
|
||||
makedepends = libaec
|
||||
source = https://download.osgeo.org/gdal/3.9.0/gdal-3.9.0.tar.xz
|
||||
source = https://github.com/OSGeo/gdal/commit/7b526b12.patch
|
||||
source = https://github.com/OSGeo/gdal/commit/f80f32bf.patch
|
||||
b2sums = 5b1453b889768359d36c6da435b27f6d31bb1ba95cecfd05d525d63258100705778d2675219711d0c2ab0e2392dd0eabffa1af3ffd055ebfc14840aaa1e768c0
|
||||
b2sums = 801eb649c20ef81d7590888589d4049eab4505fac6efbe1718d8bc9e01a35390b9d8cad090c3421ff90d769fe3f5aec4d1641409ecc5a434ba68c4c5d30eec85
|
||||
b2sums = 44efbd94544eea4c82373631d3068b61d6fa5b0f2851c4a87b16d3edb4edd98f331483be58c17e012ecc5aee140da1c6f74d5a5ea766fd1d7316e0ad9e288b0e
|
||||
|
||||
pkgname = gdal
|
||||
depends = proj
|
||||
depends = blosc
|
||||
depends = crypto++
|
||||
depends = curl
|
||||
depends = libdeflate
|
||||
depends = expat
|
||||
depends = libfreexl
|
||||
depends = geos
|
||||
depends = libgeotiff
|
||||
depends = giflib
|
||||
depends = libjpeg-turbo
|
||||
depends = json-c
|
||||
depends = xz
|
||||
depends = libxml2
|
||||
depends = lz4
|
||||
depends = unixodbc
|
||||
depends = ocl-icd
|
||||
depends = openssl
|
||||
depends = pcre2
|
||||
depends = libpng
|
||||
depends = qhull
|
||||
depends = libspatialite
|
||||
depends = sqlite
|
||||
depends = libtiff
|
||||
depends = xerces-c
|
||||
depends = zlib
|
||||
depends = zstd
|
||||
depends = libaec
|
||||
optdepends = arrow: Arrow/Parquet support
|
||||
optdepends = cfitsio: FITS support
|
||||
optdepends = hdf5: HDF5 support
|
||||
optdepends = libheif: HEIF support
|
||||
optdepends = libjxl: JPEG XL support
|
||||
optdepends = mariadb-libs: MySQL support
|
||||
optdepends = netcdf: netCDF support
|
||||
optdepends = openexr: EXR support
|
||||
optdepends = openjpeg2: JP2 support
|
||||
optdepends = podofo: PDF support
|
||||
optdepends = poppler: PDF support
|
||||
optdepends = postgresql-libs: PostgreSQL support
|
||||
optdepends = libwebp: WebP support
|
||||
|
||||
pkgname = python-gdal
|
||||
pkgdesc = Python bindings for GDAL
|
||||
depends = gdal=3.9.0
|
||||
depends = python-numpy
|
@ -6,8 +6,8 @@
|
||||
|
||||
pkgbase=gdal
|
||||
pkgname=(gdal python-gdal)
|
||||
pkgver=3.8.5
|
||||
pkgrel=6
|
||||
pkgver=3.9.1
|
||||
pkgrel=1
|
||||
pkgdesc="A translator library for raster and vector geospatial data formats"
|
||||
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
||||
url="https://gdal.org/"
|
||||
@ -22,12 +22,13 @@ makedepends=(cmake opencl-headers python-setuptools python-numpy
|
||||
# ogdi
|
||||
changelog=$pkgbase.changelog
|
||||
source=(https://download.osgeo.org/${pkgbase}/${pkgver}/${pkgbase}-${pkgver}.tar.xz
|
||||
https://github.com/OSGeo/gdal/commit/7b526b12.patch)
|
||||
b2sums=('2c5f9b3fa1c3d5d7879c2aa1c95f82c6360b35a259443a8ad68ff8f471f4efa8d2fd7935c57317ee5e94789244067706967f9c5df413bccd2556b5790d51d349'
|
||||
'801eb649c20ef81d7590888589d4049eab4505fac6efbe1718d8bc9e01a35390b9d8cad090c3421ff90d769fe3f5aec4d1641409ecc5a434ba68c4c5d30eec85')
|
||||
netcdf-4.9.2.patch)
|
||||
b2sums=('a9c5c20b1bc704a331ea54f1575f655197075dde75fa6144cff43763d57d64b9bd6e3c7a40bedb919567b45185688b206a3cc13278d0605c5be0b895b403bbab'
|
||||
'266936f1be9788191ed549402c13093fdddbdd0d82c7ddb9a650c716f2a82eefd96de38b2dd9f9802da11c88f6318a4a0fd7e428c5e2e45aa10d388b69b67307')
|
||||
|
||||
prepare() {
|
||||
patch -d $pkgbase-$pkgver -p1 < 7b526b12.patch # Fix build with C++20
|
||||
cd $pkgname-$pkgver
|
||||
patch -Np1 -i ${srcdir}/netcdf-4.9.2.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
@ -88,7 +89,7 @@ build() {
|
||||
-DGDAL_USE_WEBP=ON \
|
||||
-DGDAL_USE_XERCESC=ON \
|
||||
-DGDAL_USE_ZLIB=ON \
|
||||
-DGDAL_USE_ZSTD=ON
|
||||
-DGDAL_USE_ZSTD=ON ${_cmake_options[@]}
|
||||
make -C build
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
2021-05-08 Jaroslav Lichtblau <svetlemodry@archlinux.org>
|
||||
* gdal 3.2.3-1
|
||||
|
||||
2020-01-30 Evangelos Foutras <evangelos@foutrelis.com>
|
||||
2020-01-30 Evangelos Foutras <foutrelis@archlinux.org>
|
||||
* gdal 3.0.4-1
|
||||
|
||||
2020-01-25 Jaroslav Lichtblau <svetlemodry@archlinux.org>
|
||||
@ -102,7 +102,7 @@
|
||||
2014-12-22 Jaroslav Lichtblau <svetlemodry@archlinux.org>
|
||||
* gdal 1.11.1-5 FS#43193 fix
|
||||
|
||||
2014-12-20 Evangelos Foutras <evangelos@foutrelis.com>
|
||||
2014-12-20 Evangelos Foutras <foutrelis@archlinux.org>
|
||||
* gdal 1.11.1-4 poppler 0.29.0 rebuild
|
||||
|
||||
2014-11-25 Jaroslav Lichtblau <svetlemodry@archlinux.org>
|
||||
|
257
gdal/netcdf-4.9.2.patch
Normal file
257
gdal/netcdf-4.9.2.patch
Normal file
@ -0,0 +1,257 @@
|
||||
--- gdal-3.9.1/frmts/netcdf/netcdfdataset.cpp.orig 2024-07-27 14:15:00.137501386 +0200
|
||||
+++ gdal-3.9.1/frmts/netcdf/netcdfdataset.cpp 2024-07-27 14:17:44.537204901 +0200
|
||||
@@ -451,11 +451,11 @@
|
||||
size_t attlen = 0;
|
||||
const char *pszNoValueName = nullptr;
|
||||
|
||||
- // Find attribute name, either _FillValue or missing_value.
|
||||
- int status = nc_inq_att(cdfid, nZId, _FillValue, &atttype, &attlen);
|
||||
+ // Find attribute name, either NC_FillValue or missing_value.
|
||||
+ int status = nc_inq_att(cdfid, nZId, NC_FillValue, &atttype, &attlen);
|
||||
if (status == NC_NOERR)
|
||||
{
|
||||
- pszNoValueName = _FillValue;
|
||||
+ pszNoValueName = NC_FillValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1172,7 +1172,7 @@
|
||||
|
||||
const char *const papszIgnoreBand[] = {
|
||||
CF_ADD_OFFSET, CF_SCALE_FACTOR, "valid_range", "_Unsigned",
|
||||
- _FillValue, "coordinates", nullptr};
|
||||
+ NC_FillValue, "coordinates", nullptr};
|
||||
// Do not copy varname, stats, NETCDF_DIM_*, nodata
|
||||
// and items in papszIgnoreBand.
|
||||
if (STARTS_WITH(pszName, "NETCDF_VARNAME") ||
|
||||
@@ -1462,7 +1462,7 @@
|
||||
// Write value if in update mode.
|
||||
if (poDS->GetAccess() == GA_Update)
|
||||
{
|
||||
- // netcdf-4 does not allow to set _FillValue after leaving define mode,
|
||||
+ // netcdf-4 does not allow to set NC_FillValue after leaving define mode,
|
||||
// but it is ok if variable has not been written to, so only print
|
||||
// debug. See bug #4484.
|
||||
if (m_bNoDataSet &&
|
||||
@@ -1490,33 +1490,33 @@
|
||||
if (bSignedData)
|
||||
{
|
||||
signed char cNoDataValue = static_cast<signed char>(dfNoData);
|
||||
- status = nc_put_att_schar(cdfid, nZId, _FillValue, nc_datatype,
|
||||
+ status = nc_put_att_schar(cdfid, nZId, NC_FillValue, nc_datatype,
|
||||
1, &cNoDataValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
const unsigned char ucNoDataValue =
|
||||
static_cast<unsigned char>(dfNoData);
|
||||
- status = nc_put_att_uchar(cdfid, nZId, _FillValue, nc_datatype,
|
||||
+ status = nc_put_att_uchar(cdfid, nZId, NC_FillValue, nc_datatype,
|
||||
1, &ucNoDataValue);
|
||||
}
|
||||
}
|
||||
else if (eDataType == GDT_Int16)
|
||||
{
|
||||
short nsNoDataValue = static_cast<short>(dfNoData);
|
||||
- status = nc_put_att_short(cdfid, nZId, _FillValue, nc_datatype, 1,
|
||||
+ status = nc_put_att_short(cdfid, nZId, NC_FillValue, nc_datatype, 1,
|
||||
&nsNoDataValue);
|
||||
}
|
||||
else if (eDataType == GDT_Int32)
|
||||
{
|
||||
int nNoDataValue = static_cast<int>(dfNoData);
|
||||
- status = nc_put_att_int(cdfid, nZId, _FillValue, nc_datatype, 1,
|
||||
+ status = nc_put_att_int(cdfid, nZId, NC_FillValue, nc_datatype, 1,
|
||||
&nNoDataValue);
|
||||
}
|
||||
else if (eDataType == GDT_Float32)
|
||||
{
|
||||
float fNoDataValue = static_cast<float>(dfNoData);
|
||||
- status = nc_put_att_float(cdfid, nZId, _FillValue, nc_datatype, 1,
|
||||
+ status = nc_put_att_float(cdfid, nZId, NC_FillValue, nc_datatype, 1,
|
||||
&fNoDataValue);
|
||||
}
|
||||
else if (eDataType == GDT_UInt16 &&
|
||||
@@ -1525,7 +1525,7 @@
|
||||
{
|
||||
unsigned short usNoDataValue =
|
||||
static_cast<unsigned short>(dfNoData);
|
||||
- status = nc_put_att_ushort(cdfid, nZId, _FillValue, nc_datatype, 1,
|
||||
+ status = nc_put_att_ushort(cdfid, nZId, NC_FillValue, nc_datatype, 1,
|
||||
&usNoDataValue);
|
||||
}
|
||||
else if (eDataType == GDT_UInt32 &&
|
||||
@@ -1533,12 +1533,12 @@
|
||||
NCDF_FORMAT_NC4)
|
||||
{
|
||||
unsigned int unNoDataValue = static_cast<unsigned int>(dfNoData);
|
||||
- status = nc_put_att_uint(cdfid, nZId, _FillValue, nc_datatype, 1,
|
||||
+ status = nc_put_att_uint(cdfid, nZId, NC_FillValue, nc_datatype, 1,
|
||||
&unNoDataValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
- status = nc_put_att_double(cdfid, nZId, _FillValue, nc_datatype, 1,
|
||||
+ status = nc_put_att_double(cdfid, nZId, NC_FillValue, nc_datatype, 1,
|
||||
&dfNoData);
|
||||
}
|
||||
|
||||
@@ -1586,7 +1586,7 @@
|
||||
// Write value if in update mode.
|
||||
if (poDS->GetAccess() == GA_Update)
|
||||
{
|
||||
- // netcdf-4 does not allow to set _FillValue after leaving define mode,
|
||||
+ // netcdf-4 does not allow to set NC_FillValue after leaving define mode,
|
||||
// but it is ok if variable has not been written to, so only print
|
||||
// debug. See bug #4484.
|
||||
if (m_bNoDataSetAsInt64 &&
|
||||
@@ -1616,13 +1616,13 @@
|
||||
reinterpret_cast<netCDFDataset *>(poDS)->eFormat == NCDF_FORMAT_NC4)
|
||||
{
|
||||
long long tmp = static_cast<long long>(nNoData);
|
||||
- status = nc_put_att_longlong(cdfid, nZId, _FillValue, nc_datatype,
|
||||
+ status = nc_put_att_longlong(cdfid, nZId, NC_FillValue, nc_datatype,
|
||||
1, &tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
double dfNoData = static_cast<double>(nNoData);
|
||||
- status = nc_put_att_double(cdfid, nZId, _FillValue, nc_datatype, 1,
|
||||
+ status = nc_put_att_double(cdfid, nZId, NC_FillValue, nc_datatype, 1,
|
||||
&dfNoData);
|
||||
}
|
||||
|
||||
@@ -1670,7 +1670,7 @@
|
||||
// Write value if in update mode.
|
||||
if (poDS->GetAccess() == GA_Update)
|
||||
{
|
||||
- // netcdf-4 does not allow to set _FillValue after leaving define mode,
|
||||
+ // netcdf-4 does not allow to set NC_FillValue after leaving define mode,
|
||||
// but it is ok if variable has not been written to, so only print
|
||||
// debug. See bug #4484.
|
||||
if (m_bNoDataSetAsUInt64 &&
|
||||
@@ -1700,13 +1700,13 @@
|
||||
reinterpret_cast<netCDFDataset *>(poDS)->eFormat == NCDF_FORMAT_NC4)
|
||||
{
|
||||
unsigned long long tmp = static_cast<long long>(nNoData);
|
||||
- status = nc_put_att_ulonglong(cdfid, nZId, _FillValue, nc_datatype,
|
||||
+ status = nc_put_att_ulonglong(cdfid, nZId, NC_FillValue, nc_datatype,
|
||||
1, &tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
double dfNoData = static_cast<double>(nNoData);
|
||||
- status = nc_put_att_double(cdfid, nZId, _FillValue, nc_datatype, 1,
|
||||
+ status = nc_put_att_double(cdfid, nZId, NC_FillValue, nc_datatype, 1,
|
||||
&dfNoData);
|
||||
}
|
||||
|
||||
@@ -1757,7 +1757,7 @@
|
||||
// Make sure we are in define mode.
|
||||
static_cast<netCDFDataset *>(poDS)->SetDefineMode(true);
|
||||
|
||||
- status = nc_del_att(cdfid, nZId, _FillValue);
|
||||
+ status = nc_del_att(cdfid, nZId, NC_FillValue);
|
||||
|
||||
NCDF_ERR(status);
|
||||
|
||||
@@ -7670,7 +7670,7 @@
|
||||
status = NC_EBADTYPE;
|
||||
if (*pszValue == '"')
|
||||
{
|
||||
- // For _FillValue, the attribute type should match
|
||||
+ // For NC_FillValue, the attribute type should match
|
||||
// the variable type. Leaks memory with NC4 otherwise
|
||||
if (osAttrName == "_FillValue")
|
||||
{
|
||||
@@ -8979,7 +8979,7 @@
|
||||
// Remove the following band meta but set them later from band data.
|
||||
const char *const papszIgnoreBand[] = {
|
||||
CF_ADD_OFFSET, CF_SCALE_FACTOR, "valid_range", "_Unsigned",
|
||||
- _FillValue, "coordinates", nullptr};
|
||||
+ NC_FillValue, "coordinates", nullptr};
|
||||
const char *const papszIgnoreGlobal[] = {"NETCDF_DIM_EXTRA", nullptr};
|
||||
|
||||
CSLConstList papszMetadata = nullptr;
|
||||
--- gdal-3.9.1/frmts/netcdf/netcdflayer.cpp.orig 2024-07-27 14:35:23.240696146 +0200
|
||||
+++ gdal-3.9.1/frmts/netcdf/netcdflayer.cpp 2024-07-27 14:35:37.071337316 +0200
|
||||
@@ -647,14 +647,14 @@
|
||||
|
||||
CPLErr netCDFLayer::GetFillValue(int nVarId, char **ppszValue)
|
||||
{
|
||||
- if (NCDFGetAttr(m_nLayerCDFId, nVarId, _FillValue, ppszValue) == CE_None)
|
||||
+ if (NCDFGetAttr(m_nLayerCDFId, nVarId, NC_FillValue, ppszValue) == CE_None)
|
||||
return CE_None;
|
||||
return NCDFGetAttr(m_nLayerCDFId, nVarId, "missing_value", ppszValue);
|
||||
}
|
||||
|
||||
CPLErr netCDFLayer::GetFillValue(int nVarId, double *pdfValue)
|
||||
{
|
||||
- if (NCDFGetAttr(m_nLayerCDFId, nVarId, _FillValue, pdfValue) == CE_None)
|
||||
+ if (NCDFGetAttr(m_nLayerCDFId, nVarId, NC_FillValue, pdfValue) == CE_None)
|
||||
return CE_None;
|
||||
return NCDFGetAttr(m_nLayerCDFId, nVarId, "missing_value", pdfValue);
|
||||
}
|
||||
--- gdal-3.9.1/frmts/netcdf/netcdfmultidim.cpp.orig 2024-07-27 14:45:05.323367506 +0200
|
||||
+++ gdal-3.9.1/frmts/netcdf/netcdfmultidim.cpp 2024-07-27 14:46:24.763528778 +0200
|
||||
@@ -3687,7 +3687,7 @@
|
||||
|
||||
m_bGetRawNoDataValueHasRun = true;
|
||||
|
||||
- const char *pszAttrName = _FillValue;
|
||||
+ const char *pszAttrName = NC_FillValue;
|
||||
auto poAttr = GetAttribute(pszAttrName);
|
||||
if (!poAttr)
|
||||
{
|
||||
@@ -3701,10 +3701,10 @@
|
||||
{
|
||||
// Round-trip attribute value to target data type and back
|
||||
// to attribute data type to ensure there is no loss
|
||||
- // Normally _FillValue data type should be the same
|
||||
+ // Normally NC_FillValue data type should be the same
|
||||
// as the array one, but this is not always the case.
|
||||
// For example NASA GEDI L2B products have Float64
|
||||
- // _FillValue for Float32 variables.
|
||||
+ // NC_FillValue for Float32 variables.
|
||||
m_abyNoData.resize(dt.GetSize());
|
||||
GDALExtendedDataType::CopyValue(oRawResult.data(),
|
||||
poAttr->GetDataType(),
|
||||
@@ -3812,9 +3812,9 @@
|
||||
m_abyNoData.clear();
|
||||
nc_type atttype = NC_NAT;
|
||||
size_t attlen = 0;
|
||||
- if (nc_inq_att(m_gid, m_varid, _FillValue, &atttype, &attlen) ==
|
||||
+ if (nc_inq_att(m_gid, m_varid, NC_FillValue, &atttype, &attlen) ==
|
||||
NC_NOERR)
|
||||
- ret = nc_del_att(m_gid, m_varid, _FillValue);
|
||||
+ ret = nc_del_att(m_gid, m_varid, NC_FillValue);
|
||||
else
|
||||
ret = NC_NOERR;
|
||||
if (nc_inq_att(m_gid, m_varid, "missing_value", &atttype, &attlen) ==
|
||||
@@ -3846,7 +3846,7 @@
|
||||
if (nc_inq_att(m_gid, m_varid, "missing_value", &atttype, &attlen) ==
|
||||
NC_NOERR)
|
||||
{
|
||||
- if (nc_inq_att(m_gid, m_varid, _FillValue, &atttype, &attlen) ==
|
||||
+ if (nc_inq_att(m_gid, m_varid, NC_FillValue, &atttype, &attlen) ==
|
||||
NC_NOERR)
|
||||
{
|
||||
CPLError(CE_Failure, CPLE_NotSupported,
|
||||
@@ -3859,7 +3859,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- ret = nc_put_att(m_gid, m_varid, _FillValue, m_nVarType, 1,
|
||||
+ ret = nc_put_att(m_gid, m_varid, NC_FillValue, m_nVarType, 1,
|
||||
&abyTmp[0]);
|
||||
}
|
||||
}
|
||||
@@ -4010,7 +4010,7 @@
|
||||
char szAttrName[NC_MAX_NAME + 1];
|
||||
szAttrName[0] = 0;
|
||||
NCDF_ERR(nc_inq_attname(m_gid, m_varid, i, szAttrName));
|
||||
- if (bShowAll || (!EQUAL(szAttrName, _FillValue) &&
|
||||
+ if (bShowAll || (!EQUAL(szAttrName, NC_FillValue) &&
|
||||
!EQUAL(szAttrName, "missing_value") &&
|
||||
!EQUAL(szAttrName, CF_UNITS) &&
|
||||
!EQUAL(szAttrName, CF_SCALE_FACTOR) &&
|
Loading…
x
Reference in New Issue
Block a user