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

Getting last changes #8

Merged
merged 71 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
877fc71
/vsicurl/: Read(): emit error message when receiving HTTP 416 Range N…
rouault Feb 18, 2024
fcfea6e
PG: remove support for PostgreSQL < 9 and PostGIS < 2 (fixes #8937)
rouault Feb 19, 2024
3b8d4a4
CPLCreateOrAcquireMutexEx(): fix TSAN/valgrind --tool=helgrind warnin…
rouault Feb 19, 2024
a1ba66f
GDALGetCacheMax64(): fix TSAN complaint (fixes #1837)
rouault Feb 19, 2024
1510ffc
gdaltindex: add -lco (fixes #3623)
rouault Feb 19, 2024
174a448
Win32 Stat(VSI_STAT_EXISTS_FLAG): use GetFileAttributesW() for faster…
rouault Feb 19, 2024
c25c497
PG: further cleanups for PostGIS < 2
rouault Feb 20, 2024
0c14536
GDALWMSDataset::Initialize(): avoid potential integer overflow (fixes…
rouault Feb 20, 2024
7967a18
GDALDeserializeGCPListFromXML(): fix memleak in error code path (mast…
rouault Feb 20, 2024
47c9b59
VRTComplexSource::RasterIOProcessNoData(): avoid potential assertion …
rouault Feb 20, 2024
9ad3d29
CPLVerifyConfiguration(): make it rely only on static_assert()
rouault Feb 20, 2024
16f4077
ogr/ogrsf_frmts/shape/COPYING: remove that LGPL license file
rouault Feb 21, 2024
410b295
gdal2tiles.py: fix exception when -v flag is used and overview tiles …
rouault Feb 22, 2024
a846500
Doc: sponsors: add Satelligence as a supporter level sponsor
rouault Feb 22, 2024
7338dec
Merge pull request #9283 from rouault/doc_sponsors_satelligence
rouault Feb 22, 2024
18a4515
Merge pull request #9265 from rouault/ossfuzz_fixes
rouault Feb 22, 2024
502f1a3
[gpkg] Also read relationships defined using foreign key constraints
nyalldawson Feb 22, 2024
9d207db
Avoid some duplicate code by moving identical methods to base class
nyalldawson Feb 22, 2024
48ddaf2
Merge pull request #9279 from nyalldawson/gpkg_one_to_many
rouault Feb 23, 2024
fecb13a
PMTiles: fix 'Non increasing tile_id' error when opening some files (…
rouault Feb 23, 2024
54166ef
Update gdal_grid.rst to discuss creating multiband files
jidanni Feb 24, 2024
eb13b16
Update index.rst noting offline individual HTML pages .ZIP
jidanni Feb 24, 2024
93d8f80
Update gdal2xyz.rst
jidanni Feb 24, 2024
016b6b4
Update gdal2xyz.rst removing bogus [< >]
jidanni Feb 24, 2024
92da8cb
Merge pull request #9293 from jidanni/patch-26
rouault Feb 24, 2024
5ee7b8a
Merge pull request #9294 from jidanni/patch-27
rouault Feb 24, 2024
6f0a84b
Merge pull request #9296 from jidanni/patch-28
rouault Feb 24, 2024
6384184
Merge pull request #9298 from jidanni/patch-30
rouault Feb 24, 2024
5eab9bf
Update gdaltransform.rst to add missing .. code-block::s (#9299)
jidanni Feb 24, 2024
d06d552
Update index.rst to say the ZIP includes the PDF
jidanni Feb 25, 2024
4eee276
Merge pull request #9303 from jidanni/patch-26
rouault Feb 25, 2024
2726b07
Update gdaltransform.rst about srcfile (#9292)
jidanni Feb 25, 2024
ef28df5
Update gdaltransform.rst
rouault Feb 25, 2024
5aa9940
codeql.yml: add 'sudo apt-get update'
rouault Feb 25, 2024
f962069
ODS: declare OLCStringsAsUTF8 on newly created layers
rouault Feb 24, 2024
442318b
XLSX: declare OLCStringsAsUTF8 on newly created layers
rouault Feb 24, 2024
b9438ae
Update software_using_gdal.rst restoring alphabetical order
jidanni Feb 25, 2024
42cce53
Update gdal2xyz.rst clarifying centers vs. corners
jidanni Feb 25, 2024
3b3fdce
Update xyz.rst to warn only three columns are used
jidanni Feb 25, 2024
680f964
Merge pull request #9304 from jidanni/patch-25
rouault Feb 25, 2024
6a1fde8
Merge pull request #9305 from jidanni/patch-26
rouault Feb 25, 2024
e1d7cc4
gdallocationinfo.rst: mention that pixel coordinates should be intege…
jidanni Feb 25, 2024
6b836bf
Merge pull request #9306 from jidanni/patch-27
rouault Feb 25, 2024
84262f8
sql_sqlite_dialect.rst: avoid use of non-ASCII characters (fixes #9308)
rouault Feb 25, 2024
0343bc2
gml.rst: fix the link to the .gfs XML schema (#9309)
jratike80 Feb 25, 2024
fe693c6
CI: add support for OSX arm64
rouault Feb 25, 2024
d828c6b
OGCAPI: fix Coverity Scan performance warning (CID 1534765)
rouault Feb 25, 2024
99ff19e
PDF: fix Coverity Scan performance warning (CID 1534770, 1534767, 153…
rouault Feb 25, 2024
f1c5937
ZARR: fix Coverity Scan performance warning (CID 1534762)
rouault Feb 25, 2024
5c1585c
VRT: fix Coverity Scan warnings about singleton vs array access (CID …
rouault Feb 25, 2024
a1d9d79
VRT: fix Coverity Scan warning about nullptr deref (CID 1534768)
rouault Feb 25, 2024
c228e2a
Disable my_test_sqlite3_ext in static builds
dg0yt Feb 25, 2024
58b8f6d
Merge pull request #9311 from dg0yt/sqlite3_ext
rouault Feb 25, 2024
f304ca5
Make sure our vendored flatbuffers copy has a unique namespace
rouault Feb 26, 2024
0c50bbc
build(deps): bump conda-incubator/setup-miniconda from 3.0.1 to 3.0.2
dependabot[bot] Feb 26, 2024
46b78a5
build(deps): bump github/codeql-action from 3.24.3 to 3.24.5
dependabot[bot] Feb 26, 2024
c00b061
Merge pull request #9314 from OSGeo/dependabot/github_actions/conda-i…
rouault Feb 26, 2024
7abeb94
Merge pull request #9315 from OSGeo/dependabot/github_actions/github/…
rouault Feb 26, 2024
6095912
Merge pull request #9244 from rouault/vsicurl_416
rouault Feb 26, 2024
c30205a
Merge pull request #9253 from rouault/fix_1837
rouault Feb 26, 2024
3001696
Merge pull request #9256 from rouault/fix_3139
rouault Feb 26, 2024
f9a10b0
Merge pull request #9257 from rouault/fix_3623
rouault Feb 26, 2024
3e08f7b
Merge pull request #9267 from rouault/CPLVerifyConfiguration_static
rouault Feb 26, 2024
ca55a91
Merge pull request #9282 from rouault/fix_9272
rouault Feb 26, 2024
64377d4
Merge pull request #9289 from rouault/fix_9288
rouault Feb 26, 2024
ce329ca
Merge pull request #9301 from rouault/fix_ods_xlsx_utf8
rouault Feb 26, 2024
23d0edd
Merge pull request #9310 from rouault/coverity_scan
rouault Feb 26, 2024
4129468
Merge pull request #9313 from rouault/flatbuffers_namespacing
rouault Feb 26, 2024
c3847cd
gdalinfo: do not call GDALGetFileList() if -nofl is specified (#9243)
rouault Feb 26, 2024
fb3c0fc
Merge pull request #9251 from rouault/fix_8937
rouault Feb 26, 2024
4170006
Merge pull request #9273 from rouault/remove_shape_COPYING
rouault Feb 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/cmake_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ jobs:
shell: pwsh
run: |
echo "JAVA_HOME=$env:JAVA_HOME_11_X64" >> %GITHUB_ENV%
- uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
- uses: conda-incubator/setup-miniconda@392cf345b1784333caa1a1185081c71e6ffd61bc # v3.0.2
with:
activate-environment: gdalenv
miniforge-variant: Mambaforge
Expand Down Expand Up @@ -506,7 +506,7 @@ jobs:
git config --global core.autocrlf false
- name: Checkout GDAL
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
- uses: conda-incubator/setup-miniconda@392cf345b1784333caa1a1185081c71e6ffd61bc # v3.0.2
with:
activate-environment: gdalenv
miniforge-variant: Mambaforge
Expand Down Expand Up @@ -653,7 +653,7 @@ jobs:
git config --global core.autocrlf false
- name: Checkout GDAL
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
- uses: conda-incubator/setup-miniconda@392cf345b1784333caa1a1185081c71e6ffd61bc # v3.0.2
with:
activate-environment: gdalenv
python-version: 3.9
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@379614612a29c9e28f31f39a59013eb8012a51f0 # v3.24.3
uses: github/codeql-action/init@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -61,6 +61,7 @@ jobs:

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ccache cmake g++ swig python3-numpy libproj-dev libqhull-dev
sudo apt-get install -y \
libblosc-dev \
Expand Down Expand Up @@ -148,6 +149,6 @@ jobs:
key: ${{ steps.restore-cache.outputs.cache-primary-key }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@379614612a29c9e28f31f39a59013eb8012a51f0 # v3.24.3
uses: github/codeql-action/analyze@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: true
matrix:
platform: ['ubuntu-latest','windows-latest','macos-latest']
platform: ['ubuntu-latest','windows-latest','macos-latest','macos-14']

env:
GHA_CI_PLATFORM: ${{ matrix.platform }}
Expand All @@ -47,7 +47,7 @@ jobs:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-${{ steps.get-date.outputs.today }}-conda-${{ env.CACHE_NUMBER }}

- uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
- uses: conda-incubator/setup-miniconda@392cf345b1784333caa1a1185081c71e6ffd61bc # v3.0.2
with:
#miniforge-variant: Mambaforge
miniforge-version: latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
- uses: conda-incubator/setup-miniconda@392cf345b1784333caa1a1185081c71e6ffd61bc # v3.0.2
with:
channels: conda-forge
auto-update-conda: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@379614612a29c9e28f31f39a59013eb8012a51f0 # v3.24.3
uses: github/codeql-action/upload-sarif@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
with:
sarif_file: results.sarif
50 changes: 24 additions & 26 deletions apps/gdalinfo_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,30 +290,31 @@ char *GDALInfo(GDALDatasetH hDataset, const GDALInfoOptions *psOptions)
GDALGetDriverShortName(hDriver), GDALGetDriverLongName(hDriver));
}

// The list of files of a raster FileGDB is not super useful and potentially
// super long, so omit it, unless the -json mode is enabled
char **papszFileList =
(!bJson && EQUAL(GDALGetDriverShortName(hDriver), "OpenFileGDB"))
? nullptr
: GDALGetFileList(hDataset);

if (papszFileList == nullptr || *papszFileList == nullptr)
if (psOptions->bShowFileList)
{
if (bJson)
// The list of files of a raster FileGDB is not super useful and potentially
// super long, so omit it, unless the -json mode is enabled
char **papszFileList =
(!bJson && EQUAL(GDALGetDriverShortName(hDriver), "OpenFileGDB"))
? nullptr
: GDALGetFileList(hDataset);

if (!papszFileList || *papszFileList == nullptr)
{
json_object *poFiles = json_object_new_array();
json_object_object_add(poJsonObject, "files", poFiles);
if (bJson)
{
json_object *poFiles = json_object_new_array();
json_object_object_add(poJsonObject, "files", poFiles);
}
else
{
Concat(osStr, psOptions->bStdoutOutput,
"Files: none associated\n");
}
}
else
{
Concat(osStr, psOptions->bStdoutOutput, "Files: none associated\n");
}
}
else
{
if (bJson)
{
if (psOptions->bShowFileList)
if (bJson)
{
json_object *poFiles = json_object_new_array();

Expand All @@ -327,20 +328,17 @@ char *GDALInfo(GDALDatasetH hDataset, const GDALInfoOptions *psOptions)

json_object_object_add(poJsonObject, "files", poFiles);
}
}
else
{
Concat(osStr, psOptions->bStdoutOutput, "Files: %s\n",
papszFileList[0]);
if (psOptions->bShowFileList)
else
{
Concat(osStr, psOptions->bStdoutOutput, "Files: %s\n",
papszFileList[0]);
for (int i = 1; papszFileList[i] != nullptr; i++)
Concat(osStr, psOptions->bStdoutOutput, " %s\n",
papszFileList[i]);
}
}
CSLDestroy(papszFileList);
}
CSLDestroy(papszFileList);

if (bJson)
{
Expand Down
2 changes: 1 addition & 1 deletion apps/gdaltindex_bin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static void Usage(bool bIsError, const char *pszErrorMsg)
" [-skip_different_projection] [-t_srs <target_srs>]\n"
" [-src_srs_name field_name] [-src_srs_format "
"{AUTO|WKT|EPSG|PROJ}]\n"
" [-lyr_name <name>]\n"
" [-lyr_name <name>] [-lco <KEY>=<VALUE>]...\n"
" [-gti_filename <name>]\n"
" [-tr <xres> <yres>] [-te <xmin> <ymin> <xmax> "
"<ymax>]\n"
Expand Down
12 changes: 9 additions & 3 deletions apps/gdaltindex_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ struct GDALTileIndexOptions
std::string osFormat{};
std::string osIndexLayerName{};
std::string osLocationField = "location";
CPLStringList aosLCO{};
std::string osTargetSRS{};
bool bWriteAbsolutePath = false;
bool bSkipDifferentProjection = false;
Expand Down Expand Up @@ -504,9 +505,9 @@ GDALDatasetH GDALTileIndex(const char *pszDest, int nSrcCount,
oSRS = *poSrcSRS;
}

poLayer = poTileIndexDS->CreateLayer(osLayerName.c_str(),
oSRS.IsEmpty() ? nullptr : &oSRS,
wkbPolygon, nullptr);
poLayer = poTileIndexDS->CreateLayer(
osLayerName.c_str(), oSRS.IsEmpty() ? nullptr : &oSRS, wkbPolygon,
psOptions->aosLCO.List());
if (!poLayer)
return nullptr;

Expand Down Expand Up @@ -1193,6 +1194,11 @@ GDALTileIndexOptionsNew(char **papszArgv,
CHECK_HAS_ENOUGH_ADDITIONAL_ARGS(1);
psOptions->osLocationField = papszArgv[++iArg];
}
else if (strcmp(papszArgv[iArg], "-lco") == 0)
{
CHECK_HAS_ENOUGH_ADDITIONAL_ARGS(1);
psOptions->aosLCO.AddString(papszArgv[++iArg]);
}
else if (strcmp(papszArgv[iArg], "-t_srs") == 0)
{
CHECK_HAS_ENOUGH_ADDITIONAL_ARGS(1);
Expand Down
Binary file not shown.
27 changes: 27 additions & 0 deletions autotest/ogr/ogr_gpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -7093,6 +7093,33 @@ def test_ogr_gpkg_relations(tmp_vsimem, tmp_path):
assert rel.GetRightMappingTableFields() == ["related_id"]
assert rel.GetRelatedTableType() == "features"

# a one-to-many relationship defined using foreign key constraints
ds = gdal.OpenEx(filename, gdal.OF_VECTOR | gdal.OF_UPDATE)
ds.ExecuteSQL(
"CREATE TABLE test_relation_a(artistid INTEGER PRIMARY KEY, artistname TEXT)"
)
ds.ExecuteSQL(
"CREATE TABLE test_relation_b(trackid INTEGER, trackname TEXT, trackartist INTEGER, FOREIGN KEY(trackartist) REFERENCES test_relation_a(artistid))"
)
ds = None

ds = gdal.OpenEx(filename, gdal.OF_VECTOR | gdal.OF_UPDATE)
assert ds.GetRelationshipNames() == [
"custom_type",
"test_relation_a_test_relation_b",
]
assert ds.GetRelationship("custom_type") is not None
rel = ds.GetRelationship("test_relation_a_test_relation_b")
assert rel is not None
assert rel.GetName() == "test_relation_a_test_relation_b"
assert rel.GetLeftTableName() == "test_relation_a"
assert rel.GetRightTableName() == "test_relation_b"
assert rel.GetCardinality() == gdal.GRC_ONE_TO_MANY
assert rel.GetType() == gdal.GRT_ASSOCIATION
assert rel.GetLeftTableFields() == ["artistid"]
assert rel.GetRightTableFields() == ["trackartist"]
assert rel.GetRelatedTableType() == "features"

ds = None


Expand Down
3 changes: 3 additions & 0 deletions autotest/ogr/ogr_ods.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def ogr_ods_check(ds):

assert lyr.TestCapability("foo") == 0

assert lyr.TestCapability(ogr.OLCStringsAsUTF8) == 1

lyr = ds.GetLayer(6)
assert lyr.GetName() == "Feuille7", "bad layer name"

Expand Down Expand Up @@ -363,6 +365,7 @@ def test_ogr_ods_8():
drv = ogr.GetDriverByName("ODS")
ds = drv.CreateDataSource("/vsimem/ogr_ods_8.ods")
lyr = ds.CreateLayer("foo")
assert lyr.TestCapability(ogr.OLCStringsAsUTF8) == 1
lyr.CreateField(ogr.FieldDefn("Field1", ogr.OFTInteger64))
f = ogr.Feature(lyr.GetLayerDefn())
f.SetField(0, 1)
Expand Down
Loading
Loading