Commit 26b395d8 authored by Kitware Robot's avatar Kitware Robot Committed by Dan Lipsa

libproj4 2016-02-12 (59bbf704)

Code extracted from:

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

at commit 59bbf70410f44bf9f6828ea65ccbadc1c9683ecb (for/vtk).
parents
# Ignore whitespace for kwrobot
* -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
#################################################################################
#
# This file is part of CMake configuration for PROJ4 library (inspired from SOCI
# CMake, Copyright (C) 2009-2010 Mateusz Loskot <mateusz@loskot.net> )
#
# Copyright (C) 2011 Nicolas David <nicolas.david@ign.fr>
# Distributed under the MIT license
#
#################################################################################
# General settings
#################################################################################
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
# proj4 is an ANSI C project
project(PROJ4 C)
set(PROJECT_INTERN_NAME PROJ)
#################################################################################
# PROJ4 CMake modules
#################################################################################
# Path to additional CMake modules
set(CMAKE_MODULE_PATH ${PROJ4_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
set(CMAKE_MODULE_PATH ${PROJ4_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
include(Proj4Utilities)
message(STATUS "")
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")
#################################################################################
# Build features and variants
#################################################################################
include(Proj4SystemInfo)
include(Proj4Config)
include(Proj4Mac)
include(policies)
#################################################################################
# threading configuration
#################################################################################
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 (MSVC OR CMAKE_CONFIGURATION_TYPES)
# For multi-config systems and for Visual Studio, the debug version of
# the library has _d appended.
set (CMAKE_DEBUG_POSTFIX _d)
endif ()
#################################################################################
# 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)
#################################################################################
# Build configured components
#################################################################################
include_directories(${PROJ4_SOURCE_DIR}/src)
message(STATUS "")
add_subdirectory(src)
add_subdirectory(cmake)
All source, data files and other contents of the PROJ.4 package are
available under the following terms. Note that the PROJ 4.3 and earlier
was "public domain" as is common with US government work, but apparently
this is not a well defined legal term in many countries. I am placing
everything under the following MIT style license because I believe it is
effectively the same as public domain, allowing anyone to use the code as
they wish, including making proprietary derivatives.
Though I have put my own name as copyright holder, I don't mean to imply
I did the work. Essentially all work was done by Gerald Evenden.
--------------
Copyright (c) 2000, Frank Warmerdam
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
This diff is collapsed.
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.
-------------------- P R O J . 4 --------------------
This is Release 4.4 of cartographic projection software.
PLEASE read the following information as well as READMEs in the src
and nad directories.
For more information on PROJ.4 maintenance please see the web page at:
http://www.remotesensing.org/proj
or
http://proj.maptools.org/
---------------------------------------------------
Installation:
-------------
FSF's configuration procedure is used to ease installation of the
PROJ.4 system.
The default destination path prefix for installed files is /usr/local.
Results from the installation script will be placed into subdirectories
bin, include, lib, man/man1 and man/man3. If this default path prefix
is proper, then execute:
./configure
If another path prefix is required, then execute:
./configure --prefix=/my/path
In either case, the directory of the prefix path must exist and be
writable by the installer.
After executing configure, execute:
make
make install
The install target will create, if necessary, all required sub-directories.
Windows Build
-------------
PROJ.4 can be built with Microsoft Visual C/C++ using the makefile.vc
in the PROJ directory. First edit the PROJ\nmake.opt and modify
the INSTDIR value at the top to point to the directory where
the PROJ tree shall be installed. If you want to install into
C:\PROJ, it can remain unchanged.
Then use the makefile.vc to build the software:
eg.
C:\> cd proj
C:\PROJ> nmake /f makefile.vc
C:\PROJ> nmake /f makefile.vc install-all
Note that you have to have the VC++ environment variables, and path
setup properly. This may involve running the VCVARS32.BAT script out
of the Visual C++ tree.
The makefile.vc builds proj.exe, proj.dll and proj.lib.
It should also be possible to build using the Unix instructions
and Cygwin32, but this hasn't been tested recently.
---------------------------------------------------
Distribution files and format.
------------------------------
Sources are distributed in one or more files. The principle elements
of the system are in a compress tar file named `PROJ.4.x.tar.gz' where
"x" will indicate level.sub-level of the release. For U.S. users
interested in NADCON datum shifting procedures, additional files
containing conversion matricies are distributed with the name
`PROJ.4.x.y.tar' where y is an uppercase letter starting with "A."
These supplementary files will contain compressed files and thus
the tar file is not compressed.
Interim reports on Rel. 4 proj are available in PostScript form as
*.ps.gz . New and old users are strongly recommended to carefully read
these manuals. They are supplements and NOT a replacement for the full
manual OF 90-284 (which new users should also obtain).
---------------------------------------------------
Principle new aspects of system:
--------------------------------
ANSI X3.159-1989 C code. Site must have ANSI C compiler and header files.
Several method of determining radius from specified ellipsoid.
Use of initialization files through +init=file:key. Default projection
specifications also may be defined in an ASCII file.
+inv option REMOVED and -I may be used in its place. Use of invproj
alias of proj still functions as per Rel.3.
+ellps=list and +proj=list REMOVED. Use respective -le and -lp.
+units= to specify cartesian coordinate system units. To get list
use -lu.
-v added to dump final cartographic parameters employed.
Addition of computing scale factors and angular distortion added through
-S option. Valuable for designing new projection parameter details.
-V option which verbosely lists projected point characteristics.
Programmers may use projection library with calls to pj_init,
pj_fwd, pj_inv and pj_transform.
Program nad2nad for conversion of data to and from NAD27 and NAD83
datums.
Program cs2cs for converting between coordinate systems, with optional
datum translation.
-------------------------------------------------------------
Things currently left undone:
----------------------------
proj_def.dat NOT fully in place. Needs additional settings for
many of the projections. Probably will not be completed until main
manual rewritten.
# proj-config.cmake for the install tree. It's installed in
# ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative
# path to the root from there. (Note that the whole install tree can
# be relocated.)
if (NOT WIN32)
set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}")
set (PROJECT_ROOT_DIR "../../..")
else ()
set (INSTALL_CMAKE_DIR "cmake")
set (PROJECT_ROOT_DIR "..")
endif ()
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
configure_file (project-config.cmake.in project-config.cmake @ONLY)
configure_file (project-config-version.cmake.in
project-config-version.cmake @ONLY)
install (FILES
"${CMAKE_CURRENT_BINARY_DIR}/project-config.cmake"
DESTINATION "${INSTALL_CMAKE_DIR}"
RENAME "${PROJECT_NAME_LOWER}-config.cmake")
install (FILES
"${CMAKE_CURRENT_BINARY_DIR}/project-config-version.cmake"
DESTINATION "${INSTALL_CMAKE_DIR}"
RENAME "${PROJECT_NAME_LOWER}-config-version.cmake")
# Make information about the cmake targets (the library and the tools)
# available.
install (EXPORT targets
FILE ${PROJECT_NAME_LOWER}-targets.cmake
DESTINATION "${INSTALL_CMAKE_DIR}")
################################################################################
# SociConfig.cmake - CMake build configuration of SOCI library
################################################################################
# Copyright (C) 2010 Mateusz Loskot <mateusz@loskot.net>
#
# Distributed under the Boost Software License, Version 1.0.
# (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")
set(PACKAGE_STRING "PROJ.4 Projections ${${PROJECT_INTERN_NAME}_VERSION}")
set(PACKAGE_TARNAME "proj")
set(PACKAGE_VERSION "${${PROJECT_INTERN_NAME}_VERSION}")
configure_file(cmake/proj_config.cmake.in src/proj_config.h)