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

[RFC4_dev] Address code review comments #1826

Merged
merged 57 commits into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
41ff947
Remove obsolete and presumably unfinished implementation of grid cata…
rouault Dec 4, 2019
1263848
vertical grid shift: rework to no longer load whole grid into memory
rouault Dec 4, 2019
6875ef7
horizontal grid shift: rework to no longer load whole grid into memory
rouault Dec 5, 2019
916a920
Remove hgrids and vgrids member from PJ structure, and store them in …
rouault Dec 6, 2019
22792cd
Add a Grid base class for HorizontalShiftGrid and VerticalShiftGrid
rouault Dec 6, 2019
1b702a8
Build and CI: add libtiff dependency
rouault Dec 6, 2019
9f908ae
Horizontal shift grids: hide the 'positive longitude shift value = we…
rouault Dec 9, 2019
1f01ecb
Add support for horizontal and vertical grids in GeoTIFF
rouault Dec 6, 2019
2804ee5
GTiff grid: use a block cache per dataset for faster access
rouault Dec 10, 2019
e872984
grids.hpp: add a GenericShiftGridSet and GenericShiftGrid classes, th…
rouault Dec 11, 2019
6d45bbc
Add a +proj=xyzgridshift method to perform geocentric translation by …
rouault Dec 11, 2019
3fa5d48
.cirrus.yml: add libtiff dependency
rouault Dec 11, 2019
8063c0b
test/gie/geotiff_grids.gie: use of subset of gr3df97a.tif for systema…
rouault Dec 11, 2019
c165952
grids.cpp: use 'parent_grid_name' as stated in RFC4
rouault Dec 12, 2019
49f8ea7
Add configure/CMake option, strongly discouraged, to disable TIFF sup…
rouault Dec 13, 2019
b934fd3
Grid class: add a name() method
rouault Dec 13, 2019
f36d237
Horizontal grid shift: fix issue on iterative inverse computation whe…
rouault Dec 13, 2019
a70e477
Rename PJ_CONTEXT::fileapi member as fileapi_legacy
rouault Dec 18, 2019
7baf00c
Add test for legacy proj_api.h fileapi before further reworks
rouault Dec 18, 2019
2dfe2cd
Add a FileManager and File class
rouault Dec 18, 2019
cde119a
grids.cpp: use FileManager/File interfaces
rouault Dec 18, 2019
d6ae528
Build: add optional curl dependency
rouault Dec 19, 2019
2aeb122
travis/osx/before_install.sh: do not install md5sha1sum from brew
rouault Dec 16, 2019
a06f4a2
Add proj_context_set_network_callbacks() with an empty implementation
rouault Dec 19, 2019
f73527f
Add very minimalistic and slow libcurl implementation
rouault Dec 19, 2019
ed92965
Network: add a memory cache and I/O chunking strategy
rouault Dec 20, 2019
d3bdbb8
Add testing of network functionality
rouault Dec 20, 2019
9d0bd79
Network: remove dedicated get_file_size() callback to use get_header_…
rouault Dec 23, 2019
0a1f1fe
Network: only enable it if PROJ_NETWORK=ON or proj_context_set_enable…
rouault Dec 23, 2019
c4589fb
Network: automatically use CDN resources when local resources not ava…
rouault Dec 25, 2019
2093aca
Network: make CDN endpoint configurable either in proj.ini, PROJ_NETW…
rouault Dec 25, 2019
aa8c782
Network: rework error handling
rouault Dec 25, 2019
f085b39
Handle context reassignment for Grid/GridSet/File objects
rouault Dec 27, 2019
be59650
xyzgridshift: implement defered grid loading in network context
rouault Dec 27, 2019
f934c00
CurlFileHandle: code improvement. No functional change
rouault Dec 27, 2019
28e1770
CurlFileHandle: set UserAgent
rouault Dec 27, 2019
830f94a
proj_hgrid_value(): do not apply compensation for west-oriented longi…
rouault Dec 29, 2019
17864e6
Travis: fix OSX builds
rouault Dec 28, 2019
ea73297
deformation: add support for +grids= for GeoTIFF grids
rouault Dec 29, 2019
db04012
Add a SQLite3 local cache of downloaded chunks
rouault Dec 30, 2019
ea10657
CMake build: install proj.ini
rouault Dec 31, 2019
11f6343
deformation.cpp: check that unit in TIFF file is 'millimetres per yea…
rouault Jan 1, 2020
08ae576
Merge branch 'deformation_with_geotiff_file' into rfc4_network_disk_c…
rouault Jan 1, 2020
19841f2
curl implementation: add retry logic on some HTTP errors
rouault Jan 1, 2020
eafeb61
Grid refactoring: address review comments of https://github.com/OSGeo…
rouault Jan 6, 2020
fc73b2f
DiskChunkCache::closeAndUnlink(): avoid use-after-free in the destructor
rouault Jan 7, 2020
237296b
Remote grid: add mechanism to re-open a grid if it has changed while …
rouault Jan 7, 2020
e8459c1
xyzgridshift.rst: fix typo
rouault Jan 7, 2020
13d651a
geotiff_grids.gie: add comment
rouault Jan 7, 2020
32fc01c
CMake: use more neutral DISABLE_TIFF switch (refs https://github.com/…
rouault Jan 7, 2020
408cb1e
deformation.cpp and xyzgridshift.cpp: factor out common code (address…
rouault Jan 7, 2020
316ca96
network: handle opening remote grids whose local name has no extension
rouault Jan 7, 2020
8821b35
Doc: address code review comments
rouault Jan 7, 2020
dd9afa3
pj_bilinear_interpolation_three_samples(): fix MSVC warning about uni…
rouault Jan 7, 2020
da93fe3
NTv2GridSet::open(): reject files with GS_TYPE!=SECONDS (fixes #1294)
rouault Jan 8, 2020
9263e1d
Add capability to read resource files from the user writable directory
rouault Jan 8, 2020
90b6685
Add proj_is_download_needed() and proj_download_file()
rouault Jan 9, 2020
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
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ task:
folder: $HOME/.ccache

pkginstall_script:
- pkg install -y autoconf automake libtool pkgconf sqlite3 wget unzip ccache gmake
- pkg install -y autoconf automake libtool pkgconf sqlite3 tiff wget unzip ccache gmake
download_grid_script:
- wget https://download.osgeo.org/proj/proj-datumgrid-1.8.zip
- (cd data && unzip -o ../proj-datumgrid-1.8.zip)
Expand Down
36 changes: 36 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
set(PROJ_CXX_WARN_FLAGS -Wall)
endif()
endif()

add_definitions(-DNOMINMAX)

set(PROJ_C_WARN_FLAGS "${PROJ_C_WARN_FLAGS}"
CACHE STRING "C flags used to compile PROJ targets")
set(PROJ_CXX_WARN_FLAGS "${PROJ_CXX_WARN_FLAGS}"
Expand Down Expand Up @@ -133,6 +136,39 @@ IF("${SQLITE3_VERSION}" VERSION_LESS "3.11")
message(SEND_ERROR "sqlite3 >= 3.11 required!")
ENDIF()

################################################################################
# Check for libtiff
################################################################################

option(DISABLE_TIFF "Disable TIFF support" OFF)
mark_as_advanced(DISABLE_TIFF)
if(DISABLE_TIFF)
message(WARNING "TIFF support has been disabled and will result in the inability to read some grids")
else()
find_package(TIFF REQUIRED)
if(TIFF_FOUND)
boost_report_value(TIFF_FOUND)
else()
message(SEND_ERROR "libtiff dependency not found!")
endif()
add_definitions(-DTIFF_ENABLED)
endif()

################################################################################
# Check for curl
################################################################################

option(ENABLE_CURL "Enable Curl support" ON)
if(ENABLE_CURL)
find_package(CURL REQUIRED)
if(CURL_FOUND)
boost_report_value(CURL_FOUND)
else()
message(SEND_ERROR "curl dependency not found!")
endif()
add_definitions(-DCURL_ENABLED)
endif()

################################################################################
# threading configuration
################################################################################
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = src/iso19111 include/proj src/proj.h src/proj_experimental.h src/general_doc.dox
INPUT = src/iso19111 include/proj src/proj.h src/proj_experimental.h src/general_doc.dox src/filemanager.cpp

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
5 changes: 4 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ build_script:
- set PATH=%CD%;%PATH%
- cd ..
- vcpkg install sqlite3:"%platform%"-windows
- vcpkg install tiff:"%platform%"-windows
- vcpkg install curl:"%platform%"-windows
- set SQLITE3_BIN=%APPVEYOR_BUILD_FOLDER%\sqlite3\bin
- mkdir %SQLITE3_BIN%
- copy c:\projects\proj\vcpkg\installed\"%platform%"-windows\bin\sqlite3.dll %SQLITE3_BIN%
- ps: |
appveyor DownloadFile https://sqlite.org/2018/sqlite-tools-win32-x86-3250100.zip
7z x sqlite-tools-win32-x86-3250100.zip
Expand All @@ -47,6 +48,8 @@ build_script:
- set PROJ_DIR=%APPVEYOR_BUILD_FOLDER%\proj_dir
- cmake -G "%VS_FULL%" .. -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBPROJ_SHARED="%BUILD_LIBPROJ_SHARED%" -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX" -DCMAKE_TOOLCHAIN_FILE=C:/projects/proj/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX="%PROJ_DIR%"
- cmake --build . --config Release --target install
- copy c:\projects\proj\vcpkg\installed\"%platform%"-windows\bin\*.dll %PROJ_DIR%\bin
- dir %PROJ_DIR%\bin

test_script:
- echo test_script
Expand Down
19 changes: 15 additions & 4 deletions cmake/ProjTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ function(proj_add_test_script_sh SH_NAME BIN_USE)
COMMAND ${PROJECT_SOURCE_DIR}/test/cli/${SH_NAME}
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${${BIN_USE}}
)
set_tests_properties( ${testname}
PROPERTIES ENVIRONMENT "PROJ_LIB=${PROJECT_BINARY_DIR}/data")
if(MSVC)
set_tests_properties( ${testname}
PROPERTIES ENVIRONMENT "PROJ_LIB=${PROJECT_BINARY_DIR}/data\\;${PROJECT_SOURCE_DIR}/data")
else()
set_tests_properties( ${testname}
PROPERTIES ENVIRONMENT "PROJ_LIB=${PROJECT_BINARY_DIR}/data:${PROJECT_SOURCE_DIR}/data")
endif()
endif()

endif()
Expand All @@ -43,8 +48,14 @@ function(proj_add_gie_test TESTNAME TESTCASE)
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${GIE_BIN}
${TESTFILE}
)
set_tests_properties( ${TESTNAME}
PROPERTIES ENVIRONMENT "PROJ_LIB=${PROJECT_BINARY_DIR}/data")

if(MSVC)
set_tests_properties( ${TESTNAME}
PROPERTIES ENVIRONMENT "PROJ_LIB=${PROJECT_BINARY_DIR}/data\\;${PROJECT_SOURCE_DIR}/data")
else()
set_tests_properties( ${TESTNAME}
PROPERTIES ENVIRONMENT "PROJ_LIB=${PROJECT_BINARY_DIR}/data:${PROJECT_SOURCE_DIR}/data")
endif()


endfunction()
78 changes: 76 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ AC_PROG_LN_S
AC_PROG_MAKE_SET
AM_PROG_LIBTOOL

PKG_PROG_PKG_CONFIG

dnl Enable as much warnings as possible
AX_CFLAGS_WARN_ALL(C_WFLAGS)
AX_CXXFLAGS_WARN_ALL(CXX_WFLAGS)
Expand Down Expand Up @@ -166,8 +168,8 @@ AC_SUBST(C_WFLAGS,$C_WFLAGS)
AC_SUBST(CXX_WFLAGS,$CXX_WFLAGS)
AC_SUBST(NO_ZERO_AS_NULL_POINTER_CONSTANT_FLAG,$NO_ZERO_AS_NULL_POINTER_CONSTANT_FLAG)

CFLAGS="${CFLAGS} -fvisibility=hidden"
CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
CFLAGS="${CFLAGS} -fvisibility=hidden -DNOMINMAX"
CXXFLAGS="${CXXFLAGS} -fvisibility=hidden -DNOMINMAX"

dnl Checks for libraries.
save_CFLAGS="$CFLAGS"
Expand Down Expand Up @@ -294,6 +296,78 @@ if test x"$SQLITE3_CHECK" != x"yes" ; then
AC_MSG_ERROR([Please install sqlite3 binary.])
fi

dnl ---------------------------------------------------------------------------
dnl Check for libtiff
dnl ---------------------------------------------------------------------------

AC_ARG_ENABLE([tiff-is-strongly-discouraged],
AS_HELP_STRING([--disable-tiff-is-strongly-discouraged],
[Disable TIFF support. Strongly discouraged !]),
[enable_tiff=no],
[enable_tiff=yes])

if test "x$enable_tiff" = "xyes" -o "x$enable_tiff" = ""; then
if test "x$TIFF_CFLAGS$TIFF_LIBS" = "x" ; then
if $PKG_CONFIG libtiff; then
PKG_CHECK_MODULES([TIFF], [libtiff])
else
PKG_CHECK_MODULES([TIFF], [libtiff-4])
fi
fi
TIFF_ENABLED_FLAGS=-DTIFF_ENABLED
fi
AC_SUBST(TIFF_CFLAGS,$TIFF_CFLAGS)
AC_SUBST(TIFF_LIBS,$TIFF_LIBS)
AC_SUBST(TIFF_ENABLED_FLAGS,$TIFF_ENABLED_FLAGS)

dnl ---------------------------------------------------------------------------
dnl Check for curl
dnl ---------------------------------------------------------------------------

FOUND_CURL=no
CURL_CFLAGS=
CURL_LIB=

AC_ARG_WITH(curl,
[ --with-curl[=ARG] Enable curl support (ARG=path to curl-config.)],,,)

dnl Clear some cache variables
unset ac_cv_path_LIBCURL

if test "`basename xx/$with_curl`" = "curl-config" ; then
LIBCURL_CONFIG="$with_curl"
elif test "$with_curl" = "no" ; then
LIBCURL_CONFIG=no
else
AC_PATH_PROG(LIBCURL_CONFIG, curl-config, not-found)
fi

if test "$LIBCURL_CONFIG" = "not-found" ; then
AC_MSG_ERROR([curl not found. If wanting to do a build without curl support (and thus without built-in networking capability), explictly disable it with --without-curl])
elif test "$LIBCURL_CONFIG" != "no" ; then

CURL_VERNUM=`$LIBCURL_CONFIG --vernum`
CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'`

AC_MSG_RESULT([ found libcurl version $CURL_VER])

AC_CHECK_LIB(curl,curl_global_init,FOUND_CURL=yes,FOUND_CURL=no,`$LIBCURL_CONFIG --libs`)

if test "$FOUND_CURL" = "no" ; then
AC_MSG_ERROR([curl not found. If wanting to do a build without curl support (and thus without built-in networking capability), explictly disable it with --without-curl])
fi
CURL_ENABLED_FLAGS=-DCURL_ENABLED
fi

if test "$FOUND_CURL" = "yes" ; then
CURL_CFLAGS=`$LIBCURL_CONFIG --cflags`
CURL_LIBS=`$LIBCURL_CONFIG --libs`
fi

AC_SUBST(CURL_CFLAGS,$CURL_CFLAGS)
AC_SUBST(CURL_LIBS,$CURL_LIBS)
AC_SUBST(CURL_ENABLED_FLAGS,$CURL_ENABLED_FLAGS)

dnl ---------------------------------------------------------------------------
dnl Check for external Google Test
dnl ---------------------------------------------------------------------------
Expand Down
7 changes: 6 additions & 1 deletion data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# files containing dictionary of useful projection
#

set(CONFIG_FILES
proj.ini
)

set(PROJ_DICTIONARY
null
world
Expand Down Expand Up @@ -53,7 +57,7 @@ add_custom_command(
add_custom_target(generate_proj_db ALL DEPENDS ${PROJ_DB})

if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
foreach(FILE ${PROJ_DICTIONARY} ${GRIDSHIFT_FILES})
foreach(FILE ${CONFIG_FILES} ${PROJ_DICTIONARY} ${GRIDSHIFT_FILES})
configure_file(${FILE} ${FILE} COPYONLY)
endforeach()
endif()
Expand All @@ -62,6 +66,7 @@ endif()
#install
#
set(ALL_DATA_FILE
${CONFIG_FILES}
${PROJ_DICTIONARY}
${GRIDSHIFT_FILES}
${PROJ_DB}
Expand Down
48 changes: 45 additions & 3 deletions data/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DATAPATH = $(top_srcdir)/data

pkgdata_DATA = GL27 nad.lst nad27 nad83 world other.extra \
pkgdata_DATA = proj.ini GL27 nad.lst nad27 nad83 world other.extra \
CH null \
ITRF2000 ITRF2008 ITRF2014 proj.db \
projjson.schema.json
Expand Down Expand Up @@ -38,12 +38,54 @@ SQL_ORDERED_LIST = sql/begin.sql \
sql/customizations.sql \
sql/commit.sql

EXTRA_DIST = GL27 nad.lst nad27 nad83 \
EXTRA_DIST = proj.ini GL27 nad.lst nad27 nad83 \
world other.extra \
CH \
ITRF2000 ITRF2008 ITRF2014 \
projjson.schema.json \
CMakeLists.txt tests/test_nodata.gtx null \
CMakeLists.txt \
tests/test_nodata.gtx \
tests/test_vgrid_bigendian_bigtiff.tif \
tests/test_vgrid_bigendian.tif \
tests/test_vgrid_bigtiff.tif \
tests/test_vgrid_bottomup_with_matrix.tif \
tests/test_vgrid_bottomup_with_scale.tif \
tests/test_vgrid_deflate_floatingpointpredictor.tif \
tests/test_vgrid_deflate.tif \
tests/test_vgrid_float64.tif \
tests/test_vgrid_in_second_channel.tif \
tests/test_vgrid_int16.tif \
tests/test_vgrid_int32.tif \
tests/test_vgrid_uint32.tif \
tests/test_vgrid_invalid_channel_type.tif \
tests/test_vgrid_nodata.tif \
tests/test_vgrid_pixelisarea.tif \
tests/test_vgrid_pixelispoint.tif \
tests/test_vgrid_uint16.tif \
tests/test_vgrid_uint16_with_scale_offset.tif \
tests/test_vgrid_unsupported_byte.tif \
tests/test_vgrid_with_overview.tif \
tests/test_vgrid_with_subgrid.tif \
tests/test_hgrid.tif \
tests/test_hgrid_separate.tif \
tests/test_hgrid_tiled.tif \
tests/test_hgrid_tiled_separate.tif \
tests/test_hgrid_strip.tif \
tests/test_hgrid_positive_west.tif \
tests/test_hgrid_lon_shift_first.tif \
tests/test_hgrid_radian.tif \
tests/test_hgrid_degree.tif \
tests/test_hgrid_with_overview.tif \
tests/test_hgrid_extra_ifd_with_other_info.tif \
tests/test_hgrid_with_subgrid.tif \
tests/test_hgrid_with_subgrid_no_grid_name.tif \
tests/subset_of_gr3df97a.tif \
tests/egm96_15_uncompressed_truncated.tif \
tests/test_vgrid_single_strip_truncated.tif \
tests/nkgrf03vel_realigned_extract.tif \
tests/nkgrf03vel_realigned_xy_extract.ct2 \
tests/nkgrf03vel_realigned_z_extract.gtx \
null \
generate_all_sql_in.cmake sql_filelist.cmake \
$(SQL_ORDERED_LIST)

Expand Down
16 changes: 16 additions & 0 deletions data/proj.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[general]
; Lines starting by ; are commented lines.
;

; Network capabilities disabled by default.
; Can be overriden with the PROJ_NETWORK=ON environment variable.
; network = on

; Can be overriden with the PROJ_NETWORK_ENDPOINT environment variable.
cdn_endpoint = https://cdn.proj.org

cache_enabled = on

cache_size_MB = 100

cache_ttl_sec = 86400
Binary file added data/tests/egm96_15_uncompressed_truncated.tif
Binary file not shown.
Binary file added data/tests/nkgrf03vel_realigned_extract.tif
Binary file not shown.
Binary file added data/tests/nkgrf03vel_realigned_xy_extract.ct2
Binary file not shown.
Binary file added data/tests/nkgrf03vel_realigned_z_extract.gtx
Binary file not shown.
Binary file added data/tests/subset_of_gr3df97a.tif
Binary file not shown.
Binary file added data/tests/test_hgrid.tif
Binary file not shown.
Binary file added data/tests/test_hgrid_degree.tif
Binary file not shown.
Binary file not shown.
Binary file added data/tests/test_hgrid_lon_shift_first.tif
Binary file not shown.
Binary file added data/tests/test_hgrid_positive_west.tif
Binary file not shown.
Binary file added data/tests/test_hgrid_radian.tif
Binary file not shown.
Binary file added data/tests/test_hgrid_separate.tif
Binary file not shown.
Binary file added data/tests/test_hgrid_strip.tif
Binary file not shown.
Binary file added data/tests/test_hgrid_tiled.tif
Binary file not shown.
Binary file added data/tests/test_hgrid_tiled_separate.tif
Binary file not shown.
Binary file added data/tests/test_hgrid_with_overview.tif
Binary file not shown.
Binary file added data/tests/test_hgrid_with_subgrid.tif
Binary file not shown.
Binary file not shown.
Binary file added data/tests/test_vgrid_bigendian.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_bigendian_bigtiff.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_bigtiff.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_bottomup_with_matrix.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_bottomup_with_scale.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_deflate.tif
Binary file not shown.
Binary file not shown.
Binary file added data/tests/test_vgrid_float64.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_in_second_channel.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_int16.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_int32.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_invalid_channel_type.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_nodata.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_pixelisarea.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_pixelispoint.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_single_strip_truncated.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_uint16.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_uint16_with_scale_offset.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_uint32.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_unsupported_byte.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_with_overview.tif
Binary file not shown.
Binary file added data/tests/test_vgrid_with_subgrid.tif
Binary file not shown.
8 changes: 8 additions & 0 deletions docs/source/apps/cs2cs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ normally be in DMS format (use ``-f %.12f`` for decimal degrees with 12 decimal
places), while projected (cartesian) coordinates will be in linear
(meter, feet) units.

Use of remote grids
-------------------

.. versionadded:: 7.0.0

If the :envvar:`PROJ_NETWORK` environment variable is set to ``ON``,
:program:`cs2cs` will attempt to use remote grids stored on CDN (Content
Delivery Network) storage, when they are not available locally.

Examples
********
Expand Down
10 changes: 7 additions & 3 deletions docs/source/apps/projinfo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Synopsis
| [[--area name_or_code] | [--bbox west_long,south_lat,east_long,north_lat]]
| [--spatial-test contains|intersects]
| [--crs-extent-use none|both|intersection|smallest]
| [--grid-check none|discard_missing|sort] [--show-superseded]
| [--grid-check none|discard_missing|sort|known_available] [--show-superseded]
| [--pivot-crs always|if_no_direct_transformation|never|{auth:code[,auth:code]*}]
| [--boundcrs-to-wgs84]
| [--main-db-path path] [--aux-db-path path]*
Expand Down Expand Up @@ -148,12 +148,13 @@ The following control parameters can appear in any order:

.. note:: only used for coordinate operation computation

.. option:: --grid-check none|discard_missing|sort
.. option:: --grid-check none|discard_missing|sort|known_available

Specify how the presence or absence of a horizontal or vertical shift grid
required for a coordinate operation affects the results returned when
researching coordinate operations between 2 CRS.
The default strategy is ``sort``: in that case, all candidate
The default strategy is ``sort`` (if :envvar:`PROJ_NETWORK` is not defined).
In that case, all candidate
operations are returned, but the actual availability of the grids is used
to determine the sorting order. That is, if a coordinate operation involves
using a grid that is not available in the PROJ resource directories
Expand All @@ -163,6 +164,9 @@ The following control parameters can appear in any order:
this returns the results as if all the grids where available.
The ``discard_missing`` strategy discards results that involve grids not
present in the PROJ resource directories.
The ``known_available`` strategy discards results that involve grids not
present in the PROJ resource directories and that are not known of the CDN.
This is the default strategy is :envvar:`PROJ_NETWORK` is set to ``ON``.

.. note:: only used for coordinate operation computation

Expand Down
Loading