Skip to content

Commit

Permalink
Merge branch 'OSGeo:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
a0x8o authored Sep 4, 2024
2 parents 59bef2e + 4650dbb commit 888f5ff
Show file tree
Hide file tree
Showing 226 changed files with 3,196 additions and 2,003 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/cmake_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ jobs:
- name: Install pdfium
run: |
wget -q https://github.com/rouault/pdfium_build_gdal_3_9/releases/download/pdfium_6309_v1/install-ubuntu2004-rev6309.tar.gz \
&& tar -xzf install-ubuntu2004-rev6309.tar.gz \
wget -q https://github.com/rouault/pdfium_build_gdal_3_10/releases/download/pdfium_6677_v1/install-ubuntu2004-rev6677.tar.gz \
&& tar -xzf install-ubuntu2004-rev6677.tar.gz \
&& sudo chown -R root:root install \
&& sudo mv install/lib/* /usr/lib/ \
&& sudo mv install/include/* /usr/include/ \
&& sudo rm -rf install-ubuntu2004-rev6309.tar.gz install \
&& sudo rm -rf install-ubuntu2004-rev6677.tar.gz install \
&& sudo apt-get update -y \
&& sudo apt-get install -y --fix-missing --no-install-recommends liblcms2-dev
- name: Configure ccache
Expand Down Expand Up @@ -314,7 +314,7 @@ jobs:
- name: Checkout GDAL
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install development packages
uses: msys2/setup-msys2@5df0ca6cbf14efcd08f8d5bd5e049a3cc8e07fd2 # v2.24.0
uses: msys2/setup-msys2@ddf331adaebd714795f1042345e6ca57bd66cea8 # v2.24.1
with:
msystem: MINGW64
update: true
Expand Down Expand Up @@ -437,8 +437,8 @@ jobs:
- name: Install pdfium
shell: bash -l {0}
run: |
curl -LOs https://github.com/rouault/pdfium_build_gdal_3_9/releases/download/pdfium_6309_v1/install-win10-vs2019-x64-rev6309.zip
unzip install-win10-vs2019-x64-rev6309.zip
curl -LOs https://github.com/rouault/pdfium_build_gdal_3_10/releases/download/pdfium_6677_v1/install-win10-vs2019-x64-rev6677.zip
unzip install-win10-vs2019-x64-rev6677.zip
mv install install-pdfium
- name: Remove conflicting libraries
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

doxygen:
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.8
- name: Install lint tool
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
# We do that after running CMake to avoid CodeQL to trigger during CMake time,
# in particular during HDF5 detection which is terribly slow (https://github.com/OSGeo/gdal/issues/9549)
- name: Initialize CodeQL
uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -127,6 +127,6 @@ jobs:
cmake --build build -j$(nproc)
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
uses: github/codeql-action/analyze@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
source ../ci/travis/conda/compile.sh
working-directory: ./gdal-feedstock

- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: ${{ matrix.platform }}-conda-package
path: ./gdal-feedstock/packages/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delete_untagged_containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
if: github.repository == 'OSGeo/gdal'
steps:
- name: Delete all containers from gdal-deps without tags
uses: Chizkiyahu/delete-untagged-ghcr-action@e8c780ca2d589797e657691fc16bffe066714890 # v4.0.0
uses: Chizkiyahu/delete-untagged-ghcr-action@b302990b6c629f3b272a31f3c3a268e1f7d0ffae # v4.0.1
with:
token: ${{ secrets.PAT_TOKEN_DELETE_UNTAGGED_CONTAINERS }}
repository_owner: ${{ github.repository_owner }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:

jobs:
docs:
name: Docs
name: Documentation checks

runs-on: ubuntu-latest
strategy:
Expand All @@ -40,6 +40,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_APPS=OFF \
-DBUILD_TESTING=OFF \
-DGDAL_BUILD_OPTIONAL_DRIVERS=OFF \
-DOGR_BUILD_OPTIONAL_DRIVERS=OFF
cmake --build . -j$(nproc)
Expand Down Expand Up @@ -75,69 +76,14 @@ jobs:
run: |
mkdir -p doc/build
doxygen Doxyfile
- name: HTML
- name: Generated RST files
shell: bash -l {0}
run: |
make html O="-D enable_redirects=1"
working-directory: ./doc
- name: PDF
shell: bash -l {0}
run: |
make latexpdf
make generated_rst_files
working-directory: ./doc
- name: Spelling
shell: bash -l {0}
run: |
sed -i '/html_extra_path/d' source/conf.py # avoid WARNING: html_extra_path entry '../build/html_extra' is placed inside outdir
make spelling
working-directory: ./doc
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: PDF
path: doc/build/latex/gdal.pdf
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: HTML
path: doc/build/html/*
#- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
# with:
# name: Misspelled
# path: doc/build/spelling/output.txt
- name: Deploy ssh key
if: ${{ github.ref_name == 'master' && github.repository == 'OSGeo/gdal' }}
shell: bash -l {0}
run: |
apt install -y ssh
mkdir -p /root/.ssh && echo "${{ secrets.SSH_KEY_DOCS }}" > /root/.ssh/id_rsa
chmod 700 /root/.ssh && chmod 600 /root/.ssh/id_rsa
ssh-keyscan -t rsa github.com >> /root/.ssh/known_hosts
eval `ssh-agent -s`
ssh-add /root/.ssh/id_rsa
- name: Deploy to gdal.org
if: ${{ github.ref_name == 'master' && github.repository == 'OSGeo/gdal' }}
shell: bash -l {0}
run: |
set -x
set -e
cd /__w/gdal
mv gdal/doc/build/html gdal-docs
rm gdal-docs/gdal.pdf
cp gdal/doc/build/latex/gdal.pdf gdal-docs
cp gdal/data/gdalicon.png gdal-docs # For GDAL autotest...
cp -r gdal/resources gdal-docs # Do not change this without changing swig/python/gdal-utils/osgeo_utils/gdal2tiles.py
#
git clone https://github.com/OSGeo/libgeotiff
cp -r libgeotiff/geotiff/html/proj_list gdal-docs/
#
cd gdal-docs
wget http://download.osgeo.org/gdal/for_doc/javadoc.zip -O /tmp/javadoc.zip
unzip -q /tmp/javadoc.zip
git init
git config user.email "[email protected]"
git config user.name "GDAL Bot"
git remote add origin [email protected]:OSGeo/gdal-docs.git
git remote -v
echo "gdal.org" > CNAME
touch .nojekyll
git add -A
git commit -m "Update with OSGeo/gdal commit $GITHUB_SHA"
git push -f origin master
4 changes: 2 additions & 2 deletions .github/workflows/linux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,14 @@ jobs:
docker push ${CONTAINER_NAME_FULL}
- name: Upload coverage artifacts
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: ${{ matrix.id == 'coverage' }}
with:
name: coverage_index.html
path: build-${{ matrix.id }}/coverage_html/index.html

- name: Upload coverage artifacts
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: ${{ matrix.id == 'coverage' }}
with:
name: HTML
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
with:
sarif_file: results.sarif
6 changes: 3 additions & 3 deletions .github/workflows/ubuntu_20.04/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ RUN mkdir geos \
&& rm -rf geos

# Install pdfium
RUN wget -q https://github.com/rouault/pdfium_build_gdal_3_9/releases/download/pdfium_6309_v1/install-ubuntu2004-rev6309.tar.gz \
&& tar -xzf install-ubuntu2004-rev6309.tar.gz \
RUN wget -q https://github.com/rouault/pdfium_build_gdal_3_10/releases/download/pdfium_6677_v1/install-ubuntu2004-rev6677.tar.gz \
&& tar -xzf install-ubuntu2004-rev6677.tar.gz \
&& chown -R root:root install \
&& mv install/lib/* /usr/lib/ \
&& mv install/include/* /usr/include/ \
&& rm -rf install-ubuntu2004-rev6309.tar.gz install
&& rm -rf install-ubuntu2004-rev6677.tar.gz install

# HANA: client side
# Install hdbsql tool
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
$env:PATH="$env:GITHUB_WORKSPACE;$env:PATH"
$env:PROJ_INSTALL_DIR="$env:GITHUB_WORKSPACE"+"\install-proj"
$env:CMAKE_INSTALL_PREFIX="-DCMAKE_INSTALL_PREFIX=" + $env:PROJ_INSTALL_DIR
cmake -G $env:VS_VERSION -A $env:CMAKE_ARCHITECTURE .. $env:CMAKE_INSTALL_PREFIX -DPROJ_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBPROJ_SHARED=ON -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DBUILD_SHARED_LIBS=ON -DENABLE_CURL=OFF -DENABLE_TIFF=OFF -DBUILD_PROJSYNC=OFF
cmake -G $env:VS_VERSION -A $env:CMAKE_ARCHITECTURE .. $env:CMAKE_INSTALL_PREFIX -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBPROJ_SHARED=ON -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DBUILD_SHARED_LIBS=ON -DENABLE_CURL=OFF -DENABLE_TIFF=OFF -DBUILD_PROJSYNC=OFF
exec { cmake --build . --config Release --target install }
#
cd $env:GITHUB_WORKSPACE
Expand Down
42 changes: 42 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: "ubuntu-24.04"
tools:
python: "3.12"

jobs:
post_checkout:
- (git --no-pager log --pretty="tformat:%s -- %b" -1 | grep -viqP "skip ci|ci skip") || exit 183
pre_build:
- ./doc/rtd/pre_build.sh
- cd doc && make doxygen generated_rst_files

apt_packages:
- ant
- cmake
- doxygen
- g++
- libproj-dev
- make
- openjdk-11-jdk-headless
- patchelf
- swig
- unzip

formats:
- htmlzip
- pdf

python:
install:
- requirements: doc/requirements.txt

sphinx:
configuration: doc/source/conf.py
fail_on_warning: true
8 changes: 4 additions & 4 deletions alg/gdal_rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,9 @@ static void *GDALCreateSimilarRPCTransformer(void *hTransformArg,

char **papszOptions = nullptr;
papszOptions = CSLSetNameValue(papszOptions, "RPC_HEIGHT",
CPLSPrintf("%.18g", psInfo->dfHeightOffset));
CPLSPrintf("%.17g", psInfo->dfHeightOffset));
papszOptions = CSLSetNameValue(papszOptions, "RPC_HEIGHT_SCALE",
CPLSPrintf("%.18g", psInfo->dfHeightScale));
CPLSPrintf("%.17g", psInfo->dfHeightScale));
if (psInfo->pszDEMPath != nullptr)
{
papszOptions =
Expand All @@ -529,7 +529,7 @@ static void *GDALCreateSimilarRPCTransformer(void *hTransformArg,
if (psInfo->bHasDEMMissingValue)
papszOptions =
CSLSetNameValue(papszOptions, "RPC_DEM_MISSING_VALUE",
CPLSPrintf("%.18g", psInfo->dfDEMMissingValue));
CPLSPrintf("%.17g", psInfo->dfDEMMissingValue));
papszOptions =
CSLSetNameValue(papszOptions, "RPC_DEM_APPLY_VDATUM_SHIFT",
(psInfo->bApplyDEMVDatumShift) ? "TRUE" : "FALSE");
Expand Down Expand Up @@ -2032,7 +2032,7 @@ CPLXMLNode *GDALSerializeRPCTransformer(void *pTransformArg)
{
CPLCreateXMLElementAndValue(
psTree, "DEMMissingValue",
CPLSPrintf("%.18g", psInfo->dfDEMMissingValue));
CPLSPrintf("%.17g", psInfo->dfDEMMissingValue));
}

CPLCreateXMLElementAndValue(psTree, "DEMApplyVDatumShift",
Expand Down
3 changes: 2 additions & 1 deletion alg/gdalapplyverticalshiftgrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

#include "proj.h"

#include <cmath>
#include <limits>

/************************************************************************/
Expand Down Expand Up @@ -255,7 +256,7 @@ CPLErr GDALApplyVSGRasterBand::IReadBlock(int nBlockXOff, int nBlockYOff,
if (bHasNoData && fSrcVal == fNoDataValue)
{
}
else if (CPLIsInf(fGridVal))
else if (std::isinf(fGridVal))
{
CPLError(CE_Failure, CPLE_AppDefined,
"Missing vertical grid value at source (%d,%d)",
Expand Down
8 changes: 4 additions & 4 deletions alg/gdalgeoloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1591,9 +1591,9 @@ static void GDALGeoLocRescale(char **&papszMD, const char *pszItem,
{
const double dfVal =
dfRatio * CPLAtofM(CSLFetchNameValueDef(
papszMD, pszItem, CPLSPrintf("%.18g", dfDefaultVal)));
papszMD, pszItem, CPLSPrintf("%.17g", dfDefaultVal)));

papszMD = CSLSetNameValue(papszMD, pszItem, CPLSPrintf("%.18g", dfVal));
papszMD = CSLSetNameValue(papszMD, pszItem, CPLSPrintf("%.17g", dfVal));
}

/************************************************************************/
Expand Down Expand Up @@ -1718,15 +1718,15 @@ CPLStringList GDALCreateGeolocationMetadata(GDALDatasetH hBaseDS,
if (aosMD.FetchNameValue("PIXEL_STEP") == nullptr)
{
aosMD.SetNameValue(
"PIXEL_STEP", CPLSPrintf("%.18g", static_cast<double>(
"PIXEL_STEP", CPLSPrintf("%.17g", static_cast<double>(
GDALGetRasterXSize(hBaseDS)) /
nGeoLocXSize));
}

if (aosMD.FetchNameValue("LINE_STEP") == nullptr)
{
aosMD.SetNameValue(
"LINE_STEP", CPLSPrintf("%.18g", static_cast<double>(
"LINE_STEP", CPLSPrintf("%.17g", static_cast<double>(
GDALGetRasterYSize(hBaseDS)) /
nGeoLocYSize));
}
Expand Down
Loading

0 comments on commit 888f5ff

Please sign in to comment.