Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from OSGeo:master #93

Merged
merged 32 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
48e4a28
/vsicurl/: fix to allow to read Parquet partitionned datasets from pu…
rouault Nov 20, 2024
78518be
CMake: Export -DGDAL_DEBUG as PUBLIC for debug builds
rouault Nov 20, 2024
409982b
GTI: make the driver work with STAC GeoParquet files that don't have …
rouault Nov 20, 2024
f8532ee
GTI: advertize SRS open option
rouault Nov 21, 2024
fa72c11
GTI: STAC GeoParquet: make it recognize assets.XXX.proj:epsg and asse…
rouault Nov 21, 2024
f91d0e2
GTI: attach the color table of the sample tile to the GTI single band
rouault Nov 21, 2024
32bd86f
/vsiaz/: ReadDir(): be robust to a response to list blob that returns…
rouault Nov 21, 2024
d5ce4ba
GTI: generalize logic for reading STAC GeoParquet eo:bands field to a…
rouault Nov 21, 2024
58df2f1
GTI: parse central wavelength and full width half max metadata items …
rouault Nov 21, 2024
770c8ae
GTI: read scale and offset from STAC GeoParquet raster:bands field
rouault Nov 21, 2024
316c8a4
GTI: add test case for Sentinel2 STAC GeoParquet
rouault Nov 21, 2024
7fec8c7
OCI: add a TIMESTAMP_WITH_TIME_ZONE layer creation option, and ogr2og…
rouault Nov 23, 2024
9ef30ab
GDALContourGenerateEx(): return CE_None even if the raster is at cons…
rouault Nov 24, 2024
c6c1a9b
Remove lines with '$Id$' in source files
rouault Nov 24, 2024
d667af0
gdal2tiles: change __version__ to be gdal.__version__
rouault Nov 24, 2024
33fe7fe
Coverity warnings fixes (for false positives or unlikely events)
rouault Nov 24, 2024
ca16dce
Regenerate ods_formula_parser with Bison 3.8.1 to hopefully avoid Cov…
rouault Nov 24, 2024
5178303
Fix lots of Coverity Scan warnings in frmts/hdf4/hdf-eos
rouault Nov 25, 2024
46870fb
frmts/hdf4/hdf-eos: disable lots of code unused by GDAL
rouault Nov 25, 2024
63821c3
frmts/hdf4/hdf-eos: remove code unused by GDAL
rouault Nov 25, 2024
248346c
autotest/ogr/ogr_parquet.py: add a missing require_driver()
rouault Nov 26, 2024
89c4ca9
Merge pull request #11310 from rouault/fix_11309
rouault Nov 26, 2024
1b4b295
Merge pull request #11314 from rouault/fix_11311
rouault Nov 26, 2024
b58e76c
Merge pull request #11319 from rouault/fix_11317
rouault Nov 26, 2024
ade9d67
Merge pull request #11323 from rouault/vsiaz_list_dir_no_blob_but_marker
rouault Nov 26, 2024
7bbd872
Merge pull request #11342 from rouault/oci_timestamp_with_tz
rouault Nov 26, 2024
b646a8b
Merge pull request #11343 from rouault/fix_11340
rouault Nov 26, 2024
efe516a
Merge pull request #11344 from rouault/remove_dollar_id_dollar
rouault Nov 26, 2024
0599106
Merge pull request #11345 from rouault/coverity_fixes
rouault Nov 26, 2024
30471cd
Merge pull request #11347 from rouault/ods_parser_bison_update
rouault Nov 26, 2024
366ff1f
Merge pull request #11348 from rouault/hdf_eos_fixes
rouault Nov 26, 2024
1e3a6d5
Merge pull request #11349 from rouault/hdfeos_remove_deadcode
rouault Nov 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ repos:
ogr/ogrsf_frmts/flatgeobuf/flatbuffers/|
ogr/ogrsf_frmts/pmtiles/pmtiles/|
ogr/ogrsf_frmts/ods/ods_formula_parser.cpp|
ogr/ogrsf_frmts/ods/ods_formula_parser.hpp|
ogr/ogrsf_frmts/sqlite/sqlite_rtree_bulk_load|
ogr/swq_parser.cpp|
ogr/swq_parser.hpp|
Expand Down
7 changes: 6 additions & 1 deletion alg/contour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ CPLErr GDALContourGenerateEx(GDALRasterBandH hBand, void *hLayer,
}
}

bool ok = false;
bool ok = true;

try
{
Expand Down Expand Up @@ -880,6 +880,11 @@ CPLErr GDALContourGenerateEx(GDALRasterBandH hBand, void *hLayer,
}
}

if (ok)
{
pfnProgress(1.0, "", pProgressArg);
}

return ok ? CE_None : CE_Failure;
}

Expand Down
6 changes: 3 additions & 3 deletions alg/internal_libqhull/poly_r.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,9 +1180,9 @@ int qh_pointid(qhT *qh, pointT *point) {
/* coverity[divide_arg] */
id= offset / qh->hull_dim;
} else {
id = qh_setindex(qh->other_points, point);
if (id >= 0) {
id += qh->num_points;
const int idx = qh_setindex(qh->other_points, point);
if (idx >= 0) {
id = (ptr_intT)idx + qh->num_points;
} else {
return qh_IDunknown;
}
Expand Down
1 change: 0 additions & 1 deletion apps/commonutils.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL Utilities
* Purpose: Common utility routines
Expand Down
1 change: 0 additions & 1 deletion apps/gdal_utils.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL Utilities
* Purpose: GDAL Utilities Public Declarations.
Expand Down
1 change: 0 additions & 1 deletion apps/gdal_utils_priv.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL Utilities
* Purpose: GDAL Utilities Private Declarations.
Expand Down
26 changes: 23 additions & 3 deletions apps/ogr2ogr_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4651,6 +4651,8 @@ SetupTargetLayer::Setup(OGRLayer *poSrcLayer, const char *pszNewLayerName,
oCoordPrec.dfMResolution = psOptions->dfMRes;
}

auto poSrcDriver = m_poSrcDS->GetDriver();

// Force FID column as 64 bit if the source feature has a 64 bit FID,
// the target driver supports 64 bit FID and the user didn't set it
// manually.
Expand Down Expand Up @@ -4693,9 +4695,8 @@ SetupTargetLayer::Setup(OGRLayer *poSrcLayer, const char *pszNewLayerName,
}
// Detect scenario of converting from GPX to a format like GPKG
// Cf https://github.com/OSGeo/gdal/issues/9225
else if (!bPreserveFID && !m_bUnsetFid && !bAppend &&
m_poSrcDS->GetDriver() &&
EQUAL(m_poSrcDS->GetDriver()->GetDescription(), "GPX") &&
else if (!bPreserveFID && !m_bUnsetFid && !bAppend && poSrcDriver &&
EQUAL(poSrcDriver->GetDescription(), "GPX") &&
pszDestCreationOptions &&
(strstr(pszDestCreationOptions, "='FID'") != nullptr ||
strstr(pszDestCreationOptions, "=\"FID\"") != nullptr) &&
Expand Down Expand Up @@ -4787,6 +4788,23 @@ SetupTargetLayer::Setup(OGRLayer *poSrcLayer, const char *pszNewLayerName,
}
}

// Use case of https://github.com/OSGeo/gdal/issues/11057#issuecomment-2495479779
// Conversion from GPKG to OCI.
// OCI distinguishes between TIMESTAMP and TIMESTAMP WITH TIME ZONE
// GeoPackage is supposed to have DateTime in UTC, so we set
// TIMESTAMP_WITH_TIME_ZONE=YES
if (poSrcDriver && pszDestCreationOptions &&
strstr(pszDestCreationOptions, "TIMESTAMP_WITH_TIME_ZONE") &&
CSLFetchNameValue(m_papszLCO, "TIMESTAMP_WITH_TIME_ZONE") ==
nullptr &&
EQUAL(poSrcDriver->GetDescription(), "GPKG"))
{
papszLCOTemp = CSLSetNameValue(papszLCOTemp,
"TIMESTAMP_WITH_TIME_ZONE", "YES");
CPLDebug("GDALVectorTranslate",
"Setting TIMESTAMP_WITH_TIME_ZONE=YES");
}

OGRGeomFieldDefn oGeomFieldDefn(
osGeomFieldName.c_str(),
static_cast<OGRwkbGeometryType>(eGCreateLayerType));
Expand Down Expand Up @@ -4982,7 +5000,9 @@ SetupTargetLayer::Setup(OGRLayer *poSrcLayer, const char *pszNewLayerName,

bool bError = false;
OGRArrowArrayStream streamSrc;

const bool bUseWriteArrowBatch =
!EQUAL(m_poDstDS->GetDriver()->GetDescription(), "OCI") &&
CanUseWriteArrowBatch(poSrcLayer, poDstLayer, bJustCreatedLayer,
psOptions, bPreserveFID, bError, streamSrc);
if (bError)
Expand Down
1 change: 0 additions & 1 deletion autotest/alg/applyverticalshiftgrid.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test GDALApplyVerticalShiftGrid algorithm.
Expand Down
26 changes: 25 additions & 1 deletion autotest/alg/contour.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: ContourGenerate() testing
Expand Down Expand Up @@ -446,3 +445,28 @@ def test_contour_min_value_is_multiple_of_interval(tmp_vsimem):
f = lyr.GetNextFeature()
assert f["ELEV"] == 3
ogrtest.check_feature_geometry(f, "LINESTRING (1.5 0.0,1.5 0.5,1.5 1.5,1.5 2.0)")


###############################################################################
# Test scenario of https://github.com/OSGeo/gdal/issues/11340


def test_contour_constant_raster_value(tmp_vsimem):

ogr_ds = ogr.GetDriverByName("Memory").CreateDataSource("")
lyr = ogr_ds.CreateLayer("contour", geom_type=ogr.wkbLineString)
lyr.CreateField(ogr.FieldDefn("ID", ogr.OFTInteger))
lyr.CreateField(ogr.FieldDefn("ELEV", ogr.OFTReal))

src_ds = gdal.GetDriverByName("MEM").Create("", 1, 1)
assert (
gdal.ContourGenerateEx(
src_ds.GetRasterBand(1),
lyr,
options=["LEVEL_INTERVAL=10", "ID_FIELD=0", "ELEV_FIELD=1"],
)
== gdal.CE_None
)

f = lyr.GetNextFeature()
assert f is None
1 change: 0 additions & 1 deletion autotest/alg/cutline.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test the image reprojection functions. Try to test as many
Expand Down
1 change: 0 additions & 1 deletion autotest/alg/dither.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test gdal.ComputeMedianCutPCT() and gdal.DitherRGB2PCT()
Expand Down
1 change: 0 additions & 1 deletion autotest/alg/fillnodata.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: GDALFillNoData() testing
Expand Down
1 change: 0 additions & 1 deletion autotest/alg/los.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test gdal.LineOfSightVisible algorithm.
Expand Down
1 change: 0 additions & 1 deletion autotest/alg/polygonize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test Polygonize() algorithm.
Expand Down
1 change: 0 additions & 1 deletion autotest/alg/proximity.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test ComputeProximity() algorithm.
Expand Down
1 change: 0 additions & 1 deletion autotest/alg/rasterize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test RasterizeLayer() and related calls.
Expand Down
1 change: 0 additions & 1 deletion autotest/alg/reproject.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test ReprojectImage() algorithm.
Expand Down
1 change: 0 additions & 1 deletion autotest/alg/sieve.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test SieveFilter() algorithm.
Expand Down
1 change: 0 additions & 1 deletion autotest/alg/transformgeoloc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test TransformGeoloc algorithm.
Expand Down
1 change: 0 additions & 1 deletion autotest/alg/warp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test the image reprojection functions. Try to test as many
Expand Down
1 change: 0 additions & 1 deletion autotest/benchmark/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Benchmarking
Expand Down
1 change: 0 additions & 1 deletion autotest/benchmark/test_gdalwarp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Benchmarking of gdalwarp
Expand Down
1 change: 0 additions & 1 deletion autotest/benchmark/test_gtiff.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Benchmarking of GeoTIFF driver
Expand Down
1 change: 0 additions & 1 deletion autotest/benchmark/test_ogr2ogr.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Benchmarking of ogr2ogr
Expand Down
1 change: 0 additions & 1 deletion autotest/benchmark/test_ogr_gpkg.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Benchmarking of GeoPackage driver
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/bug1488.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL Core
* Purpose: Test fix for https://github.com/OSGeo/gdal/issues/1488 (concurrency
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/test_alg.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL algorithms
* Purpose: Test alg
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/test_deferred_plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL
* Purpose: Test deferred plugin loading
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/test_marching_squares_contour.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL algorithms
* Purpose: Tests for the marching squares algorithm
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/test_marching_squares_polygon.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL algorithms
* Purpose: Tests for the marching squares algorithm
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/test_marching_squares_square.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL algorithms
* Purpose: Tests for the marching squares algorithm
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/test_marching_squares_tile.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL algorithms
* Purpose: Tests for the marching squares algorithm
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/test_osr_set_proj_search_paths.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL Core
* Purpose: Test OSRSetPROJSearchPaths()
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/test_triangulation.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL algorithms
* Purpose: Test Delaunay triangulation
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/testblockcache.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL Core
* Purpose: Test block cache under multi-threading
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/testblockcachelimits.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL Core
* Purpose: Test block cache under multi-threading
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/testblockcachewrite.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL Core
* Purpose: Test block cache & writing behaviour under multi-threading
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/testclosedondestroydm.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL Core
* Purpose: Test block cache & writing behaviour under multi-threading
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/testcopywords.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL Core
* Purpose: Test GDALCopyWords().
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/testdestroy.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL Core
* Purpose: Test GDALDestroy().
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/testlog.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL
* Purpose: Test CPL_LOG
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/testthreadcond.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL Core
* Purpose: Test thread API
Expand Down
1 change: 0 additions & 1 deletion autotest/cpp/testvirtualmem.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/******************************************************************************
* $Id$
*
* Project: GDAL algorithms
* Purpose: Test Delaunay triangulation
Expand Down
1 change: 0 additions & 1 deletion autotest/gcore/asyncreader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test AsyncReader interface
Expand Down
Loading
Loading