aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-02-23 10:40:55 +0100
committerKristian Evers <kristianevers@gmail.com>2018-02-23 10:40:55 +0100
commitdf1e4980d8ca36b1c7e26a312aee4eecc17c66ed (patch)
treef2d34d5038ceb831dd42857d2d7a46aea14e38ca
parentc7398bd44d47ac824bb7f81bfdfe60fff3b9b675 (diff)
parent67d49b8c3c049aa5cbdb77c3213483d12ebf9d3e (diff)
downloadPROJ-df1e4980d8ca36b1c7e26a312aee4eecc17c66ed.tar.gz
PROJ-df1e4980d8ca36b1c7e26a312aee4eecc17c66ed.zip
Merge remote-tracking branch 'osgeo/master' into docs-release-4.10.0
-rw-r--r--CONTRIBUTING.md6
-rw-r--r--NEWS6
-rw-r--r--README.md6
-rw-r--r--appveyor.yml10
-rw-r--r--docs/source/development/reference/deprecated.rst2
-rw-r--r--docs/source/faq.rst4
-rw-r--r--docs/source/references.rst6
-rw-r--r--docs/source/usage/apps/geod.rst4
-rw-r--r--docs/source/usage/apps/proj.rst20
-rw-r--r--docs/source/usage/operations/projections/cass.rst2
-rw-r--r--docs/source/usage/operations/projections/geos.rst2
-rw-r--r--docs/source/usage/operations/projections/merc.rst2
-rw-r--r--docs/source/usage/operations/projections/rhealpix.rst2
-rw-r--r--docs/source/usage/operations/projections/tmerc.rst2
-rw-r--r--html/gen_parms.html4
-rw-r--r--html/man_pj_init.html2
-rw-r--r--html/man_proj.html4
-rw-r--r--man/man1/cct.14
-rw-r--r--man/man1/proj.14
-rw-r--r--nad/CMakeLists.txt3
-rw-r--r--nad/Makefile.am4
-rw-r--r--nad/README.GRD48
-rwxr-xr-xnad/test272
-rwxr-xr-xnad/test832
-rw-r--r--src/PJ_calcofi.c2
-rw-r--r--src/PJ_horner.c16
-rw-r--r--src/cct.c4
-rw-r--r--src/gie.c133
-rw-r--r--src/pj_mlfn.c2
29 files changed, 184 insertions, 124 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index fd2ab269..59cb14be 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -67,8 +67,8 @@ Note that not all feature requests are accepted.
## Write documentation
-PROJ.4 is in dire need of better documentation. Any contributiions of documentation
-are greatly appreaciated. The PROJ.4 documentation is available on [proj4.org](ttp://proj4.org).
+PROJ.4 is in dire need of better documentation. Any contributions of documentation
+are greatly appreciated. The PROJ.4 documentation is available on [proj4.org](ttp://proj4.org).
The website is generated with [Sphinx](http://www.sphinx-doc.org/en/stable/). Contributions
to the documentation should be made as [Pull Requests](https://github.com/OSGeo/proj.4/pulls)
on GitHub.
@@ -121,7 +121,7 @@ Throughout the PROJ.4 code base you will see differing whitespace use.
The general rule is to keep whitespace in whatever form it is
in the file you are currently editing. If the file has a mix of tabs and space please
convert the tabs to space in a separate commit before making any other changes. This
-makes it a lot easier to see the changes in diffs when evaulating the changed code. New
+makes it a lot easier to see the changes in diffs when evaluating the changed code. New
files should use spaces as whitespace.
#### File names
diff --git a/NEWS b/NEWS
index 1f9aef27..b847ca61 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,7 @@ This version of PROJ introduces some significant extensions and
improvements to (primarily) the geodetic functionality of the system.
The main driver for introducing the new features is the emergence of
-dynamic reference frames, the increasing use of high accuracy GNNS,
+dynamic reference frames, the increasing use of high accuracy GNSS,
and the related growing demand for accurate coordinate
transformations. While older versions of PROJ included some geodetic
functionality, the new framework lays the foundation for turning PROJ
@@ -232,9 +232,9 @@ o The PROJ.4 project also distributes the datum-grid package,
o Equations for meridian convergence and partial derivatives have
been corrected for non-conformal projections. #526.
- o Fixed scaling of cartesian coordiantes in pj_transform(). #726.
+ o Fixed scaling of cartesian coordinates in pj_transform(). #726.
- o Additional bug fixes courtesy of Googles OSS-Fuzz program:
+ o Additional bug fixes courtesy of Google's OSS-Fuzz program:
https://bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q=proj4
diff --git a/README.md b/README.md
index fd8bd053..13b584db 100644
--- a/README.md
+++ b/README.md
@@ -85,6 +85,12 @@ script out of the Visual C++ tree.
The `makefile.vc` builds `proj.exe`, `proj.dll` and `proj.lib`.
+On Windows you have to set the PROJ_LIB environment variable to make
+sure that PROJ can find the resource files that it needs. For the
+default install directory you can set PROJ_LIB with:
+
+ C:\> set PROJ_LIB C:\PROJ\share
+
### Distribution files and format
diff --git a/appveyor.yml b/appveyor.yml
index 11f16b5d..a9de275e 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -22,6 +22,16 @@ environment:
- BUILD_TYPE: cmake
VS_VERSION: Visual Studio 12
+# VS 2015
+ - BUILD_TYPE: cmake
+ VS_VERSION: Visual Studio 14
+ APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+
+# VS 2017
+ - BUILD_TYPE: cmake
+ VS_VERSION: Visual Studio 15
+ APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+
- BUILD_TYPE: nmake
shallow_clone: true
diff --git a/docs/source/development/reference/deprecated.rst b/docs/source/development/reference/deprecated.rst
index c748d461..19f43b41 100644
--- a/docs/source/development/reference/deprecated.rst
+++ b/docs/source/development/reference/deprecated.rst
@@ -53,7 +53,7 @@ Example
-------
The following program reads latitude and longitude values in decimal
-degress, performs Mercator projection with a Clarke 1866 ellipsoid and a
+degrees, performs Mercator projection with a Clarke 1866 ellipsoid and a
33° latitude of true scale and prints the projected cartesian values in
meters:
diff --git a/docs/source/faq.rst b/docs/source/faq.rst
index c508a167..6d6d2280 100644
--- a/docs/source/faq.rst
+++ b/docs/source/faq.rst
@@ -134,7 +134,7 @@ to use EPSG numbers like this:
The proj/nad/epsg file can be browsed and searched in a text editor for
coordinate systems. There are known to be problems with some coordinate
systems, and any coordinate systems with odd axes, a non-greenwich prime
-meridian or other quirkyness are unlikely to work properly. Caveat Emptor!
+meridian or other quirkiness are unlikely to work properly. Caveat Emptor!
How do I use 3 parameter and 7 parameter datum shifting
--------------------------------------------------------------------------------
@@ -282,7 +282,7 @@ What is the rHEALPix projection and how can I use it?
rHEALPix is a projection based on the HEALPix projection. The implementation
of rHEALPix uses the HEALPix projection. The rHEALPix combines the peaks of
the HEALPix into a square. The square's position can be translated and rotated
-across the x-axis which is a noval approach for the rHEALPix projection. The
+across the x-axis which is a novel approach for the rHEALPix projection. The
initial intention of using rHEALPix in the Spatial Computation Engine Science
Collaboration Environment (SCENZGrid).
diff --git a/docs/source/references.rst b/docs/source/references.rst
index 320e401b..75d7f352 100644
--- a/docs/source/references.rst
+++ b/docs/source/references.rst
@@ -34,7 +34,7 @@ References
<http://www.mygeodesy.id.au/documents/Molodensky%20V2.pdf>`__.
.. [EberHewitt1979] L. E. Eber and R.P. Hewitt, 1979,
- `Conversion algorithms for the CALCOFI station grid
+ `Conversion algorithms for the CalCOFI station grid
<http://www.calcofi.org/publications/calcofireports/v20/Vol_20_Eber___Hewitt.pdf>`_,
California Cooperative Oceanic Fisheries Investigations Reports 20:135-137.
@@ -90,7 +90,7 @@ References
.. [LambersKolb2012] M. Lambers and A. Kolb, 2012,
"Ellipsoidal Cube Maps for Accurate Rendering of Planetary-Scale
- Terrain Data", Proc. Pacfic Graphics (Short Papers).
+ Terrain Data", Proc. Pacific Graphics (Short Papers).
.. [ONeilLaubscher1976] E. M. O'Neill and R. E. Laubscher, 1976,
"Extended Studies of a Quadrilateralized Spherical Cube Earth Data Base",
@@ -123,7 +123,7 @@ References
Survey Review **23**\ (176), 88–93.
.. [WeberMoore2013] E. D. Weber and T.J. Moore, 2013,
- `Corrected Conversion Algorithms For The Calcofi Station Grid And Their
+ `Corrected Conversion Algorithms For The CalCOFI Station Grid And Their
Implementation In Several Computer Languages
<http://calcofi.org/publications/calcofireports/v54/Vol_54_Weber.pdf>`_,
California Cooperative Oceanic Fisheries Investigations Reports 54.
diff --git a/docs/source/usage/apps/geod.rst b/docs/source/usage/apps/geod.rst
index 1e009283..e7056121 100644
--- a/docs/source/usage/apps/geod.rst
+++ b/docs/source/usage/apps/geod.rst
@@ -138,8 +138,8 @@ which gives the results:
where the first two values are the azimuth from Boston to Portland,
the back azimuth from Portland to Boston followed by the distance.
-An example of forward geodesic use is to use the Boston loca-
-tion and determine Portland's location by azimuth and distance:
+An example of forward geodesic use is to use the Boston location
+and determine Portland's location by azimuth and distance:
::
diff --git a/docs/source/usage/apps/proj.rst b/docs/source/usage/apps/proj.rst
index 424a0fef..6227047f 100644
--- a/docs/source/usage/apps/proj.rst
+++ b/docs/source/usage/apps/proj.rst
@@ -65,9 +65,9 @@ The following control parameters can appear in any order
-s This options reverses the order of the output from x-y or longitude-latitude to
y-x or latitude-longitude.
- -S Causes estimation of meridinal and parallel scale factors, area scale factor and
+ -S Causes estimation of meridional and parallel scale factors, area scale factor and
angular distortion, and maximum and minimum scale factors to be listed between <>
- for each input point. For conformal projections meridinal and parallel scales
+ for each input point. For conformal projections meridional and parallel scales
factors will be equal and angular distortion zero. Equal area projections will
have an area factor of 1.
@@ -122,10 +122,10 @@ is also used for supporting files like datum
shift files.
One or more files (processed in left to right
-order) specify the source of data to be trans-
-formed. A - will specify the location of pro-
-cessing standard input. If no files are speci-
-fied, the input is assumed to be from stdin.
+order) specify the source of data to be transformed.
+A - will specify the location of processing
+standard input. If no files are specified,
+the input is assumed to be from stdin.
For ASCII input data the two data values must be
in the first two white space separated fields
and when both input and output are ASCII all
@@ -135,8 +135,8 @@ to the output line.
Input geographic data (longitude and latitude)
must be in DMS format and input cartesian data
must be in units consistent with the ellipsoid
-major axis or sphere radius units. Output geo-
-graphic coordinates will be in DMS (if the -w
+major axis or sphere radius units. Output
+geographic coordinates will be in DMS (if the -w
switch is not employed) and precise to 0.001"
with trailing, zero-valued minute-second fields
deleted.
@@ -154,8 +154,8 @@ The following script
+45.25919444444 111d30'000w
EOF
-will perform UTM forward projection with a stan-
-dard UTM central meridian nearest longitude
+will perform UTM forward projection with a standard
+UTM central meridian nearest longitude
112W. The geographic values of this example are
equivalent and meant as examples of various
forms of DMS input. The x-y output data will
diff --git a/docs/source/usage/operations/projections/cass.rst b/docs/source/usage/operations/projections/cass.rst
index 83f8c2ce..4111a2ee 100644
--- a/docs/source/usage/operations/projections/cass.rst
+++ b/docs/source/usage/operations/projections/cass.rst
@@ -106,7 +106,7 @@ Forward projection
y = M(\phi) - M(\phi_0) + N \tan(\phi)(\frac{A^2}{2} + (5-T+6C)\frac{A^4}{24})
-and M() is the meridionial distance function.
+and M() is the meridional distance function.
Inverse projection
------------------
diff --git a/docs/source/usage/operations/projections/geos.rst b/docs/source/usage/operations/projections/geos.rst
index 28b96736..670985ae 100644
--- a/docs/source/usage/operations/projections/geos.rst
+++ b/docs/source/usage/operations/projections/geos.rst
@@ -10,7 +10,7 @@ Geostationary Satellite View
+---------------------+----------------------------------------------------------+
| **Defined area** | Global |
+---------------------+----------------------------------------------------------+
-| **Implemented by** | Gerald I. Evenden and Martin Raspaud$ |
+| **Implemented by** | Gerald I. Evenden and Martin Raspaud |
+---------------------+----------------------------------------------------------+
| **Options** |
+---------------------+----------------------------------------------------------+
diff --git a/docs/source/usage/operations/projections/merc.rst b/docs/source/usage/operations/projections/merc.rst
index 64ba98a4..8895abc8 100644
--- a/docs/source/usage/operations/projections/merc.rst
+++ b/docs/source/usage/operations/projections/merc.rst
@@ -53,7 +53,7 @@ Example using scaling factor::
12545706.61 2746073.80
-Note that ``+lat_ts`` and ``+k_0`` are mutually excusive.
+Note that ``+lat_ts`` and ``+k_0`` are mutually exclusive.
If used together, ``+lat_ts`` takes precedence over ``+k_0``.
Mathematical definition
diff --git a/docs/source/usage/operations/projections/rhealpix.rst b/docs/source/usage/operations/projections/rhealpix.rst
index 5808cfaa..b8ed4f5f 100644
--- a/docs/source/usage/operations/projections/rhealpix.rst
+++ b/docs/source/usage/operations/projections/rhealpix.rst
@@ -28,7 +28,7 @@ rHEALPix
rHEALPix is a projection based on the HEALPix projection. The implementation of
rHEALPix uses the HEALPix projection. The rHEALPix combines the peaks of the
HEALPix into a square. The square's position can be translated and rotated across
-the x-axis which is a noval approach for the rHEALPix projection. The initial
+the x-axis which is a novel approach for the rHEALPix projection. The initial
intention of using rHEALPix in the Spatial Computation Engine Science Collaboration
Environment (SCENZGrid).
diff --git a/docs/source/usage/operations/projections/tmerc.rst b/docs/source/usage/operations/projections/tmerc.rst
index 03aa2830..1fc0cd7e 100644
--- a/docs/source/usage/operations/projections/tmerc.rst
+++ b/docs/source/usage/operations/projections/tmerc.rst
@@ -74,7 +74,7 @@ The formulas describing the Transverse Mercator are all taken from Evenden's [Ev
:math:`k_0` is the scale factor at the natural origin (on the central meridian). It can be set with ``+k_0``.
-:math:`M(\phi)` is the meridianal distance.
+:math:`M(\phi)` is the meridional distance.
Spherical form
**************
diff --git a/html/gen_parms.html b/html/gen_parms.html
index d2b8305f..8cd8e161 100644
--- a/html/gen_parms.html
+++ b/html/gen_parms.html
@@ -10,7 +10,7 @@ which can be applied to all, or many coordinate system definitions. This
document does not attempt to describe the parameters particular to particular
projection types. Some of these can be found in the GeoTIFF
<a href="http://www.remotesensing.org/geotiff/proj_list/">Projections
-Transform List</a>. The definitative documentation for most parameters
+Transform List</a>. The definitive documentation for most parameters
is Gerald's original documentation available from the main PROJ.4 page. <p>
<hr>
@@ -136,7 +136,7 @@ otherwise the same.<p>
<hr>
<h2><a name="nadgrids">nadgrids - Grid Based Datum Adjustments</a></h2>
-In many places (notably North America and Austrialia) national geodetic
+In many places (notably North America and Australia) national geodetic
organizations provide grid shift files for converting between different
datums, such as NAD27 to NAD83. These grid shift files include a shift to
be applied at each grid location. Actually grid shifts are normally computed
diff --git a/html/man_pj_init.html b/html/man_pj_init.html
index 9e3c73e0..25889942 100644
--- a/html/man_pj_init.html
+++ b/html/man_pj_init.html
@@ -91,7 +91,7 @@ Memory associated with the projection may be freed with <B>pj_free</B>.
<H2>EXAMPLE</H2>
The following program reads latitude and longitude values in decimal
-degress, performs Mercator projection with a Clarke 1866 ellipsoid and
+degrees, performs Mercator projection with a Clarke 1866 ellipsoid and
a 33&#176; latitude of true scale and prints the projected
cartesian values in meters:
<PRE>
diff --git a/html/man_proj.html b/html/man_proj.html
index 79658d31..74980a94 100644
--- a/html/man_proj.html
+++ b/html/man_proj.html
@@ -177,7 +177,7 @@ output from x-y or longitude-latitude to y-x or latitude-longitude.
<DD>
Causes estimation of
-<I>meridinal</I>
+<I>meridional</I>
and
<I>parallel</I>
@@ -195,7 +195,7 @@ and
<I>minimum</I>
scale factors to be listed between &lt;&gt; for each input point.
-For conformal projections meridinal and parallel scales factors
+For conformal projections meridional and parallel scales factors
will be equal and angular distortion zero.
Equal area projections will have an area factor of 1.
<DT><B>-m</B><I> mult</I>
diff --git a/man/man1/cct.1 b/man/man1/cct.1
index b74896f4..d0553104 100644
--- a/man/man1/cct.1
+++ b/man/man1/cct.1
@@ -30,7 +30,7 @@ professor of Geodesy at the University of Copenhagen, mentor and advisor
for a generation of Danish geodesists, colleague and collaborator for
two generations of global geodesists, Secretary General for the
International Association of Geodesy, IAG (1995--2007), fellow of the
-Amercan Geophysical Union (1991), recipient of the IAG Levallois Medal
+American Geophysical Union (1991), recipient of the IAG Levallois Medal
(2007), the European Geosciences Union Vening Meinesz Medal (2008), and
of numerous other honours.
.PP
@@ -40,7 +40,7 @@ the development of geodesy - both through his scientific contributions,
comprising more than 250 publications, and by his mentoring and teaching
of the next generations of geodesists.
.PP
-As Christian was an avid Fortran programmer, and a keen Unix connoiseur,
+As Christian was an avid Fortran programmer, and a keen Unix connoisseur,
he would have enjoyed to know that his initials would be used to name a
modest Unix style transformation filter, hinting at the tireless aspect
of his personality, which was certainly one of the reasons he accomplished
diff --git a/man/man1/proj.1 b/man/man1/proj.1
index 5bcd11ca..5b58fcd8 100644
--- a/man/man1/proj.1
+++ b/man/man1/proj.1
@@ -119,7 +119,7 @@ output from x-y or longitude-latitude to y-x or latitude-longitude.
.TP
.BI \-S
Causes estimation of
-.I meridinal
+.I meridional
and
.I parallel
scale factors,
@@ -131,7 +131,7 @@ and
and
.I minimum
scale factors to be listed between <> for each input point.
-For conformal projections meridinal and parallel scales factors
+For conformal projections meridional and parallel scales factors
will be equal and angular distortion zero.
Equal area projections will have an area factor of 1.
.TP
diff --git a/nad/CMakeLists.txt b/nad/CMakeLists.txt
index 9858e055..904066f4 100644
--- a/nad/CMakeLists.txt
+++ b/nad/CMakeLists.txt
@@ -23,7 +23,8 @@ set(PROJ_DICTIONARY epsg
#
file(GLOB GSB_FILES *.gsb)
-set(GRIDSHIFT_FILES ${GSB_FILES})
+file(GLOB GTX_FILES *.gtx)
+set(GRIDSHIFT_FILES ${GSB_FILES} ${GTX_FILES})
set(GRIDSHIFT_FILES ${GRIDSHIFT_FILES}
)
option(CONVERT_DATA "convert some ascii file to binary file for use in proj4" OFF)
diff --git a/nad/Makefile.am b/nad/Makefile.am
index 99d00da3..001b1b06 100644
--- a/nad/Makefile.am
+++ b/nad/Makefile.am
@@ -50,7 +50,7 @@ install-data-local: process-nad2bin
else \
echo "nad2nad NADCON source files not present"; \
fi
- @for gridfile in $(NADPATH)/*.gsb $(NADPATH)/ntv1_can.dat dummy \
+ @for gridfile in $(NADPATH)/*.gsb $(NADPATH)/*.gtx $(NADPATH)/ntv1_can.dat dummy \
$(NADPATH)/alaska $(NADPATH)/conus $(NADPATH)/hawaii $(NADPATH)/null \
$(NADPATH)/prvi $(NADPATH)/stgeorge $(NADPATH)/stlrnc $(NADPATH)/stpaul \
$(NADPATH)/FL $(NADPATH)/MD $(NADPATH)/TN $(NADPATH)/WI $(NADPATH)/WO; do \
@@ -63,7 +63,7 @@ install-data-local: process-nad2bin
check-local: process-nad2bin
# Check if we are doing an out-of-tree build
@if test ! -f epsg; then \
- for gridfile in $(NADPATH)/*.gsb $(NADPATH)/ntv1_can.dat dummy ; do \
+ for gridfile in $(NADPATH)/*.gsb $(NADPATH)/*.gtx $(NADPATH)/ntv1_can.dat dummy ; do \
if test "$$gridfile" != "dummy" -a -f "$$gridfile" ; then \
cp $$gridfile .; \
fi; \
diff --git a/nad/README.GRD b/nad/README.GRD
deleted file mode 100644
index 1ecf4b22..00000000
--- a/nad/README.GRD
+++ /dev/null
@@ -1,48 +0,0 @@
- Grid Shift File Formats
- =======================
-
-
-ASCII .lla
-----------
-
-First line: comment, at most 80 characters in length.
-
-Second line:
-
-<grid_size_x> <grid_size_y> <ignore> <lowleft_longitude> <resolution_longitude>
-<lowleft_latitude> <resolution_latitude>
-
-Angles are in decimal degrees.
-
-
-Subsequent lines are:
-
-<line_no>: <x_shift> <y_shift> *
-
-The <line_no> is zero based, and will vary from 0 to <grid_size_y>-1. The
-number of x/y shift pairs will match <grid_size_x>. Grid lines can be
-split over multiple physical text lines. Use the colon to identify starts
-of new grid lines. The shift values are in millionths of a secondc of arc.
-
-
-For example, from MD.lla:
-
-Maryland - HP
- 25 17 1 -80.00000 .25000 37.00000 .25000
-0: 5107 -2502 -700 496 -656 468 -587 418 -481 347 -325 256 -111 152 166 50
-493 -37 854 -96 1221 -118 1568 -125 1953 -143 2433 -195 2464 -281 2529 -395
-1987 -729 447 -916 -3011 -1181 -5559 -406 -6094 541 -5714 1110 -5247 1289
--4993 1254 -4960 1151
-1: 4757 -1695 -644 429 -627 411 -602 368 -555 299 -470 206 -328 96 -125 -15
-126 -105 391 -146 634 -120 762 -58 911 -13 1583 -8 1049 -28 1451 123 1377 -464
-907 -603 -4056 -1955 -6769 -485 -5797 929 -4254 1413 -3251 1295 -2871 993
--2899 724
-
-
-The grid is 25x7, and covers the region with a lower left corner of
-80d00'W 37d00'N and an upper right corner of 73d45'W 43d15'N.
-
-
-BINARY
-------
-
diff --git a/nad/test27 b/nad/test27
index 917f5710..e154a0d6 100755
--- a/nad/test27
+++ b/nad/test27
@@ -4,7 +4,7 @@
# the second pair of numbers are respective easting and northing output.
#
# Proj will vary in the .001ft range with projections using Transverse
-# Mercator due to greater precision of meridinal distance function.
+# Mercator due to greater precision of meridional distance function.
#
NAD_DIR=`dirname $0`
EXE=$1
diff --git a/nad/test83 b/nad/test83
index cf182cea..c025938b 100755
--- a/nad/test83
+++ b/nad/test83
@@ -5,7 +5,7 @@
# the second pair of numbers are respective easting and northing output.
#
# Proj will vary in the .001ft range with projections using Transverse
-# Mercator due to greater precision of meridinal distance function.
+# Mercator due to greater precision of meridional distance function.
#
NAD_DIR=`dirname $0`
EXE=$1
diff --git a/src/PJ_calcofi.c b/src/PJ_calcofi.c
index 5c0b64ab..955e82c2 100644
--- a/src/PJ_calcofi.c
+++ b/src/PJ_calcofi.c
@@ -13,7 +13,7 @@ PROJ_HEAD(calcofi,
/* Conversions for the California Cooperative Oceanic Fisheries Investigations
Line/Station coordinate system following the algorithm of:
-Eber, L.E., and R.P. Hewitt. 1979. Conversion algorithms for the CALCOFI
+Eber, L.E., and R.P. Hewitt. 1979. Conversion algorithms for the CalCOFI
station grid. California Cooperative Oceanic Fisheries Investigations Reports
20:135-137. (corrected for typographical errors).
http://www.calcofi.org/publications/calcofireports/v20/Vol_20_Eber___Hewitt.pdf
diff --git a/src/PJ_horner.c b/src/PJ_horner.c
index d1146aa1..a132eff6 100644
--- a/src/PJ_horner.c
+++ b/src/PJ_horner.c
@@ -96,6 +96,8 @@ static HORNER *horner_alloc (size_t order, int complex_polynomia);
static void horner_free (HORNER *h);
struct horner {
+ int uneg; /* u axis negated? */
+ int vneg; /* v axis negated? */
int order; /* maximum degree of polynomium */
int coefs; /* number of coefficients for each polynomium */
double range; /* radius of the region of validity */
@@ -340,11 +342,19 @@ polynomial evaluation engine.
c = cb + sz;
e = position.u - transformation->fwd_origin->u;
n = position.v - transformation->fwd_origin->v;
+ if (transformation->uneg)
+ e = -e;
+ if (transformation->vneg)
+ n = -n;
} else { /* inverse */
cb = transformation->inv_c;
c = cb + sz;
e = position.u - transformation->inv_origin->u;
n = position.v - transformation->inv_origin->v;
+ if (transformation->uneg)
+ e = -e;
+ if (transformation->vneg)
+ n = -n;
}
if ((fabs(n) > range) || (fabs(e) > range)) {
@@ -454,6 +464,10 @@ PJ *PROJECTION(horner) {
P->opaque = (void *) Q;
if (complex_horner) {
+ /* Westings and/or southings? */
+ Q->uneg = pj_param_exists (P->params, "uneg") ? 1 : 0;
+ Q->vneg = pj_param_exists (P->params, "vneg") ? 1 : 0;
+
n = 2*degree + 2;
if (0==parse_coefs (P, Q->fwd_c, "fwd_c", n))
return horner_freeup (P, PJD_ERR_MISSING_ARGS);
@@ -461,8 +475,8 @@ PJ *PROJECTION(horner) {
return horner_freeup (P, PJD_ERR_MISSING_ARGS);
P->fwd4d = complex_horner_forward_4d;
P->inv4d = complex_horner_reverse_4d;
-
}
+
else {
n = horner_number_of_coefficients (degree);
if (0==parse_coefs (P, Q->fwd_u, "fwd_u", n))
diff --git a/src/cct.c b/src/cct.c
index dc68122d..25e97af9 100644
--- a/src/cct.c
+++ b/src/cct.c
@@ -24,7 +24,7 @@ professor of Geodesy at the University of Copenhagen, mentor and advisor
for a generation of Danish geodesists, colleague and collaborator for
two generations of global geodesists, Secretary General for the
International Association of Geodesy, IAG (1995--2007), fellow of the
-Amercan Geophysical Union (1991), recipient of the IAG Levallois Medal
+American Geophysical Union (1991), recipient of the IAG Levallois Medal
(2007), the European Geosciences Union Vening Meinesz Medal (2008), and
of numerous other honours.
@@ -34,7 +34,7 @@ the development of geodesy - both through his scientific contributions,
comprising more than 250 publications, and by his mentoring and teaching
of the next generations of geodesists.
-As Christian was an avid Fortran programmer, and a keen Unix connoiseur,
+As Christian was an avid Fortran programmer, and a keen Unix connoisseur,
he would have enjoyed to know that his initials would be used to name a
modest Unix style transformation filter, hinting at the tireless aspect
of his personality, which was certainly one of the reasons he accomplished
diff --git a/src/gie.c b/src/gie.c
index 577ad7cf..d9323bac 100644
--- a/src/gie.c
+++ b/src/gie.c
@@ -146,7 +146,7 @@ static ffio *ffio_create (const char **tags, size_t n_tags, size_t max_record_si
static const char *gie_tags[] = {
"<gie>", "operation", "accept", "expect", "roundtrip", "banner", "verbose",
- "direction", "tolerance", "ignore", "builtins", "echo", "</gie>"
+ "direction", "tolerance", "ignore", "builtins", "echo", "skip", "</gie>"
};
static const size_t n_gie_tags = sizeof gie_tags / sizeof gie_tags[0];
@@ -177,6 +177,7 @@ typedef struct {
PJ_COORD a, b, c, e;
PJ_DIRECTION dir;
int verbosity;
+ int skip;
int op_id;
int op_ok, op_ko, op_skip;
int total_ok, total_ko, total_skip;
@@ -192,6 +193,8 @@ typedef struct {
ffio *F = 0;
static gie_ctx T;
+int tests=0, succs=0, succ_fails=0, fail_fails=0, succ_rtps=0, fail_rtps=0;
+int succ_builtins=0, fail_builtins=0;
static const char delim[] = {"-------------------------------------------------------------------------------\n"};
@@ -299,6 +302,13 @@ int main (int argc, char **argv) {
fprintf (T.fout, "%sGrand total: %d. Success: %d, Skipped: %d, Failure: %d\n",
delim, T.grand_ok+T.grand_ko+T.grand_skip, T.grand_ok, T.grand_skip, T.grand_ko);
fprintf (T.fout, "%s", delim);
+ if (T.verbosity > 1) {
+ fprintf (T.fout, "Failing roundtrips: %4d, Succeeding roundtrips: %4d\n", fail_rtps, succ_rtps);
+ fprintf (T.fout, "Failing failures: %4d, Succeeding failures: %4d\n", fail_fails, succ_fails);
+ fprintf (T.fout, "Failing builtins: %4d, Succeeding builtins: %4d\n", fail_builtins, succ_builtins);
+ fprintf (T.fout, "Internal counters: %4.4d(%4.4d)\n", tests, succs);
+ fprintf (T.fout, "%s", delim);
+ }
}
else
if (T.grand_ko)
@@ -315,21 +325,54 @@ int main (int argc, char **argv) {
static int another_failure (void) {
T.op_ko++;
T.total_ko++;
+ proj_errno_reset (T.P);
return 0;
}
static int another_skip (void) {
T.op_skip++;
T.total_skip++;
+ proj_errno_reset (T.P);
return 0;
}
static int another_success (void) {
T.op_ok++;
T.total_ok++;
+ proj_errno_reset (T.P);
return 0;
}
+static int another_succeeding_failure (void) {
+ succ_fails++;
+ return another_success ();
+}
+
+static int another_failing_failure (void) {
+ fail_fails++;
+ return another_failure ();
+}
+
+static int another_succeeding_roundtrip (void) {
+ succ_rtps++;
+ return another_success ();
+}
+
+static int another_failing_roundtrip (void) {
+ fail_rtps++;
+ return another_failure ();
+}
+
+static int another_succeeding_builtin (void) {
+ succ_builtins++;
+ return another_success ();
+}
+
+static int another_failing_builtin (void) {
+ fail_builtins++;
+ return another_failure ();
+}
+
static int process_file (const char *fname) {
FILE *f;
@@ -339,6 +382,9 @@ static int process_file (const char *fname) {
T.op_ko = T.total_ko = 0;
T.op_skip = T.total_skip = 0;
+ if (T.skip)
+ return proj_destroy (T.P), T.P = 0, 0;
+
f = fopen (fname, "rt");
if (0==f) {
if (T.verbosity > 0) {
@@ -556,27 +602,27 @@ using the "builtins" command verb.
i = pj_unitconvert_selftest ();
if (i!=0) {
fprintf (T.fout, "pj_unitconvert_selftest fails with %d\n", i);
- another_failure();
+ another_failing_builtin();
}
else
- another_success ();
+ another_succeeding_builtin ();
i = pj_cart_selftest ();
if (i!=0) {
fprintf (T.fout, "pj_cart_selftest fails with %d\n", i);
- another_failure();
+ another_failing_builtin();
}
else
- another_success ();
+ another_succeeding_builtin ();
i = pj_horner_selftest ();
if (i!=0) {
fprintf (T.fout, "pj_horner_selftest fails with %d\n", i);
- another_failure();
+ another_failing_builtin();
}
else
- another_success ();
+ another_succeeding_builtin ();
return 0;
}
@@ -674,7 +720,7 @@ back/forward transformation pairs.
r = proj_roundtrip (T.P, T.dir, ntrips, &coo);
if (r <= d)
- return another_success ();
+ return another_succeeding_roundtrip ();
if (T.verbosity > -1) {
if (0==T.op_ko && T.verbosity < 2)
@@ -683,7 +729,7 @@ back/forward transformation pairs.
fprintf (T.fout, " FAILURE in %s(%d):\n", opt_strip_path (T.curr_file), (int) F->lineno);
fprintf (T.fout, " roundtrip deviation: %.6f mm, expected: %.6f mm\n", 1000*r, 1000*d);
}
- return another_failure ();
+ return another_failing_roundtrip ();
}
@@ -723,7 +769,7 @@ static int expect_message_cannot_parse (const char *args) {
}
static int expect_failure_with_errno_message (int expected, int got) {
- another_failure ();
+ another_failing_failure ();
if (T.verbosity < 0)
return 1;
@@ -779,14 +825,16 @@ Tell GIE what to expect, when transforming the ACCEPTed input
if (expect_failure_with_errno && proj_errno (T.P)!=expect_failure_with_errno)
return expect_failure_with_errno_message (expect_failure_with_errno, proj_errno(T.P));
- return another_success ();
+ return another_succeeding_failure ();
}
/* Otherwise, it's a true failure */
banner (T.operation);
- errmsg(3, "%sInvalid operation definition in line no. %d: %s\n",
- delim, (int) T.operation_lineno, pj_strerrno(proj_errno(T.P)));
- return another_failure ();
+ errmsg (3, "%sInvalid operation definition in line no. %d:\n %s (errno=%s/%d)\n",
+ delim, (int) T.operation_lineno, pj_strerrno(proj_errno(T.P)),
+ err_const_from_errno (proj_errno(T.P)), proj_errno(T.P)
+ );
+ return another_failing_failure ();
}
/* We may still successfully fail even if the proj_create succeeded */
@@ -797,20 +845,24 @@ Tell GIE what to expect, when transforming the ACCEPTed input
ci = proj_angular_input (T.P, T.dir)? torad_coord (T.P, T.dir, T.a): T.a;
co = expect_trans_n_dim (ci);
- /* Failed to fail? - that's a failure */
- if (co.xyz.x!=HUGE_VAL)
- return another_failure ();
-
if (expect_failure_with_errno) {
- printf ("errno=%d, expected=%d\n", proj_errno (T.P), expect_failure_with_errno);
if (proj_errno (T.P)==expect_failure_with_errno)
- return another_success ();
-
- return another_failure ();
+ return another_succeeding_failure ();
+ printf ("errno=%d, expected=%d\n", proj_errno (T.P), expect_failure_with_errno);
+ return another_failing_failure ();
}
- /* Yes, we failed successfully */
- return another_success ();
+
+ /* Succeeded in failing? - that's a success */
+ if (co.xyz.x==HUGE_VAL)
+ return another_succeeding_failure ();
+
+ /* Failed to fail? - that's a failure */
+ banner (T.operation);
+ errmsg (3, "%sFailed to fail. Operation definition in line no. %d\n",
+ delim, (int) T.operation_lineno
+ );
+ return another_failing_failure ();
}
@@ -822,10 +874,12 @@ Tell GIE what to expect, when transforming the ACCEPTed input
printf ("left: %d right: %d\n", T.P->left, T.P->right);
}
+ tests++;
T.e = parse_coord (args);
if (HUGE_VAL==T.e.v[0])
return expect_message_cannot_parse (args);
+
/* expected angular values, probably in degrees */
ce = proj_angular_output (T.P, T.dir)? torad_coord (T.P, T.dir, T.e): T.e;
if (T.verbosity > 3)
@@ -836,8 +890,14 @@ Tell GIE what to expect, when transforming the ACCEPTed input
if (T.verbosity > 3)
printf ("ACCEPTS %.12f %.12f %.12f %.12f\n", ci.v[0],ci.v[1],ci.v[2],ci.v[3]);
- /* angular output from proj_trans comes in radians */
+ /* do the transformation, but mask off dimensions not given in expect-ation */
co = expect_trans_n_dim (ci);
+ if (T.dimensions_given < 4)
+ co.v[3] = 0;
+ if (T.dimensions_given < 3)
+ co.v[2] = 0;
+
+ /* angular output from proj_trans comes in radians */
T.b = proj_angular_output (T.P, T.dir)? todeg_coord (T.P, T.dir, co): co;
if (T.verbosity > 3)
printf ("GOT %.12f %.12f %.12f %.12f\n", co.v[0],co.v[1],co.v[2],co.v[3]);
@@ -856,6 +916,7 @@ Tell GIE what to expect, when transforming the ACCEPTed input
if (d > T.tolerance)
return expect_message (d, args);
+ succs++;
another_success ();
return 0;
@@ -893,7 +954,20 @@ fprintf (T.fout, "%s\n", args);
+/*****************************************************************************/
+static int skip (const char *args) {
+/*****************************************************************************
+Indicate that the remaining material should be skipped. Mostly for debugging.
+******************************************************************************/
+ T.skip = 1;
+ (void) args;
+ return 0;
+}
+
+
static int dispatch (const char *cmnd, const char *args) {
+ if (T.skip)
+ return SKIP;
if (0==strcmp (cmnd, "operation")) return operation ((char *) args);
if (0==strcmp (cmnd, "accept")) return accept (args);
if (0==strcmp (cmnd, "expect")) return expect (args);
@@ -902,9 +976,10 @@ static int dispatch (const char *cmnd, const char *args) {
if (0==strcmp (cmnd, "verbose")) return verbose (args);
if (0==strcmp (cmnd, "direction")) return direction (args);
if (0==strcmp (cmnd, "tolerance")) return tolerance (args);
- if (0==strcmp (cmnd, "ignore")) return ignore (args);
+ if (0==strcmp (cmnd, "ignore")) return ignore (args);
if (0==strcmp (cmnd, "builtins")) return builtins (args);
if (0==strcmp (cmnd, "echo")) return echo (args);
+ if (0==strcmp (cmnd, "skip")) return skip (args);
return 0;
}
@@ -1223,6 +1298,8 @@ static int nextline (ffio *G) {
Read next line of input file. Returns 1 on success, 0 on failure.
****************************************************************************************/
G->next_args[0] = 0;
+ if (T.skip)
+ return 0;
if (0==fgets (G->next_args, (int) G->next_args_size - 1, G->f))
return 0;
if (feof (G->f))
@@ -1570,7 +1647,7 @@ static int pj_cart_selftest (void) {
/* Forward projection: Ellipsoidal-to-3D-Cartesian */
dist = proj_roundtrip (P, PJ_FWD, 1, &a);
- if (dist > 1e-12)
+ if (dist > 1e-9)
return 8;
/* Test at the South Pole */
@@ -1582,7 +1659,7 @@ static int pj_cart_selftest (void) {
/* Forward projection: Ellipsoidal-to-3D-Cartesian */
dist = proj_roundtrip (P, PJ_FWD, 1, &a);
- if (dist > 1e-12)
+ if (dist > 1e-9)
return 9;
diff --git a/src/pj_mlfn.c b/src/pj_mlfn.c
index e00f2bf1..84282d2b 100644
--- a/src/pj_mlfn.c
+++ b/src/pj_mlfn.c
@@ -1,5 +1,5 @@
#include <projects.h>
-/* meridinal distance for ellipsoid and inverse
+/* meridional distance for ellipsoid and inverse
** 8th degree - accurate to < 1e-5 meters when used in conjunction
** with typical major axis values.
** Inverse determines phi to EPS (1e-11) radians, about 1e-6 seconds.