Skip to content

Commit

Permalink
upgrade PROJ to 9.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Nov 29, 2023
1 parent 3d6a966 commit 33a71ba
Show file tree
Hide file tree
Showing 270 changed files with 29,542 additions and 20,951 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
- GDAL 3.8.0 with new `JSONFG`, `PMTiles` and `S102` drivers
- PROJ 9.3.0
- GEOS 3.12.1
- HDF5 1.14.3
- NetCDF 4.9.2
Expand Down
2 changes: 1 addition & 1 deletion deps/libproj.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/libproj"

PROJ_VERSION=9.0.0
PROJ_VERSION=9.3.0
dir_proj=./proj

#
Expand Down
4 changes: 2 additions & 2 deletions deps/libproj/proj/CITATION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
To cite PROJ in publications use:

PROJ contributors (2020). PROJ coordinate transformation software
PROJ contributors (2023). PROJ coordinate transformation software
library. Open Source Geospatial Foundation. URL https://proj.org/.
DOI: 10.5281/zenodo.5884394

Expand All @@ -12,7 +12,7 @@ A BibTeX entry for LaTeX users is
title = {{PROJ} coordinate transformation software library},
author = {{PROJ contributors}},
organization = {Open Source Geospatial Foundation},
year = {2022},
year = {2023},
url = {https://proj.org/},
doi = {10.5281/zenodo.5884394},
}
70 changes: 70 additions & 0 deletions deps/libproj/proj/CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
cff-version: 1.2.0
message: Please cite this software using these metadata or in the CITATION file.
type: software
title: PROJ
version: 9.2.0
date-released: 2023-03-01
doi: 10.5281/zenodo.5884394
abstract: PROJ is a generic coordinate transformation software that transforms
geospatial coordinates from one coordinate reference system (CRS) to another.
This includes cartographic projections as well as geodetic transformations.
url: https://proj.org
repository-code: https://github.com/OSGeo/PROJ/
license: MIT
authors:
- given-names: Gerald I.
family-names: Evenden
affiliation: United States Geological Survey
- given-names: Even
family-names: Rouault
affiliation: Spatialys
orcid: https://orcid.org/0000-0002-5068-0476
- given-names: Frank
family-names: Warmerdam
affiliation: Planet Labs Inc
- given-names: Kristian
family-names: Evers
affiliation: Danish Agency for Data Supply and Infrastructure
orcid: https://orcid.org/0000-0002-1310-4576
- given-names: Thomas
family-names: Knudsen
affiliation: Danish Agency for Data Supply and Infrastructure
- given-names: Howard
family-names: Butler
affiliation: Hobu Inc
orcid: https://orcid.org/0000-0002-5340-1380
- given-names: Mike W.
family-names: Taves
affiliation: GNS Science
orcid: https://orcid.org/0000-0003-3657-7963
- given-names: Kurt
family-names: Schwehr
affiliation: Google Inc
orcid: https://orcid.org/0000-0002-5624-8190
- given-names: Elliott
family-names: Sales de Andrade
orcid: https://orcid.org/0000-0001-7310-8942
- given-names: Charles
family-names: Karney
affiliation: SRI International
orcid: https://orcid.org/0000-0002-5006-5836
- given-names: Sebastiaan
family-names: Couwenberg
- given-names: Nyall
family-names: Dawson
affiliation: North Road
orcid: https://orcid.org/0000-0001-9812-7584
- given-names: Alan D.
family-names: Snow
affiliation: Corteva
orcid: https://orcid.org/0000-0002-7333-3100
- given-names: Javier
family-names: Jimenez Shaw
orcid: https://orcid.org/0000-0002-7227-9173
keywords:
- PROJ
- geodesy
- cartography
- coordinates
- projections
- conversion
90 changes: 54 additions & 36 deletions deps/libproj/proj/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
/wd4706 # Suppress warning about assignment within conditional expression
/wd4996 # Suppress warning about sprintf, etc., being unsafe
)
if("$ENV{VSCMD_ARG_TGT_ARCH}" STREQUAL "arm64")
# Suppress an inaccurate warning when compiling for an MSVC/ARM64 platform
# It incorrectly assumes a division by zero is possible despite a check
set(PROJ_C_WARN_FLAGS ${PROJ_C_WARN_FLAGS} /wd4723)
endif()
set(PROJ_CXX_WARN_FLAGS /EHsc ${PROJ_C_WARN_FLAGS})
elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
if(MSVC)
Expand Down Expand Up @@ -110,7 +115,7 @@ message(STATUS "Configuring PROJ:")
#PROJ version information
################################################################################
include(ProjVersion)
proj_version(MAJOR 9 MINOR 0 PATCH 0)
proj_version(MAJOR 9 MINOR 3 PATCH 0)
set(PROJ_SOVERSION 25)
set(PROJ_BUILD_VERSION "${PROJ_SOVERSION}.${PROJ_VERSION}")

Expand Down Expand Up @@ -213,23 +218,42 @@ if(ENABLE_CURL)
find_package(CURL REQUIRED)
if(CURL_FOUND)
set(CURL_ENABLED TRUE)

# Target CURL::libcurl only defined since CMake 3.12
# TODO: remove this when CMake >= 3.12 required
if(NOT TARGET CURL::libcurl)
add_library(CURL::libcurl INTERFACE IMPORTED)
set_target_properties(CURL::libcurl PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${CURL_LIBRARIES}"
)
endif()
else()
message(SEND_ERROR "curl dependency not found!")
endif()
endif()

################################################################################

option(PROJ_LIB_ENV_VAR_TRIED_LAST "Whether the PROJ_LIB environment variable should be tried after the hardcoded location" OFF)
if(PROJ_LIB_ENV_VAR_TRIED_LAST)
add_definitions(-DPROJ_LIB_ENV_VAR_TRIED_LAST)
if(DEFINED PROJ_LIB_ENV_VAR_TRIED_LAST)
set(PROJ_DATA_ENV_VAR_TRIED_LAST ${PROJ_LIB_ENV_VAR_TRIED_LAST})
message(WARNING "PROJ_LIB_ENV_VAR_TRIED_LAST option has been renamed to PROJ_DATA_ENV_VAR_TRIED_LAST. PROJ_LIB_ENV_VAR_TRIED_LAST is still working for now, but may be completely replaced by PROJ_DATA_ENV_VAR_TRIED_LAST in a future release")
else()
option(PROJ_DATA_ENV_VAR_TRIED_LAST "Whether the PROJ_DATA environment variable should be tried after the hardcoded location" OFF)
endif()
if(PROJ_DATA_ENV_VAR_TRIED_LAST)
add_definitions(-DPROJ_DATA_ENV_VAR_TRIED_LAST)
endif()

################################################################################
# threading configuration
################################################################################
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads)
if(Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
set(CMAKE_REQUIRED_LIBRARIES
"${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}")
endif()

include(CheckCSourceCompiles)
if(MSVC)
Expand All @@ -239,23 +263,6 @@ else()
set(CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall")
endif()

if(Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
set(CMAKE_REQUIRED_LIBRARIES
"${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}")
check_c_source_compiles("
#include <pthread.h>
int main(int argc, char* argv[]) {
(void)PTHREAD_MUTEX_RECURSIVE;
(void)argv;
return argc;
}
" HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
if(HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
add_definitions(-DHAVE_PTHREAD_MUTEX_RECURSIVE=1)
endif()
endif()

# Set a default build type for single-configuration cmake generators if
# no build type is set.
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
Expand All @@ -281,18 +288,21 @@ link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
# Installation
################################################################################
include(ProjInstallPath)
set(BINDIR "${DEFAULT_BINDIR}"
CACHE PATH "The directory to install binaries into.")
set(LIBDIR "${DEFAULT_LIBDIR}"
CACHE PATH "The directory to install libraries into.")
set(DATADIR "${DEFAULT_DATADIR}"
CACHE PATH "The directory to install data files into.")
set(DOCDIR "${DEFAULT_DOCDIR}"
CACHE PATH "The directory to install doc files into.")
set(INCLUDEDIR "${DEFAULT_INCLUDEDIR}"
CACHE PATH "The directory to install includes into.")
set(CMAKECONFIGDIR "${DEFAULT_CMAKEDIR}"
CACHE PATH "Parent of the directory to install cmake config files into.")

# By default GNUInstallDirs will use the upper case project name
# for CMAKE_INSTALL_DOCDIR, resulting in something like share/doc/PROJ
# instead of share/doc/proj which historically have been the path used
# by the project.
# Here force the use of a lower case project name and reset after
# GNUInstallDirs has done its thing
set(PROJECT_NAME_ORIGINAL "${PROJECT_NAME}")
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME)

include(GNUInstallDirs)

set(PROJECT_NAME "${PROJECT_NAME_ORIGINAL}")

set(PROJ_DATA_PATH "${CMAKE_INSTALL_FULL_DATADIR}/proj")

################################################################################
# Tests
Expand All @@ -319,9 +329,14 @@ if(BUILD_TESTING)
add_subdirectory(test)
endif()

option(BUILD_EXAMPLES "Whether to build example programs" OFF)
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()

set(docfiles COPYING NEWS AUTHORS)
install(FILES ${docfiles}
DESTINATION "${DOCDIR}")
DESTINATION ${CMAKE_INSTALL_DOCDIR})

################################################################################
# pkg-config support
Expand All @@ -330,7 +345,7 @@ configure_proj_pc()

install(FILES
${CMAKE_CURRENT_BINARY_DIR}/proj.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")

################################################################################
# "make dist" workalike
Expand All @@ -354,10 +369,10 @@ set(CPACK_SOURCE_IGNORE_FILES
/autom4te\\.cache
/CODE_OF_CONDUCT.md
/CONTRIBUTING.md
/disabled_workflows/
/Dockerfile
/docs/
/Doxyfile
/examples/
/HOWTO-RELEASE
/m4/lt*
/m4/libtool*
Expand Down Expand Up @@ -388,3 +403,6 @@ if(NOT _is_multi_config_generator)
)
message(STATUS "PROJ: Configured 'dist' target")
endif()

configure_file(cmake/uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/proj_uninstall.cmake @ONLY)
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/proj_uninstall.cmake)
3 changes: 1 addition & 2 deletions deps/libproj/proj/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# PROJ

[![Travis Status](https://travis-ci.com/OSGeo/PROJ.svg?branch=master)](https://travis-ci.com/OSGeo/PROJ)
[![AppVeyor Status](https://ci.appveyor.com/api/projects/status/github/OSGeo/PROJ?branch=master&svg=true)](https://ci.appveyor.com/project/OSGeo/PROJ?branch=master)
[![Travis Status](https://app.travis-ci.com/OSGeo/PROJ.svg?branch=master)](https://app.travis-ci.com/github/OSGeo/PROJ)
[![Docker build Status](https://img.shields.io/docker/cloud/build/osgeo/proj)](https://hub.docker.com/r/osgeo/proj/builds)
[![Coveralls Status](https://coveralls.io/repos/github/OSGeo/PROJ/badge.svg?branch=master)](https://coveralls.io/github/OSGeo/PROJ?branch=master)
[![Gitter](https://badges.gitter.im/OSGeo/proj.4.svg)](https://gitter.im/OSGeo/proj.4)
Expand Down
34 changes: 18 additions & 16 deletions deps/libproj/proj/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ string (TOLOWER "${PROJECT_LEGACY_NAME}" PROJECT_LEGACY_LOWER)
#
# At some more distant date, the PROJ4::proj target will be retired.
#
# To support this change, the CACHE variables PROJ_CMAKE_SUBDIR (and
# CMAKECONFIGDIR) is now the "Parent of directory to install cmake
# config files into".
#
# All this messiness is confined to
#
Expand All @@ -85,17 +82,20 @@ else ()
set (MSVC_TOOLSET_VERSION 0)
set (MSVC_TOOLSET_MAJOR 0)
endif ()
if (CMAKE_CROSSCOMPILING)
# Ensure that all "true" (resp. "false") settings are represented by
# the same string.
set (CMAKE_CROSSCOMPILING_STR "ON")
else ()
set (CMAKE_CROSSCOMPILING_STR "OFF")
endif ()

foreach (PROJECT_VARIANT_NAME ${PROJECT_NAME} ${PROJECT_LEGACY_NAME})
# If this is a regular build (PROJECT_SOURCE_DIR == CMAKE_SOURCE_DIR), export legacy files by default
# Otherwise, this is embedded in another project, only export PROJ target
# cf https://github.com/OSGeo/gdal/issues/5646
string(COMPARE EQUAL "${PROJECT_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}" DEFAULT_VAL)
option(INSTALL_LEGACY_CMAKE_FILES "Install PROJ4 legacy target CMake files" ${DEFAULT_VAL})

set(PROJECT_LIST ${PROJECT_NAME})
if (INSTALL_LEGACY_CMAKE_FILES)
set(PROJECT_LIST "${PROJECT_LIST}" "${PROJECT_LEGACY_NAME}")
endif ()
foreach (PROJECT_VARIANT_NAME IN LISTS PROJECT_LIST)
string (TOLOWER "${PROJECT_VARIANT_NAME}" PROJECT_VARIANT_LOWER)
set (CMAKECONFIGSUBDIR "${CMAKECONFIGDIR}/${PROJECT_VARIANT_LOWER}")
set (CMAKECONFIGSUBDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_VARIANT_LOWER}")
# proj-config.cmake for the install tree. It's installed in
# ${CMAKECONFIGSUBDIR} and @PROJECT_ROOT_DIR@ is the relative
# path to the root from there. (Note that the whole install tree can
Expand All @@ -120,9 +120,11 @@ foreach (PROJECT_VARIANT_NAME ${PROJECT_NAME} ${PROJECT_LEGACY_NAME})
NAMESPACE ${PROJECT_NAME}::
FILE ${PROJECT_NAME_LOWER}-targets.cmake
DESTINATION "${CMAKECONFIGSUBDIR}")
install(EXPORT targets
NAMESPACE ${PROJECT_LEGACY_NAME}::
FILE ${PROJECT_LEGACY_LOWER}-targets.cmake
DESTINATION "${CMAKECONFIGSUBDIR}")
if (INSTALL_LEGACY_CMAKE_FILES)
install(EXPORT targets
NAMESPACE ${PROJECT_LEGACY_NAME}::
FILE ${PROJECT_LEGACY_LOWER}-targets.cmake
DESTINATION "${CMAKECONFIGSUBDIR}")
endif()
endforeach ()

3 changes: 1 addition & 2 deletions deps/libproj/proj/data/CH
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# See: https://shop.swisstopo.admin.ch/en/products/geo_software/GIS_info
#
# You'll need to download the grids separately and put in a directory
# scanned by libproj. Directories may be added to the scan list through
# the PROJ_LIB environment variable
# scanned by libproj.
#
# Note that an independent effort was made to derive an usable grid
# from the CH1903->CH1903+ grid initially available from the Swisstopo
Expand Down
6 changes: 3 additions & 3 deletions deps/libproj/proj/data/ITRF2014
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

<ITRF97> +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +d=0.0038 +rz=0.00026 +dx0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector

<ITRF96> +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +s=0.0038 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +t_epoch=2010.0 +convention=position_vector
<ITRF96> +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +s=0.0038 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector

<ITRF94> +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +s=0.0038 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +t_epoch=2010.0 +convention=position_vector
<ITRF94> +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +s=0.0038 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector

<ITRF93> +proj=helmert +x=-0.0504 +y=0.0033 +z=-0.0602 +s=0.00429 +rx=-0.00281 +ry=-0.00338 +rz=0.0004 +dx=-0.0028 +dy=-0.0001 +dz=-0.0025 +ds=0.00012 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +t_epoch=2010.0 +convention=position_vector

Expand All @@ -23,7 +23,7 @@

<ITRF89> +proj=helmert +x=0.0304 +y=0.0355 +z=-0.1308 +s=0.00819 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector

<ITRF88> +proj=helmert +x=0.0254 +y=-0.0005 +z=-0.1548 +s=0.01129 +rx=0.0001 +rz= +dx=0.00026 +dy=0.0001 +dx=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector
<ITRF88> +proj=helmert +x=0.0254 +y=-0.0005 +z=-0.1548 +s=0.01129 +rx=0.0001 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector

# ITRF2014 Plate Motion Model parameters
#
Expand Down
Binary file modified deps/libproj/proj/data/proj.db
Binary file not shown.
Loading

0 comments on commit 33a71ba

Please sign in to comment.