Skip to content

Commit

Permalink
update GDAL to 3.8.3 (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev authored Jan 9, 2024
1 parent 38c38c4 commit f087398
Show file tree
Hide file tree
Showing 20 changed files with 295 additions and 193 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.8.3] 2024-01-09

### Added
- GDAL 3.8.3


## [3.8.2] 2024-01-08

### Added
Expand Down
2 changes: 1 addition & 1 deletion deps/libgdal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eu
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR/libgdal"

GDAL_VERSION=3.8.2
GDAL_VERSION=3.8.3
GDAL_VERSION_SUFFIX=
dir_gdal=./gdal
dir_formats_gyp=./gyp-formats
Expand Down
4 changes: 2 additions & 2 deletions deps/libgdal/gdal/CITATION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
To cite GDAL/OGR in publications use:

GDAL/OGR contributors (2023). GDAL/OGR Geospatial Data Abstraction
GDAL/OGR contributors (2024). GDAL/OGR Geospatial Data Abstraction
software Library. Open Source Geospatial Foundation. URL https://gdal.org
DOI: 10.5281/zenodo.5884351

Expand All @@ -10,7 +10,7 @@ A BibTeX entry for LaTeX users is
title = {{GDAL/OGR} Geospatial Data Abstraction software Library},
author = {{GDAL/OGR contributors}},
organization = {Open Source Geospatial Foundation},
year = {2023},
year = {2024},
url = {https://gdal.org},
doi = {10.5281/zenodo.5884351},
}
4 changes: 2 additions & 2 deletions deps/libgdal/gdal/CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: Please cite this software using these metadata or in the CITATION file.
type: software
title: GDAL
version: 3.8.2
date-released: 2023-12-16
version: 3.8.3
date-released: 2024-01-02
doi: 10.5281/zenodo.5884351
abstract: GDAL is a translator library for raster and vector geospatial data
formats that is released under an MIT style Open Source License by the Open
Expand Down
2 changes: 1 addition & 1 deletion deps/libgdal/gdal/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8.2
3.8.3
2 changes: 1 addition & 1 deletion deps/libgdal/gdal/apps/gdal2ogr.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ int main(int argc, char *argv[])
/* -------------------------------------------------------------------- */
for (i = 1; i < argc; i++)
{
if (EQUAL(argv[i], "--help")
if (EQUAL(argv[i], "--help"))
Usage();
else if (EQUAL(argv[i], "-b") && i < argc - 1)
iBand = atoi(argv[++i]);
Expand Down
6 changes: 4 additions & 2 deletions deps/libgdal/gdal/apps/gdalbuildvrt_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,9 @@ void VRTBuilder::CreateVRTSeparate(VRTDatasetH hVRTDS)
}

VRTSimpleSource *poSimpleSource;
if (bAllowSrcNoData)
if (bAllowSrcNoData &&
(nSrcNoDataCount > 0 ||
psDatasetProperties->abHasNoData[nSrcBandIdx]))
{
auto poComplexSource = new VRTComplexSource();
poSimpleSource = poComplexSource;
Expand All @@ -1101,7 +1103,7 @@ void VRTBuilder::CreateVRTSeparate(VRTDatasetH hVRTDS)
poComplexSource->SetNoDataValue(
padfSrcNoData[nSrcNoDataCount - 1]);
}
else if (psDatasetProperties->abHasNoData[nSrcBandIdx])
else /* if (psDatasetProperties->abHasNoData[nSrcBandIdx]) */
{
poComplexSource->SetNoDataValue(
psDatasetProperties->adfNoDataValues[nSrcBandIdx]);
Expand Down
2 changes: 2 additions & 0 deletions deps/libgdal/gdal/apps/ogr2ogr_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3860,6 +3860,8 @@ bool SetupTargetLayer::CanUseWriteArrowBatch(
CPLTestBool(CPLGetConfigOption("OGR2OGR_USE_ARROW_API", "YES"))) ||
CPLTestBool(CPLGetConfigOption("OGR2OGR_USE_ARROW_API", "NO"))) &&
!psOptions->bSkipFailures && !psOptions->bTransform &&
!psOptions->poClipSrc && !psOptions->poClipDst &&
psOptions->oGCPs.nGCPCount == 0 && !psOptions->bWrapDateline &&
!m_papszSelFields && !m_bAddMissingFields &&
m_eGType == GEOMTYPE_UNCHANGED && psOptions->eGeomOp == GEOMOP_NONE &&
m_eGeomTypeConversion == GTC_DEFAULT && m_nCoordDim < 0 &&
Expand Down
6 changes: 6 additions & 0 deletions deps/libgdal/gdal/cmake/helpers/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ else ()
check_function_exists(getrlimit HAVE_GETRLIMIT)
check_symbol_exists(RLIMIT_AS "sys/resource.h" HAVE_RLIMIT_AS)

# For internal libjson-c
check_include_file(sys/random.h HAVE_SYS_RANDOM_H)
if (HAVE_SYS_RANDOM_H)
check_symbol_exists(getrandom "sys/random.h" HAVE_GETRANDOM)
endif()

check_function_exists(ftell64 HAVE_FTELL64)
if (HAVE_FTELL64)
set(VSI_FTELL64 "ftell64")
Expand Down
42 changes: 27 additions & 15 deletions deps/libgdal/gdal/frmts/vrt/vrtderivedrasterband.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ CPLErr VRTDerivedRasterBand::IRasterIO(
(!m_bNoDataValueSet || m_dfNoDataValue == 0))
{
memset(pData, 0,
static_cast<size_t>(nBufXSize * nBufYSize * nPixelSpace));
static_cast<size_t>(nBufXSize) * nBufYSize * nBufTypeSize);
}
else if (m_bNoDataValueSet)
{
Expand Down Expand Up @@ -1136,23 +1136,28 @@ CPLErr VRTDerivedRasterBand::IRasterIO(
(nYShiftInBuffer * nExtBufXSize + nXShiftInBuffer) *
nSrcTypeSize,
nExtBufXSizeReq, nExtBufYSizeReq, eSrcType, nSrcTypeSize,
nSrcTypeSize * nExtBufXSize, &sExtraArg);
static_cast<GSpacing>(nSrcTypeSize) * nExtBufXSize,
&sExtraArg);

// Extend first lines
for (int iY = 0; iY < nYShiftInBuffer; iY++)
{
memcpy(pabyBuffer + iY * nExtBufXSize * nSrcTypeSize,
pabyBuffer + nYShiftInBuffer * nExtBufXSize * nSrcTypeSize,
nExtBufXSize * nSrcTypeSize);
memcpy(pabyBuffer +
static_cast<size_t>(iY) * nExtBufXSize * nSrcTypeSize,
pabyBuffer + static_cast<size_t>(nYShiftInBuffer) *
nExtBufXSize * nSrcTypeSize,
static_cast<size_t>(nExtBufXSize) * nSrcTypeSize);
}
// Extend last lines
for (int iY = nYShiftInBuffer + nExtBufYSizeReq; iY < nExtBufYSize;
iY++)
{
memcpy(pabyBuffer + iY * nExtBufXSize * nSrcTypeSize,
pabyBuffer + (nYShiftInBuffer + nExtBufYSizeReq - 1) *
memcpy(pabyBuffer +
static_cast<size_t>(iY) * nExtBufXSize * nSrcTypeSize,
pabyBuffer + static_cast<size_t>(nYShiftInBuffer +
nExtBufYSizeReq - 1) *
nExtBufXSize * nSrcTypeSize,
nExtBufXSize * nSrcTypeSize);
static_cast<size_t>(nExtBufXSize) * nSrcTypeSize);
}
// Extend first cols
if (nXShiftInBuffer)
Expand All @@ -1161,9 +1166,13 @@ CPLErr VRTDerivedRasterBand::IRasterIO(
{
for (int iX = 0; iX < nXShiftInBuffer; iX++)
{
memcpy(pabyBuffer + (iY * nExtBufXSize + iX) * nSrcTypeSize,
pabyBuffer + (iY * nExtBufXSize + nXShiftInBuffer) *
nSrcTypeSize,
memcpy(pabyBuffer +
static_cast<size_t>(iY * nExtBufXSize + iX) *
nSrcTypeSize,
pabyBuffer +
(static_cast<size_t>(iY) * nExtBufXSize +
nXShiftInBuffer) *
nSrcTypeSize,
nSrcTypeSize);
}
}
Expand All @@ -1176,10 +1185,13 @@ CPLErr VRTDerivedRasterBand::IRasterIO(
for (int iX = nXShiftInBuffer + nExtBufXSizeReq;
iX < nExtBufXSize; iX++)
{
memcpy(pabyBuffer + (iY * nExtBufXSize + iX) * nSrcTypeSize,
pabyBuffer + (iY * nExtBufXSize + nXShiftInBuffer +
nExtBufXSizeReq - 1) *
nSrcTypeSize,
memcpy(pabyBuffer +
(static_cast<size_t>(iY) * nExtBufXSize + iX) *
nSrcTypeSize,
pabyBuffer +
(static_cast<size_t>(iY) * nExtBufXSize +
nXShiftInBuffer + nExtBufXSizeReq - 1) *
nSrcTypeSize,
nSrcTypeSize);
}
}
Expand Down
3 changes: 2 additions & 1 deletion deps/libgdal/gdal/frmts/zlib/contrib/infback9/infback9.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "inftree9.h"
#include "inflate9.h"
#include <assert.h>
#include <string.h>

#undef ZEXPORT
#define ZEXPORT
Expand Down Expand Up @@ -357,7 +358,7 @@ int ZEXPORT inflateBack9(z_stream FAR *strm, in_func in, void FAR *in_desc, out_
ROOM();
if (copy > have) copy = have;
if (copy > left) copy = left;
zmemcpy(put, next, copy);
zmemcpy(put, next, (unsigned)copy);
have -= copy;
next += copy;
left -= copy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@

#include "minified_zutil.h"

#ifndef STDC
extern voidp malloc OF((uInt size));
extern voidp calloc OF((uInt items, uInt size));
extern void free OF((voidpf ptr));
#endif
#include <stdlib.h>

voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size)
{
Expand Down
30 changes: 2 additions & 28 deletions deps/libgdal/gdal/frmts/zlib/contrib/infback9/minified_zutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define OF(args) args
#endif

#if defined(STDC) && !defined(Z_SOLO)
#if !defined(Z_SOLO)
# if !(defined(_WIN32_WCE) && defined(_MSC_VER))
# include <stddef.h>
# endif
Expand All @@ -48,7 +48,7 @@ typedef unsigned short ush;
typedef ush FAR ushf;
typedef unsigned long ulg;

#if !defined(Z_U8) && !defined(Z_SOLO) && defined(STDC)
#if !defined(Z_U8) && !defined(Z_SOLO)
# include <limits.h>
# if (ULONG_MAX == 0xffffffffffffffff)
# define Z_U8 unsigned long
Expand Down Expand Up @@ -213,35 +213,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#endif

/* functions */

#if defined(pyr) || defined(Z_SOLO)
# define NO_MEMCPY
#endif
#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
/* Use our own functions for small and medium model with MSC <= 5.0.
* You may have to use the same strategy for Borland C (untested).
* The __SC__ check is for Symantec.
*/
# define NO_MEMCPY
#endif
#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
# define HAVE_MEMCPY
#endif
#ifdef HAVE_MEMCPY
# ifdef SMALL_MEDIUM /* MSDOS small or medium model */
# define zmemcpy _fmemcpy
# define zmemcmp _fmemcmp
# define zmemzero(dest, len) _fmemset(dest, 0, len)
# else
# define zmemcpy memcpy
# define zmemcmp memcmp
# define zmemzero(dest, len) memset(dest, 0, len)
# endif
#else
void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
#endif

/* Diagnostic functions */
#ifdef ZLIB_DEBUG
Expand Down
6 changes: 3 additions & 3 deletions deps/libgdal/gdal/gcore/gdal_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef GDAL_VERSION_MAJOR
# define GDAL_VERSION_MAJOR 3
# define GDAL_VERSION_MINOR 8
# define GDAL_VERSION_REV 2
# define GDAL_VERSION_REV 3
# define GDAL_VERSION_BUILD 0
#endif

Expand All @@ -24,9 +24,9 @@

#if !defined(DO_NOT_DEFINE_GDAL_DATE_NAME)
#ifndef GDAL_RELEASE_DATE
# define GDAL_RELEASE_DATE 20231612
# define GDAL_RELEASE_DATE 20240104
#endif
#ifndef GDAL_RELEASE_NAME
# define GDAL_RELEASE_NAME "3.8.2"
# define GDAL_RELEASE_NAME "3.8.3"
#endif
#endif
6 changes: 3 additions & 3 deletions deps/libgdal/gdal/gcore/gdal_version_full/gdal_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef GDAL_VERSION_MAJOR
# define GDAL_VERSION_MAJOR 3
# define GDAL_VERSION_MINOR 8
# define GDAL_VERSION_REV 2
# define GDAL_VERSION_REV 3
# define GDAL_VERSION_BUILD 0
#endif

Expand All @@ -24,9 +24,9 @@

#if !defined(DO_NOT_DEFINE_GDAL_DATE_NAME)
#ifndef GDAL_RELEASE_DATE
# define GDAL_RELEASE_DATE 20231612
# define GDAL_RELEASE_DATE 20240104
#endif
#ifndef GDAL_RELEASE_NAME
# define GDAL_RELEASE_NAME "3.8.2"
# define GDAL_RELEASE_NAME "3.8.3"
#endif
#endif
Loading

0 comments on commit f087398

Please sign in to comment.