Commit ea92dc1e authored by Kitware Robot's avatar Kitware Robot Committed by Brad King

libproj 2018-05-09 (498671c3)

Code extracted from:

    https://gitlab.kitware.com/third-party/proj.git

at commit 498671c30b637b3d2b55558f61e5ab7582306bb9 (for/vtk-old).
parent 00b85abc
# Ignore whitespace for kwrobot
* -whitespace
* -whitespace
*~
Makefile
CMakeFiles
CMakeCache.txt
CTestTestfile.cmake
cmake_install.cmake
install_manifest.txt
cmake/project-config*.cmake
/*.manifest
/*.swp
/autom4te.cache
/config.log
/config.status
/config.cache
/proj.pc
/nbproject
/bin
/lib
/DartConfiguration.tcl
/Testing
# html
/html/dl
/html/robots.txt
# nad
/nad/WI
/nad/prvi
/nad/WO
/nad/alaska
/nad/FL
/nad/README.NADUS
/nad/stpaul
/nad/stgeorge
/nad/TN
/nad/conus
/nad/MD
/nad/hawaii
/nad/stlrnc
/nad/null
/nad/*.lla
# src
/src/*.o
/src/*.lo
/src/*.la
/src/proj.dll
/src/*.lib
/src/*.pdb
/src/*.exp
/src/*.opt
/src/*.obj
/src/*.exe
/src/.libs
/src/.deps
/src/*.manifest
/src/*.swp
/src/nad2nad
/src/nad2bin
/src/proj
/src/geod
/src/stamp-h*
/src/proj_config.h
/src/cs2cs
/src/multistresstest
/src/test228
Original Author:
Gerald Evenden
Maintainer(s):
Frank Warmerdam <warmerdam@pobox.com>
Howard Butler <howard@hobu.co>
Contributors:
Brent Fraser <bfraser@geoanalytic.com>
Chris Stuber <imap@chesapeake.net>
Craig Bruce <cbruce@cubewerx.com>
Victor Osipkov <vctos@email.com>
Andrea Antonello <andrea.antonello@hydrologis.com>
Charles Karney <charles.karney@sri.com>
Karsten Engsager
Knud Poder
......@@ -9,7 +9,9 @@
#################################################################################
# General settings
#################################################################################
if (FALSE) # XXX(kitware): VTK handles CMake versions.
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
endif ()
# proj4 is an ANSI C project
project(PROJ4 C)
......@@ -24,23 +26,41 @@ set(CMAKE_MODULE_PATH ${PROJ4_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
include(Proj4Utilities)
if (FALSE) # XXX(kitware): Hide configure noise.
message(STATUS "")
endif ()
colormsg(_HIBLUE_ "Configuring PROJ:")
#################################################################################
#PROJ version information
#################################################################################
include(Proj4Version)
proj_version(MAJOR 4 MINOR 9 PATCH 2)
set(PROJ_API_VERSION "9")
set(PROJ_BUILD_VERSION "10.0.1")
proj_version(MAJOR 4 MINOR 9 PATCH 3)
set(PROJ_API_VERSION "12")
set(PROJ_BUILD_VERSION "12.0.0")
#################################################################################
# Build features and variants
#################################################################################
include(Proj4SystemInfo)
include(Proj4Config)
if (FALSE) # XXX(kitware): VTK handles CMake versions.
include(Proj4Mac)
include(policies)
endif ()
#################################################################################
# Self-test build config
#################################################################################
if (FALSE) # XXX(kitware): Hardcode settings
option(SELFTEST "Include self-test in build" OFF)
else ()
set(SELFTEST OFF)
endif ()
if(SELFTEST)
add_definitions(-DPJ_SELFTEST)
endif(SELFTEST)
#################################################################################
# threading configuration
......@@ -48,20 +68,22 @@ include(policies)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package (Threads)
include(CheckIncludeFiles)
include(CheckSymbolExists)
CHECK_SYMBOL_EXISTS(PTHREAD_MUTEX_RECURSIVE pthread.h HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
if (HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
add_definitions(-DHAVE_PTHREAD_MUTEX_RECURSIVE=1)
endif()
boost_report_value(PROJ_PLATFORM_NAME)
boost_report_value(PROJ_COMPILER_NAME)
# 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)
set (CMAKE_BUILD_TYPE Release)
endif ()
if (FALSE) # XXX(kitware): Debug suffixes are handled by VTK.
if (FALSE) # XXX(kitware): VTK handles this.
if (MSVC OR CMAKE_CONFIGURATION_TYPES)
# For multi-config systems and for Visual Studio, the debug version of
# the library has _d appended.
......@@ -69,24 +91,54 @@ if (MSVC OR CMAKE_CONFIGURATION_TYPES)
endif ()
endif ()
if (FALSE) # XXX(kitware): Hardcode settings
option(PROJ4_TESTS "Enable build of collection of PROJ4 tests" ON)
else ()
set(PROJ4_TESTS OFF)
endif ()
boost_report_value(PROJ4_TESTS)
if(PROJ4_TESTS)
include(CTest)
enable_testing()
endif(PROJ4_TESTS)
include(Proj4Test)
# Put the libaries and binaries that get built into directories at the
# top of the build tree rather than in hard-to-find leaf
# directories. This simplifies manual testing and the use of the build
# tree rather than installed Boost libraries.
if (FALSE) # XXX(kitware): VTK handles this.
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
endif ()
#################################################################################
# Installation
#################################################################################
if (FALSE) # XXX(kitware): VTK handles installation.
include(Proj4InstallPath)
set(LIBPROJ_BINDIR "${DEFAULT_BINDIR}" CACHE PATH "The directory to install binaries into.")
set(LIBPROJ_LIBDIR "${DEFAULT_LIBDIR}" CACHE PATH "The directory to install libraries into.")
set(LIBPROJ_DATADIR "${DEFAULT_DATADIR}" CACHE PATH "The directory to install data files into.")
set(LIBPROJ_DOCDIR "${DEFAULT_DOCDIR}" CACHE PATH "The directory to install doc files into.")
set(LIBPROJ_INCLUDEDIR "${DEFAULT_INCLUDEDIR}" CACHE PATH "The directory to install includes into.")
mark_as_advanced(LIBPROJ_BINDIR LIBPROJ_LIBDIR LIBPROJ_DATADIR LIBPROJ_DOCDIR LIBPROJ_INCLUDEDIR)
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.")
endif ()
#################################################################################
# Build configured components
#################################################################################
include_directories(${PROJ4_SOURCE_DIR}/src)
if (FALSE) # XXX(kitware): Hide configure noise.
message(STATUS "")
endif ()
if (FALSE) # XXX(kitware): Hide unnecessary directories.
add_subdirectory(nad)
endif ()
add_subdirectory(src)
if (FALSE) # XXX(kitware): Hide unnecessary directories.
add_subdirectory(man)
add_subdirectory(cmake)
endif ()
2015-12-13: jswhit <https://github.com/jswhit>
* : Add inverse hammer transform (pull request #329).
2015-09-10 sisyphus <https://github.com/sisyphus>
* : Rename PVALUE in pj_param.cto prevent Windows variable name clash
......
4.9.2 Release Notes
-------------------
o proj_def.dat was missing from source distribution
see https://github.com/OSGeo/proj.4/issues/274 for more detail
o Update Geodesic library from GeographicLib
o Remove setlocale() use in pj_init_ctx()
o Renamed PVALUE in pj_param.c to prevent clash with Windows
4.9.1 Release Notes
-------------------
o 4.9.0RC2 release was abandoned because it was not promoted in a
timely fashion. Subsequent maintenance of tickets has continued,
and a new 4.9.1 release was issued in its place.
o Implement inverse solution for Winkel Tripel from Drazan Tutic #250
o More CMake configuration tweaks. The CMake configuration is probably
not at feature parity with the autotools builds at this point but it
is converging #256
o Tweak initialization ordering around setlocal which may have caused
issues #237
o Support out-of-tree autoconf builds more completely #247
o Fix NaN handling by geod_inverse and geod_polygon_addedge #251 & #253
o Update config.sub and config.guess #257
o Adapt Charles Karney's CMake patches for smoother build #258
o Define default PROJ_LIB location for CMake compilation #261
o Fix Windows compilation on PJ_aitoff.c
o Align CMake SOVERSION with autotools #263
o Regenerate nad/epsg with GDAL r28536 to avoid precision loss in TOWGS84
parameters, e.g. on Amersfoort / RD EPSG:4289 (#260)
o Add CMake project-config.cmake scripts (#264 from Charles Karney)
o Dial back test sensitivity #255
4.9.0 Release Notes
-------------------
o Implement CMake as an option for building PROJ.4
o Implement new virtual file api (projFileAPI) so that all access to grid
shift and init files can be hooked.
o Replace geodesic implementation with one from Charles Karney and add a
supported public interface (geodesic.h).
o Upgraded to EPSG 8.5.
o Removed old (deprecated) Java bindings in favor of the new api introduced
in 4.8.0.
o Implement the calcofi (Cal Coop Ocean Fish Invest Lines/Stations) projection
o Install projects.h again for applications that want access to internal
structures and functions despite the inherent fragility.
o Various bug fixes and cleanup.
o Added the CalCOFI pseudo-projection, #135
4.8.0 Release Notes
-------------------
o Added the Natural Earth projection.
o Added HEALPIX, rHEALPIX and Icosahedral Snyder Equal Area projections.
o nad2bin now produces "CTable2" format grid shift files by default which
are platform independent.
o nad2nad removed, use cs2cs for datum shift operations.
o projects.h no longer installed as a public include file. Please try to
only use proj_api.h.
o Add pj_get_spheroid_defn() accessor.
o Added an alternate version of pj_init() that takes a projCtx (execution
context) structure to address multithreading issues with error management
and to provide a support for application hookable error reporting and
logging.
o Upgrade to EPSG 7.9. Some changes in ideal datum selection.
o JNI bindings reworked, org.proj4.Projections deprecated in favor of
org.proj4.PJ.
o Added preliminary vertical datum support.
o Fix various multithreading issues, particular in datum grid handling code.
o Added support for the +axis= option for alternate axis orientations as
part of a coordinate system (used for TM South Orientated support).
o +proj=omerc implementatioin replaced with code from libproj4. +rot_conv
flag no longer works, and some coordinate systems (ie. Malaysian) will
need to use +gamma instead. "epsg" init file updated accordingly.
4.7.0 Release Notes
-------------------
o Added in memory caching of init file search results for substantial
acceleration in some application environments (like MapServer).
o Regenerated nad/epsg init file with EPSG 7.1 database, including new
support for Google Mercator (EPSG:3857).
o Various thread safety improvements, including preliminary support for
a mutex lock around some operations, like grid loading.
4.6.1 Release Notes
-------------------
o Upgraded to EPSG 6.17 version for nad/epsg. Also corrected the precision
problem introduced in the last version.
o Added logic for tmerc projection to fail rather than return crazy results
if more than 90 degrees away from the central meridian (#5). This change
may only be temporary till a more comprehensive solution is found.
o Fixed handling of extra text in cs2cs.
o Renamed INSTALL to INSTALL.TXT.
o The eqc projection has been generalized to include a latitude of origin.
o Added the glabsgm (Gauss Laborde / Sphere Geometric Mean) projection,
and gstmerc variation.
o nad/IGNF init catalogue created.
o added the ntf_r93.gsb datum shift file.
o Add /Op in nmake.opt compile options to avoid VC7 optimization bug (#12)
o Fix testvarious test script so it works properly when grid files available
4.6.0 Release Notes
-------------------
o MAJOR: Rework pj_transform() to avoid applying ellipsoid to ellipsoid
transformations as a datum shift when no datum info is available.
o Avoid applying "change of ellipsoid" during datum shifting based on
ellipsoids getting changed to spheres for spherical projections.
o Upgrade to EPSG 6.13
o Added "900913" "Google Mercator" code in nad/esri.extra.
o Avoid some static variable based multi-threading problems.
o Improve error recovery if ctable style datum shift grid fails to load.
o Support drive letters properly in PROJ_LIB paths for win32.
o Fix occasional problem with DMS parsing.
o Removed non-functional mpoly projection.
o add lonlat, and latlon as aliases for longlat.
4.5.0 Release Notes
-------------------
o Microsoft Visual Studio 8 compatibility changes.
o Upgraded to EPSG 6.11.1 database.
o Several bug fixes to pj_transform() to handle transient errors properly.
o Fix Krovak projection (include +czech flag)
o Added Roussilhe Stereographic projection from libproj4 (proj=rouss).
o Added experimental +lon_wrap flag for alternate pj_transform() longitude
wrapping behavior on output.
4.4.9 Release Notes
-------------------
o Win32 build uses proj.dll by default now.
o Added accessor functions for the datums, ellps, prime_meridians, units and
main projection definition lists so they can be used on windows where
data objects exported from the DLL don't work easily.
o Added JNI (Java Native Interface) support within the jniwrap directory,
and some supporting entry points directly in the proj dll/so. See
--with-jni configure switch, and jniwrap/README.
o Added the proj=stereoa and proj=geos projections, incorporated from
Gerald's libproj4.
o A few other bug fixes.
4.4.8 Release Notes
-------------------
o Updated epsg file to EPSG 6.5, added other.extra pseudo-EPSG WMS definitions
o Made significant fixes to prime meridian support.
o Substantially change pj_datum_transform(), so it and pj_transform() will
work between coordinate systems with different ellipsoids but no datum
shift information (assume +towgs84=0,0,0).
o Added pj_get_release() function.
o Ensure pj_transform() will try to transform all points in provided list if
even some might transform properly.
o Improved the accuracy of Geocentric_To_Geodetic() via an iterative
solution.
o Various other bug fixes.
4.4.7 Release Notes
-------------------
o Added NTv2 (.gsb) grid shift file support.
o Modified datum shift support so that data file data is only loaded if
needed. Also added 'null' grid as a fallback option, and support for
making grids optional (prefix with '@' in +nadgrids).
o Regenerated nad/epsg file with towgs84 parameters for non-greenwich prime
meridians.
o Updated nad/esri file with better generated form from Paul Ramsey.
o Various bug fixes.
4.4.6 Release Notes
-------------------
o Incorporated new lcca (Lambert Conformal Conic Alternate) projection from
Gerald.
o Updated 'espg' translation file for EPSG 6.2.2 with better support for
prime meridians.
o Added Prime Meridians via +pm command switch to cs2cs (and pj_transform).
o Fixed bug with 7 parameter transforms.
o Added 'esri' pseudo-epsg coordinate system file.
o Cleanup so that PROJ.4 compiles clean as C++ code.
o Added pj_get_def() to expand definitions of stuff like +init clauses.
o Added a Krovak implementation (proj=krov). Note this may change again
in the next release.
# PROJ fork for VTK
This branch contains changes required to embed libproj into VTK. This
includes changes made primarily to the build system to allow it to be embedded
into another source tree as well as a header to facilitate mangling of the
symbols to avoid conflicts with other copies of the library within a single
process.
* Ignore whitespace errors for VTK's commit checks.
* Integrate the CMake build with VTK's module system.
* Mangle all exported symbols to have a `vtklibproj_` prefix.
......@@ -7,28 +7,10 @@
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
################################################################################
include (CheckIncludeFiles)
include (CheckLibraryExists)
include (CheckFunctionExists)
# check needed include file
check_include_files (dlfcn.h HAVE_DLFCN_H)
check_include_files (inttypes.h HAVE_INTTYPES_H)
check_include_files (jni.h HAVE_JNI_H)
check_include_files (memory.h HAVE_MEMORY_H)
check_include_files (stdint.h HAVE_STDINT_H)
check_include_files (stdlib.h HAVE_STDLIB_H)
check_include_files (string.h HAVE_STRING_H)
check_include_files (sys/stat.h HAVE_SYS_STAT_H)
check_include_files (sys/types.h HAVE_SYS_TYPES_H)
check_include_files (unistd.h HAVE_UNISTD_H)
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV)
# check libm need on unix
check_library_exists(m ceil "" HAVE_LIBM)
set(PACKAGE "proj")
set(PACKAGE_BUGREPORT "warmerdam@pobox.com")
set(PACKAGE_NAME "PROJ.4 Projections")
......
#----------------------------------------------
# installation path settings
#----------------------------------------------
#TODO
# for data install testing the PROJ_LIB envVar
if(WIN32)
set(DEFAULT_BIN_SUBDIR bin)
set(DEFAULT_LIB_SUBDIR local/lib)
set(DEFAULT_DATA_SUBDIR share)
set(DEFAULT_INCLUDE_SUBDIR local/include)
set(DEFAULT_DOC_SUBDIR share/doc/proj)
else()
# Common locatoins for Unix and Mac OS X
set(DEFAULT_BIN_SUBDIR bin)
set(DEFAULT_LIB_SUBDIR lib)
set(DEFAULT_DATA_SUBDIR share/proj)
set(DEFAULT_DOC_SUBDIR doc/proj)
set(DEFAULT_INCLUDE_SUBDIR include)
endif()
# Locations are changeable by user to customize layout of PDAL installation
# (default values are platform-specific)
set(PROJ_BIN_SUBDIR ${DEFAULT_BIN_SUBDIR} CACHE STRING
"Subdirectory where executables will be installed")
set(PROJ_LIB_SUBDIR ${DEFAULT_LIB_SUBDIR} CACHE STRING
"Subdirectory where libraries will be installed")
set(PROJ_INCLUDE_SUBDIR ${DEFAULT_INCLUDE_SUBDIR} CACHE STRING
"Subdirectory where header files will be installed")
set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING
"Subdirectory where data will be installed")
set(PROJ_DOC_SUBDIR ${DEFAULT_DOC_SUBDIR} CACHE STRING
"Subdirectory where data will be installed")
# Mark *DIR variables as advanced and dedicated to use by power-users only.
mark_as_advanced(PROJ_ROOT_DIR
PROJ_BIN_SUBDIR
PROJ_LIB_SUBDIR
PROJ_INCLUDE_SUBDIR
PROJ_DATA_SUBDIR
PROJ_DOC_SUBDIR )
set(DEFAULT_BINDIR "${PROJ_BIN_SUBDIR}")
set(DEFAULT_LIBDIR "${PROJ_LIB_SUBDIR}")
set(DEFAULT_DATADIR "${PROJ_DATA_SUBDIR}")
set(DEFAULT_DOCDIR "${PROJ_DOC_SUBDIR}")
set(DEFAULT_INCLUDEDIR "${PROJ_INCLUDE_SUBDIR}")
if(APPLE)
set(FRAMEWORKDIR "Library/Frameworks" CACHE PATH "the path to install framework")
set(BUNDLEDIR "Applications/OSGEO" CACHE PATH "the path to install bundle")
file(RELATIVE_PATH BUNDLE_FRAME_REL_PATH_AAA "/${FRAMEWORKDIR}" "/aaa")
string(LENGTH ${BUNDLE_FRAME_REL_PATH_AAA} AAA_LENGTH)
math(EXPR RELATIVE_PATH_LENGTH "${AAA_LENGTH}-4")
string(SUBSTRING ${BUNDLE_FRAME_REL_PATH_AAA} 0 ${RELATIVE_PATH_LENGTH} BUNDLE_FRAME_REL_PATH)
set(PROJ_INSTALL_NAME_DIR "@executable_path/${BUNDLE_FRAME_REL_PATH}/${FRAMEWORKDIR}" )
else(APPLE)
set(FRAMEWORKDIR "")
set(BUNDLEDIR "")
set(PROJ_INSTALL_NAME_DIR "")
endif(APPLE)
set(PROJ_RESOURCES "" )
if(APPLE)
option(BUILD_FRAMEWORKS_AND_BUNDLE "if set to ON, build a library framework and application bundle,
otherwise install classical UNIX bin/lib" OFF )
set(DEFAULT_BINDIR ${BUNDLEDIR})
boost_report_value(BUNDLEDIR)
boost_report_value(PROJ_INSTALL_NAME_DIR)
boost_report_value(FRAMEWORKDIR)
endif(APPLE)
......@@ -15,9 +15,9 @@ function(proj_add_test_script_sh SH_NAME BIN_USE)
endif(EXISTS ${GRID_FULLNAME})
endif(ARGV2)
if( CMAKE_MINOR_VERSION LESS 8 OR CMAKE_PATCH_VERSION LESS 4 )
if( CMAKE_VERSION VERSION_LESS 2.8.4 )
set(TEST_OK 0)
message(STATUS "test with bash script need a cmake version > 2.8.3 ")
message(STATUS "test with bash script need a cmake version >= 2.8.4")
endif()
if(${TEST_OK})
......
......@@ -240,6 +240,7 @@ endmacro()
#
function (colormsg)
return () # XXX(kitware): Hide configure noise.
string (ASCII 27 _escape)
set(WHITE "29")
set(GRAY "30")
......@@ -295,6 +296,7 @@ endfunction()
#
function(boost_report_value NAME)
return () # XXX(kitware): Hide configure noise.
string(LENGTH "${NAME}" varlen)
# LOG
#message(STATUS "boost_report_value: NAME=${NAME} (${varlen})")
......
......@@ -39,7 +39,9 @@ macro(proj_version)
"${${PROJECT_INTERN_NAME}_VERSION_MAJOR}_${${PROJECT_INTERN_NAME}_VERSION_MINOR}")
endif()
if (FALSE) # XXX(kitware): Hide configure noise.
message(STATUS "")
endif ()
boost_report_value(${PROJECT_INTERN_NAME}_VERSION)
if(WIN32)
boost_report_value(${PROJECT_INTERN_NAME}_ABI_VERSION)
......
if (CMAKE_MAJOR_VERSION GREATER 2)
cmake_policy(SET CMP0042 NEW) # osx rpath
cmake_policy(SET CMP0011 NEW) # policy setting
endif()
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1
/* Define to 1 if you have the <jni.h> header file. */
#cmakedefine HAVE_JNI_H 1
/* Define to 1 if you have the `m' library (-lm). */
#cmakedefine HAVE_LIBM 1
/* Define to 1 if you have localeconv */
#cmakedefine HAVE_LOCALECONV 1
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */