Skip to content

Commit

Permalink
Merge branch 'arrow_19' into remove_filegdb_write_support
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jan 16, 2025
2 parents ddd3d98 + 6f9326a commit 8becd6e
Show file tree
Hide file tree
Showing 120 changed files with 3,936 additions and 1,976 deletions.
1 change: 1 addition & 0 deletions .github/workflows/alpine/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ RUN apk add \
lz4-dev \
make \
mariadb-connector-c-dev \
muparser-dev \
netcdf-dev \
odbc-cpp-wrapper-dev \
ogdi-dev \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cmake_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ jobs:
base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-ccache
mingw-w64-x86_64-pcre mingw-w64-x86_64-xerces-c mingw-w64-x86_64-zstd mingw-w64-x86_64-libarchive
mingw-w64-x86_64-geos mingw-w64-x86_64-libspatialite mingw-w64-x86_64-proj
mingw-w64-x86_64-cgal mingw-w64-x86_64-libfreexl mingw-w64-x86_64-hdf5 mingw-w64-x86_64-netcdf mingw-w64-x86_64-poppler mingw-w64-x86_64-podofo mingw-w64-x86_64-postgresql
mingw-w64-x86_64-cgal mingw-w64-x86_64-libfreexl mingw-w64-x86_64-hdf5 mingw-w64-x86_64-muparser mingw-w64-x86_64-netcdf mingw-w64-x86_64-poppler mingw-w64-x86_64-podofo mingw-w64-x86_64-postgresql
mingw-w64-x86_64-libgeotiff mingw-w64-x86_64-libpng mingw-w64-x86_64-libtiff mingw-w64-x86_64-openjpeg2
mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-numpy mingw-w64-x86_64-python-pytest mingw-w64-x86_64-python-setuptools mingw-w64-x86_64-python-lxml mingw-w64-x86_64-swig mingw-w64-x86_64-python-psutil mingw-w64-x86_64-blosc mingw-w64-x86_64-libavif
- name: Setup cache
Expand Down Expand Up @@ -434,7 +434,7 @@ jobs:
cfitsio freexl geotiff libjpeg-turbo libpq libspatialite libwebp-base pcre pcre2 postgresql \
sqlite tiledb zstd cryptopp cgal doxygen librttopo openssl liblzma-devel \
openjdk ant qhull armadillo blas blas-devel libblas libcblas liblapack liblapacke blosc libarchive \
libarrow pyarrow libaec libheif libavif cmake fsspec
libarrow pyarrow libaec libheif libavif muparser cmake fsspec
- name: Check CMake version
shell: bash -l {0}
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/fedora_rawhide/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RUN dnf install -y clang make diffutils ccache cmake \
mdbtools-devel mdbtools-odbc unixODBC-devel \
armadillo-devel qhull-devel \
hdf-devel hdf5-devel netcdf-devel \
muParser-devel \
libpq-devel \
libavif-devel \
python3-setuptools python3-pip python3-devel python3-lxml swig \
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ubuntu_20.04/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ RUN apt-get update -y \
liblz4-dev \
liblzma-dev \
libmono-system-drawing4.0-cil \
libmuparser-dev \
libmysqlclient-dev \
libnetcdf-dev \
libogdi-dev \
Expand Down Expand Up @@ -274,6 +275,11 @@ RUN if test "${OPENDRIVE_VERSION}" != ""; then ( \
&& rm -rf libOpenDRIVE-${OPENDRIVE_VERSION} \
); fi

# Install exprtk
RUN wget -q https://www.partow.net/downloads/exprtk.zip && \
unzip -j -d /usr/local/include exprtk.zip exprtk/exprtk.hpp && \
rm exprtk.zip

RUN ldconfig

COPY requirements.txt /tmp/
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ubuntu_20.04/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ cmake "${GDAL_SOURCE_DIR:=..}" \
-DCMAKE_INSTALL_PREFIX=/tmp/install-gdal \
-DGDAL_USE_TIFF_INTERNAL=OFF \
-DGDAL_USE_GEOTIFF_INTERNAL=OFF \
-DGDAL_USE_EXPRTK=ON \
-DECW_ROOT=/opt/libecwj2-3.3 \
-DMRSID_ROOT=/usr/local \
-DFileGDB_ROOT=/usr/local/FileGDB_API \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ubuntu_24.04/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ RUN apt-get update && \
liblcms2-2 \
liblz4-dev \
liblzma-dev \
libmuparser-dev \
libmysqlclient-dev \
libnetcdf-dev \
libogdi-dev \
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ repos:
autotest/cpp/data/|
autotest/gdrivers/data/|
swig/|
third_party/exprtk/|
third_party/fast_float/|
third_party/muparser/|
third_party/LercLib/|
autotest/ogr/data/|
alg/internal_libqhull/|
Expand Down
213 changes: 213 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,215 @@
# GDAL/OGR 3.10.1 Release Notes

GDAL 3.10.1 is a bugfix release.

### Build

* CMake: FindDotnet.cmake: remove obsolete cmake_minimum_required()
* CMake: fix swig/csharp/CMakeLists.txt compatibility with CMake 3.31
* CMake: use add_compile_options() instead of setting CMAKE_CXX_FLAGS for
-fno-finite-math-only (#11286)
* Set GDAL_DEV_SUFFIX to the pre-release suffix if a corresponding Git tag was
found.
* PDF: fix build issue on CondaForge build infrastructure (gcc 13.3)
* Fix issues in cpl_vsil_win32.cpp with latest mingw64

## GDAL 3.10.1

### Port

* CPLDebug: Accept values of YES,TRUE,1 (#11219)
* /vsiaz/: ReadDir(): be robust to a response to list blob that returns no blobs
but has a non-empty NextMarker
* /vsis3/ / AWS: implement support for AWS Single-Sign On (AWS IAM Identity
Center) (#11203)
* /vsicurl/: fix to allow to read Parquet partitionned datasets from public
Azure container using /vsicurl/ (#11309)
* CPLGetPath()/CPLGetDirname(): make them work with /vsicurl? and URL encoded
(#11467)
* Fix CPLFormFilename(absolute_path, ../something, NULL) to strip the relative
path

### Algorithms

* GDALContourGenerateEx(): return CE_None even if the raster is at constant
value (3.10.0 regression, #11340)

### Core

* fix memory leak when calling GDALAllRegister(), several times, on a deferred
loaded plugin that is absent from the system (rasterio/rasterio#3250)
* GDALRasterBlock: make sure mutex is initialize in repeated calls to
GDALAllRegister / GDALDestroyDriverManager (#11447)
* Do not sort items in IMD metadata domain (#11470)
* GDALDataset::BuildOverviews(): validate values of decimation factors

### Raster utilities

* gdalinfo: bring back stdout streaming mode that went away during argparse
refactor
* gdalinfo: fix bound checking for value of -sds argument
* gdaldem: fix help message for subcommands
* gdaltindex: restore -ot option accidentally removed in GDAL 3.10.0 (#11246)
* gdaladdo: validate values of decimation factors

### Raster drivers

GTI driver:
* make it work with STAC GeoParquet files that don't have a assets.image.href
field (#11317)
* STAC GeoParquet: make it recognize assets.XXX.proj:epsg and
assets.XXX.proj:transform
* attach the color table of the sample tile to the GTI single band
* generalize logic for reading STAC GeoParquet eo:bands field to any asset
name, and handle all 'common_names' values
* parse central wavelength and full width half max metadata items from STAC
GeoParquet eo:bands field
* read scale and offset from STAC GeoParquet raster:bands field
* STACGeoParquet: add support for proj:code, proj:wkt2, proj:projjson (#11512)
* advertise SRS open option

GTiff driver:
* detect I/O error when getting tile offset/count in multi-threaded reading
(#11552)
* CacheMultiRange(): properly react to errors in VSIFReadMultiRangeL() (#11552)
* internal overview building: do not set PHOTOMETRIC=YCBCR when
COMPRESS_OVERVIEW != JPEG
* mask overview: fix vertical shift in internal mask overview computation
(#11555)
* JXL: add support for Float16 and Compression=52546 which is JPEGXL from DNG
1.7 specification
* Internal libtiff: fix writing a Predictor=3 file with non-native endianness

HDF4 driver:
* fix REMQUOTE implementation that caused valgrind to warn about overlapping
source and target buffers
* hdf-eos: fix lots of Coverity Scan warnings and disable lots of code unused
by GDAL

HTTP driver:
* re-emit warnings/errors raised by underlying driver

KEA driver:
* use native chunksize for copying RAT (#11446)

netCDF driver:
* add a GDAL_NETCDF_REPORT_EXTRA_DIM_VALUES config option (#11207)
* multidim: report correct axis order when reading SRS with EPSG geographic
CRS + geoid model
* fix warning message mentioning Time dimension instead of Vertical

OCI driver:
* add a TIMESTAMP_WITH_TIME_ZONE layer creation option, and ogr2ogr tweaks

PNG driver:
* fix reading 16-bit interlaced images (on little-endian machines)

TileDB driver:
* remove dir only if it exists (#11485)

VRT driver:
* fix reading from a CFloat32/CFloat64 ComplexSource in a non-complex-type
buffer (3.8.0 regression, refs rasterio/rasterio#3070)
* processed dataset: Read scale and offset from src dataset
* data/gdalvrt.xsd: fix schema to reflect that <Array> can be a child of
<ArraySource>

WMTS driver:
* for geographic CRS with official lat,lon order, be robust to bounding box
and TopLeftCorner being in the wrong axis order and emits a warning (#11387)

Zarr driver:
* fix incorrect DataAxisToSRSAxisMapping for EPSG geographic CRS (#11380)

## OGR 3.10.1

### Core

* OGRWarpedLayer: do not use source layer GetArrowStream() as this would skip
reprojection

### OGRSpatialReference

* importFromEPSG(): tries with ESRI when it looks like an ESRI code, but with
a warning when that succeeds (#11387)

### Vector utilities

* ogrinfo: command line help text fixes (#11463)
* ogr2ogr: fix 'ogr2ogr out.parquet in.gpkg/fgb/parquet -t_srs {srs_def}'
optimized code path (3.10.0 regression)
* ogr2ogr: fix crash with -ct and using Arrow code path (e.g source is
GeoPackage) (3.10.0 regression) (#11348)
* GDALVectorTranslate(): fix null-ptr dereference when no source driver
* ogrlineref: fix double-free on 'ogrlineref --version'

### Vector drivers

DXF driver:
* use Z value for SPLINE entities (#11284)
* writer: do not set 0 as the value for DXF code 5 (HANDLE) (#11299)

FlatGeobuf driver:
* writing: in SPATIAL_INDEX=NO mode, deal with empty geometries as if there
were null (#11419)
* writing: in SPATIAL_INDEX=NO mode, accept creating a file without features

GeoJSON(-like) drivers:
* combine value of GDAL_HTTP_HEADERS with Accept header that the driver set
(#11385)

GeoJSON driver:
* do not generate an empty layer name when reading from /vsistdin/ (#11484)

GML driver:
* add support for AIXM ElevatedCurve (#4600, #11425)
* honour SWAP_COORDINATES=YES even when the geometry has no SRS (#11491)
* gml:CircleByCenterPoint: correctly take into account radius.uom for projected CRS

GPKG driver:
* make CreateCopy() work on vector datasets (#11282)
* make sure gpkg_ogr_contents.feature_count = 0 on a newly created empty table
(#11274)
* fix FID vs field of same name consistency check when field is not set (#11527)

LVBAG driver:
* only run IsValid() if bFixInvalidData

MapInfo driver
* .tab: support .dbf files with deleted columns (#11173)

MVT driver:
* emit warning when the maximum tile size or feature count is reached and the
user didn't explicitly set MAX_SIZE or MAX_FEATURES layer creation options
(#11408)

OpenFileGDB driver:
* be robust to unusual .gdbindexes files with weird/corrupted/not-understood
entries (#11295)

Parquet driver:
* writer: write page indexes

PG driver:
* avoid error when the original search_path contains something like '"",
something_else' (#11386)

OGR VRT:
* fix SrcRegion.clip at OGRVRTLayer level (#11519)
* accept SrcRegion value to be any geometry type as well as SetSpatialFilter()
(#11518)

## Python bindings

* add a colorInterpretation argument to gdal.Translate() and fixes a copy&paste
issue in the similar argument of gdal.TileIndex()
* swig/python/setup.py.in: fix exception when building a RC git tag

## Java bindings

* add byte[] org.gdal.gdal.GetMemFileBuffer(String filename) (#11192)
* avoid double free when calling Dataset.Close() (#11566)

# GDAL/OGR 3.10.0 Release Notes

GDAL/OGR 3.10.0 is a feature release.
Expand Down Expand Up @@ -555,6 +767,7 @@ MapInfo driver:

Miramon driver:
* various memory leak fixes on corrupted datasets
* fix a case of mutirecord (lists) in some fields (#11148)

OAPIF driver:
* combine CURL error message and data payload (when it exists) to form error
Expand Down
44 changes: 42 additions & 2 deletions alg/gdaltransformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1951,30 +1951,70 @@ void *GDALCreateGenImgProjTransformer2(GDALDatasetH hSrcDS, GDALDatasetH hDstDS,

const char *pszCO = CSLFetchNameValue(papszOptions, "COORDINATE_OPERATION");

const auto SetAxisMapping =
[papszOptions](OGRSpatialReference &oSRS, const char *pszPrefix)
{
const char *pszMapping = CSLFetchNameValue(
papszOptions, std::string(pszPrefix)
.append("_DATA_AXIS_TO_SRS_AXIS_MAPPING")
.c_str());
if (pszMapping)
{
CPLStringList aosTokens(CSLTokenizeString2(pszMapping, ",", 0));
std::vector<int> anMapping;
for (int i = 0; i < aosTokens.size(); ++i)
anMapping.push_back(atoi(aosTokens[i]));
oSRS.SetDataAxisToSRSAxisMapping(anMapping);
}
else
{
const char *pszStrategy = CSLFetchNameValueDef(
papszOptions,
std::string(pszPrefix).append("_AXIS_MAPPING_STRATEGY").c_str(),
"TRADITIONAL_GIS_ORDER");
if (EQUAL(pszStrategy, "TRADITIONAL_GIS_ORDER"))
oSRS.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER);
else if (EQUAL(pszStrategy, "AUTHORITY_COMPLIANT"))
oSRS.SetAxisMappingStrategy(OAMS_AUTHORITY_COMPLIANT);
else
{
CPLError(CE_Warning, CPLE_AppDefined,
"Unrecognized value '%s' for %s", pszStrategy,
std::string(pszPrefix)
.append("_AXIS_MAPPING_STRATEGY")
.c_str());
return false;
}
}
return true;
};

OGRSpatialReference oSrcSRS;
if (pszSrcSRS)
{
oSrcSRS.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER);
if (pszSrcSRS[0] != '\0' &&
oSrcSRS.SetFromUserInput(pszSrcSRS) != OGRERR_NONE)
{
CPLError(CE_Failure, CPLE_AppDefined,
"Failed to import coordinate system `%s'.", pszSrcSRS);
return nullptr;
}
if (!SetAxisMapping(oSrcSRS, "SRC_SRS"))
return nullptr;
}

OGRSpatialReference oDstSRS;
if (pszDstSRS)
{
oDstSRS.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER);
if (pszDstSRS[0] != '\0' &&
oDstSRS.SetFromUserInput(pszDstSRS) != OGRERR_NONE)
{
CPLError(CE_Failure, CPLE_AppDefined,
"Failed to import coordinate system `%s'.", pszDstSRS);
return nullptr;
}
if (!SetAxisMapping(oDstSRS, "DST_SRS"))
return nullptr;
}

const char *pszSrcGeolocArray =
Expand Down
8 changes: 6 additions & 2 deletions alg/gdalwarpkernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4383,7 +4383,9 @@ static void GWKComputeWeights(GDALResampleAlg eResample, int iMin, int iMax,

int i = iMin; // Used after for.
int iC = 0; // Used after for.
double dfAccumulatorWeightHorizontal = 0.0;
// Not zero, but as close as possible to it, to avoid potential division by
// zero at end of function
double dfAccumulatorWeightHorizontal = std::numeric_limits<double>::min();
for (; i + 2 < iMax; i += 4, iC += 4)
{
padfWeightsHorizontal[iC] = (i - dfDeltaX) * dfXScale;
Expand All @@ -4404,7 +4406,9 @@ static void GWKComputeWeights(GDALResampleAlg eResample, int iMin, int iMax,

int j = jMin; // Used after for.
int jC = 0; // Used after for.
double dfAccumulatorWeightVertical = 0.0;
// Not zero, but as close as possible to it, to avoid potential division by
// zero at end of function
double dfAccumulatorWeightVertical = std::numeric_limits<double>::min();
for (; j + 2 < jMax; j += 4, jC += 4)
{
padfWeightsVertical[jC] = (j - dfDeltaY) * dfYScale;
Expand Down
Loading

0 comments on commit 8becd6e

Please sign in to comment.