Compare commits

...
29 Commits
Author SHA1 Message Date
Mike Taves 2c502c43b9 ReadTheDocs: use ninja, fix branch ref 2023-01-25 22:29:50 +13:00
Mike Taves 1bad5c5797 Improve docs for 5.0 2023-01-25 00:08:07 +13:00
Mike Taves 9aee7d07f1 Implement ReadTheDocs for 5.0, disable other CI workflows (#3586) 2023-01-23 00:09:42 +13:00
Even Rouault db162d3b06 mingw32 travis: reduce number of iterations for multistresstest 2018-04-01 14:39:20 +02:00
Kristian Evers 62200ce6a3 bump man3 version numbers 2018-04-01 13:14:16 +02:00
Kristian Evers f18c3bba8c Update man-pages (created from docs in master) 2018-03-21 16:17:35 +01:00
Kristian Evers 5ad2227c56 Bump version numbers 2018-03-21 16:17:35 +01:00
Kristian Evers 8d7d07544d Merge pull request #869 from kbevers/sphinx-man-pages
Auto-generate man pages from Sphinx docs
2018-03-21 15:50:40 +01:00
Kristian Evers 819140eb23 Update NEWS for 5.0.1 2018-03-21 15:39:27 +01:00
Kristian Evers cfbfea466e Merge branch '5.0' of https://github.com/OSGeo/proj.4 into 5.0 2018-03-21 15:35:17 +01:00
Mike Toews d42b48479b Avoid shadowed declaration errors with old gcc 2018-03-21 13:03:49 +01:00
Even Rouault c49fcf76a8 Take into account +towgs84=0,0,0 in pipeline to still imply geodetic->cartesian->geodetic (fixes #881) 2018-03-21 11:35:41 +01:00
Kristian Evers 11396b45a0 Merge branch 'master' into ctable-null 2018-03-21 10:12:06 +01:00
Mike Toews 4b65baf477 Avoid shadowed declaration errors with old gcc 2018-03-21 09:12:09 +01:00
Kristian Evers 35a2b5cbe6 Introduce late expansion of +datum parameters. Fixes #872. 2018-03-20 22:47:47 +01:00
Kurt Schwehr 8e0c5db704 Track the header size read in pj_gridinfo_init
Fixes #875

Found with autofuzz using MSAN: use-of-uninitialized-value
2018-03-20 22:45:26 +01:00
Charles Karney 4cc3d912e3 For the Intel compiler use "-fp-model precise" on all platforms. 2018-03-20 22:44:49 +01:00
Kristian Evers ae3527d4d5 Add 'exact' flag to Helmert operation when doing cs2cs emulation. Fixes #871. (#873) 2018-03-20 20:06:25 +01:00
Kristian Evers 23a028ffa0 Fix spelling error in gie error code. Closes #861. 2018-03-19 15:13:02 +01:00
Charles Karney bb69e6e578 Merge pull request #868 from cffk/geod-1.49.3
Patch 1.49.3 for geodesic package.

Closes #826, partially closes #843.
2018-03-19 15:07:21 +01:00
Kristian Evers 061e32f575 Use version numbers from proj.h in pj_release string 2018-03-16 14:48:24 +01:00
Kristian Evers c4895fdf89 Merge pull request #857 from kbevers/return-error-instead-of-zeros
Make sure that transient errors are returned correctly
2018-03-12 13:58:49 +01:00
Kristian Evers 9312b5c147 Remove 'pj_' prefix from static functions
Functions should only be prefixed with 'pj_' when they can be used in
other parts of the code base and not just within a single file.

Takes care of the last step in #675.
2018-03-12 13:57:33 +01:00
Thomas Knudsen 2b143b4829 Remove angle brackets for proj headers (#849)
* Avoid using angle brackets for PROJ headers.

Switching from #include <proj.h> to #include "proj.h",
and correspondingly for projects.h and proj_api.h,
reduces the risk of accidentally picking up a system
installed older version of the header while building
a new version of PROJ.

* Also handle geodesic.h
2018-03-11 13:19:09 +01:00
Thomas Knudsen 7e9d6d6fdd Repair PR #845: Scale vertical coords properly. (#848)
Thanks to Bas Couwenberg <sebastic@debian.org> for spotting this horrible bug!
2018-03-09 14:22:45 +01:00
Thomas Knudsen 847b58e85f Refactor pj_transform, reintroduce support for vertical scaling (#845)
* Refactor pj_transform, reintroduce support for vertical scaling
2018-03-09 13:43:21 +01:00
Kristian Evers 6f0b7a6eee Use consistent names for PJ_COORD's in declarations
Changes use of 'PJ_COORD coo' to 'PJ_COORD coord' so that variable names in
public function prototypes are consistent.

Closes #842.
2018-03-09 13:42:37 +01:00
Thomas Knudsen f7a47b01a7 Remove angle brackets in include proj.h
The #include <proj.h> in proj_internal.h has been changed to #include "proj.h" in order to avoid accidentally including an old installed proj.h file while building a new version of libproj.
2018-03-09 13:41:25 +01:00
Kristian Evers 2e179f25d2 Revert fix to #22
The fix in #22 solved the problem at hand and doing what was expected
from the specified parameters. Unfortunately it also removed the slightly
hacky "feature" that makes the web mercator work in pj_transform. The
web mercator is special since the latitude is computed on the ellipsoid,
but behaves as if if was defined on a sphere. Hence it is problematic to
change the ellipsoid parameters when using the web mercator, even though
that is the geodetically correct thing to do. The web mercator is used in
more or less any web mapping application and is thus one of the most
frequently used transformations in PROJ. This justifies re-introducing
the minor bug reported in #22.

The problem will have to be taken care of properly when pj_transform
is removed from the library in favour of the transformation pipelines
based API.
2018-03-05 11:35:07 +01:00
166 changed files with 2598 additions and 1700 deletions
+5 -1
View File
@@ -1,4 +1,6 @@
*~
*.bak
*.pyc
build.local.bat
build.local.sh
Makefile
@@ -36,9 +38,11 @@ README
/DartConfiguration.tcl
/Testing
# html
# docs
/html/dl
/html/robots.txt
/docs/plot/images
/latex
# m4
/m4/libtool.m4
+45
View File
@@ -0,0 +1,45 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
build:
os: "ubuntu-22.04"
tools:
python: "mambaforge-4.10"
jobs:
post_checkout:
# Cancel building pull requests when there aren't changed in the docs directory or YAML file.
# You can add any other files or directories that you'd like here as well,
# like your docs requirements file, or other files that will change your docs build.
#
# If there are no changes (git diff exits with 0) we force the command to return with 183.
# This is a special exit code on Read the Docs that will cancel the build immediately.
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/5.0 -- docs/ .readthedocs.yaml;
then
exit 183;
fi
- (git --no-pager log --pretty="tformat:%s -- %b" -1 | grep -viq "skip ci") || exit 183
pre_build:
- ./docs/rtd/pre_build.sh
- ./docs/rtd/plot.sh
apt_packages:
- cmake
- ninja-build
- gcc
formats:
- pdf
- epub
conda:
environment: docs/environment.yml
sphinx:
configuration: docs/source/conf.py
fail_on_warning: true
+13 -1
View File
@@ -33,6 +33,18 @@ elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
-Wfloat-conversion ${CMAKE_C_FLAGS}")
endif()
# Tell Intel compiler to do arithmetic accurately. This is needed to
# stop the compiler from ignoring parentheses in expressions like
# (a + b) + c and from simplifying 0.0 + x to x (which is wrong if
# x = -0.0).
if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
if (MSVC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:precise")
else ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise")
endif ()
endif ()
#################################################################################
# PROJ4 CMake modules
#################################################################################
@@ -51,7 +63,7 @@ colormsg(_HIBLUE_ "Configuring PROJ:")
include(Proj4Version)
proj_version(MAJOR 5 MINOR 0 PATCH 0)
set(PROJ_API_VERSION "13")
set(PROJ_BUILD_VERSION "13.0.1")
set(PROJ_BUILD_VERSION "13.1.0")
#################################################################################
# Build features and variants
+51
View File
@@ -1,3 +1,54 @@
5.0.1 Release Notes
-------------------
BUG FIXES
------------
All bug fix numbers refer to issues or pull requests indexed at
https://github.com/OSGeo/proj.4/
o Handle ellipsoid change correctly in pipelines when
+towgs84=0,0,0 is set #881
o Handle the case where nad_ctable2_init returns NULL #883
o Avoid shadowed declaration errors with old gcc #880
o Expand +datum properly +datum in pipelines #872
o Fail gracefully when incorrect headers are encountered in grid
files #875
o Improve roundtrip stability in pipelines using +towgs84 #871
o Fixed typo in gie error codes #861
o Numerical stability fixes to the geodesic package #826 #843
o Make sure that transient errors are returned correctly #857
o Make sure that locally installed header files are not used when
building PROJ #849
o Fix inconsistent parameter names in proj.h/proj_4D_api.c #842
o Make sure +vunits is applied #833
o Fix incorrect Web Mercator transformations #834
THANKS TO
------------
Version 5.0.1 is made possible by the following contributors:
Mike Toews
Kurt Schwehr
Even Rouault
Charles Karney
Thomas Knudsen
Kristian Evers
5.0.0 Release Notes
-------------------
+9 -3
View File
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([PROJ.4 Projections], 5.0.0, [https://github.com/OSGeo/proj.4/issues], proj)
AC_INIT([PROJ.4 Projections], 5.0.1, [https://github.com/OSGeo/proj.4/issues], proj)
AC_CONFIG_MACRO_DIR([m4])
AC_LANG(C)
@@ -29,6 +29,12 @@ CFLAGS="$save_CFLAGS"
dnl We check for headers
AC_HEADER_STDC
dnl Check flag for accurate arithmetic with Intel compiler. This is
dnl needed to stop the compiler from ignoring parentheses in expressions
dnl like (a + b) + c and from simplifying 0.0 + x to x (which is wrong if
dnl x = -0.0).
AX_CHECK_COMPILE_FLAG([-fp-model precise],
[CFLAGS="$CFLAGS -fp-model precise"],,[-Werror])
dnl Check for C99 math functions
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Werror"
@@ -107,8 +113,8 @@ dnl posix mutexes for instance).
dnl ---------------------------------------------------------------------------
AC_ARG_WITH([mutex],
AS_HELP_STRING([--without-mutex],
[Disable real mutex locks (lacking pthreads)]),,)
AS_HELP_STRING([--without-mutex],
[Disable real mutex locks (lacking pthreads)]),,)
AC_MSG_CHECKING([for mutexes])
THREAD_LIB=""
+13
View File
@@ -0,0 +1,13 @@
name: proj
channels:
- conda-forge
dependencies:
- descartes
- geojson
- matplotlib
- shapely < 1.8
- pip
- pip:
- Jinja2 < 3.1
- sphinx < 3
- sphinx-rtd-theme < 1.0
Regular → Executable
+130 -65
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
'''
Plot map data in different projections supported by PROJ.4
Plot map data in different projections supported by PROJ.
Call with:
@@ -41,28 +42,31 @@ or "line". The rest of the inputs are fairly free form.
Change PROJ to path on your local system before running the script.
'''
from __future__ import print_function
from __future__ import division
import argparse
import os
import os.path
import shutil
import sys
import json
import subprocess
import functools
from pathlib import Path
import geojson
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon
import fiona
from shapely.geometry import Polygon
from shapely.geometry import MultiPolygon
from shapely.geometry import MultiPolygon, Polygon, box as Box
from shapely.geometry import shape
from shapely.ops import transform
from descartes import PolygonPatch
PROJ = '../../src/proj'
PROJ_LIB = '../../nad'
PROJ_COMMAND = os.environ.get('PROJ_EXE', '../../src/proj')
if not os.path.exists(PROJ_COMMAND):
PROJ = shutil.which('proj')
if PROJ is None:
raise ValueError("specify PROJ_EXE or modify PATH to find proj")
else:
PROJ = PROJ_COMMAND
PROJ_LIB = os.environ.get('PROJ_LIB', '../../nad')
LINE_LOW = 'data/coastline.geojson'
LINE_MED = 'data/coastline50.geojson'
@@ -85,7 +89,7 @@ def interp_coords(coords, tol):
The function tries to densify a list of coordinates based on a simple measure.
If two adjacent points in the input coordinate list are further away from each
other than the specified tolerance, the list will be densied between those two
other than the specified tolerance, the list will be densified between those two
points. Roughly speaking, a point will be inserted every `tol` between the
points.
@@ -118,7 +122,7 @@ def interp_coords(coords, tol):
xy.append((x[offset:i], y[offset:i]))
# Interpolate between points above tolerance.
n = np.ceil(dsts[i] / tol)
n = int(np.ceil(dsts[i] / tol))
x1 = np.linspace(x[i], x[i + 1], n + 1)
y1 = np.linspace(y[i], y[i + 1], n + 1)
xy.append((x1[:-1], y1[:-1]))
@@ -157,8 +161,14 @@ def project(coordinates, proj_string, in_radians=False):
args = [PROJ, '-b']
args.extend(proj_string.split(' '))
proc = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
env={'PROJ_LIB': os.path.abspath(PROJ_LIB)})
try:
proc = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
env={'PROJ_LIB': os.path.abspath(PROJ_LIB)})
except FileNotFoundError as e:
print("'proj' binary not found, set the PROJ_EXE environment variable "
"to point to your local 'proj' binary --%s--" % e)
exit(1)
stdout, _ = proc.communicate(coordinates.tobytes(order='C'))
out = np.frombuffer(stdout, dtype=np.double)
@@ -217,7 +227,10 @@ def resample_polygon(polygon):
'''
Use interp_coords() to resample (multi)polygons.
'''
xy = polygon.exterior.coords.xy
try:
xy = polygon.exterior.coords.xy
except AttributeError: #no xy's
return polygon
ext = interp_coords(xy, 2)
# interiors
rings = []
@@ -226,27 +239,46 @@ def resample_polygon(polygon):
return Polygon(ext, rings)
def plot_with_interruptions(axes, x, y, delta_cut=1e100, **kwargs):
"""
Plot x/y with proper splitting for interrupted projections.
"""
_x = np.atleast_1d(x)
_y = np.atleast_1d(y)
dx = np.nan_to_num(_x[1: ]) - np.nan_to_num(_x[0: -1])
dy = np.nan_to_num(_y[1: ]) - np.nan_to_num(_y[0: -1])
split, = ((np.abs(dx) > delta_cut) | (np.abs(dy) > delta_cut)).nonzero()
split = np.append(split, _x.size - 1)
split += 1
last_part = 0
for part in split:
axes.plot(x[last_part: part],
y[last_part: part],
**kwargs)
last_part = part
def plotproj(plotdef, data, outdir):
'''
Plot map.
'''
fig, axes = plt.subplots()
axes = plt.axes()
bounds = (plotdef['lonmin'], plotdef['latmin'], plotdef['lonmax'], plotdef['latmax'])
for geom in data.filter(bbox=bounds):
temp_pol = shape(geom['geometry'])
box = Box(
plotdef['lonmin'], plotdef['latmin'],
plotdef['lonmax'], plotdef['latmax'])
for feat in data["features"]:
geom = shape(feat["geometry"])
if not geom.intersects(box):
continue
box = Polygon([
(plotdef['lonmin'], plotdef['latmin']),
(plotdef['lonmin'], plotdef['latmax']),
(plotdef['lonmax'], plotdef['latmax']),
(plotdef['lonmax'], plotdef['latmin']),
])
temp_pol = temp_pol.intersection(box)
temp_pol = geom.intersection(box)
if plotdef['type'] == 'poly':
if isinstance(temp_pol, MultiPolygon):
polys = [resample_polygon(polygon) for polygon in temp_pol]
polys = [resample_polygon(polygon) for polygon in temp_pol.geoms]
pol = MultiPolygon(polys)
else:
pol = resample_polygon(temp_pol)
@@ -257,11 +289,15 @@ def plotproj(plotdef, data, outdir):
proj_geom = transform(trans, pol)
if plotdef['type'] == 'poly':
patch = PolygonPatch(proj_geom, fc=COLOR_LAND, zorder=0)
axes.add_patch(patch)
try:
patch = PolygonPatch(proj_geom, fc=COLOR_LAND, zorder=0)
axes.add_patch(patch)
except TypeError:
pass
else:
x, y = proj_geom.xy
axes.plot(x, y, color=COLOR_COAST, linewidth=0.5)
plot_with_interruptions(axes, x, y, color=COLOR_COAST, linewidth=0.5,
delta_cut=plotdef.get('delta_cut', 1e100))
# Plot frame
frame = [
@@ -272,7 +308,8 @@ def plotproj(plotdef, data, outdir):
line = project(line, plotdef['projstring'])
x = line[:, 0]
y = line[:, 1]
axes.plot(x, y, '-k')
plot_with_interruptions(axes, x, y, color='black', linestyle='-',
delta_cut=plotdef.get('delta_cut', 1e6))
graticule = build_graticule(
plotdef['lonmin'],
@@ -286,60 +323,77 @@ def plotproj(plotdef, data, outdir):
feature = project(feature, plotdef['projstring'])
x = feature[:, 0]
y = feature[:, 1]
axes.plot(x, y, color=COLOR_GRAT, linewidth=0.4)
plot_with_interruptions(axes, x, y, color=COLOR_GRAT, linewidth=0.4,
delta_cut=plotdef.get('delta_cut', 1e6))
# Plot interrupted boundaries if necessary
interrupted_lines = []
if 'top_interrupted_lons' in plotdef:
for lon in plotdef['top_interrupted_lons']:
for delta in [-0.0001, 0.0001]:
merid = meridian(lon + delta, 0.0, plotdef['latmax'])
interrupted_lines.append(project(merid, plotdef['projstring']))
if 'bottom_interrupted_lons' in plotdef:
for lon in plotdef['bottom_interrupted_lons']:
for delta in [-0.0001, 0.0001]:
merid = meridian(lon + delta, plotdef['latmin'], 0)
interrupted_lines.append(project(merid, plotdef['projstring']))
for line in interrupted_lines:
x = line[:, 0]
y = line[:, 1]
plot_with_interruptions(axes, x, y, color=COLOR_GRAT, linewidth=0.4,
delta_cut=plotdef.get('delta_cut', 1e100))
# Switch off the axis lines...
plt.axis('off')
# ... and additionally switch off the visibility of the axis lines and
# labels so they can be removed by "bbox_inches='tight'" when saving
axes.get_xaxis().set_visible(False)
axes.get_yaxis().set_visible(False)
axes.axis('off')
font = {
'family': 'serif',
'color': 'black',
'style': 'italic',
'size': 12
}
fig.suptitle(plotdef['projstring'], fontdict=font)
axes.autoscale(tight=True)
if not os.path.exists(outdir):
os.makedirs(outdir)
fig.savefig(outdir + '/' + plotdef['filename'], dpi=300)
# Make sure the plot is not stretched
axes.set_aspect('equal')
outdir = Path(outdir)
if not outdir.exists():
outdir.mkdir(parents=True)
if not outdir.is_dir():
raise OSError("outdir is not a directory")
plt.savefig(outdir / plotdef['filename'],
dpi=400,
bbox_inches='tight')
# Clean up
fig = None
del fig
axes = None
del axes
plt.close()
def main():
def main(plotdefs, outdir, plots=[]):
'''
Main function of plotting script.
Parses json-file with plot setups and runs the plotting
for each plot setup.
'''
plotdefs = json.loads(Path(plotdefs).read_text())
data = {
('line', 'low'): fiona.open(LINE_LOW),
('line', 'med'): fiona.open(LINE_MED),
('poly', 'low'): fiona.open(POLY_LOW),
('poly', 'med'): fiona.open(POLY_MED),
('line', 'low'): geojson.loads(Path(LINE_LOW).read_text()),
('line', 'med'): geojson.loads(Path(LINE_MED).read_text()),
('poly', 'low'): geojson.loads(Path(POLY_LOW).read_text()),
('poly', 'med'): geojson.loads(Path(POLY_MED).read_text()),
}
if os.path.exists(sys.argv[1]):
# first argument is the JSON plot definition setup file
with open(sys.argv[1]) as plotsetup:
plotdefs = json.load(plotsetup)
else:
raise ValueError('No plot definition file entered')
plots = []
# second argument is the output dir
outdir = sys.argv[2]
# subsecond arguments are (optional) names of plot in plotdef.json
if len(sys.argv) > 3:
plots = sys.argv[3:len(sys.argv)]
for i, plotdef in enumerate(plotdefs):
if plots != [] and plotdef['name'] not in plots:
continue
@@ -351,9 +405,20 @@ def main():
plotproj(plotdef, data[(plotdef['type'], plotdef['res'])], outdir)
for key in data:
data[key].close()
if __name__ == "__main__":
sys.exit(main())
parser = argparse.ArgumentParser(
description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument(
'plotdefs',
help='A JSON file with setup for each auto-generated plot')
parser.add_argument(
'outdir',
help='Directory to put the plots in.')
parser.add_argument(
'plots', nargs='*',
help='A list of plot names within the plotdefs file. '
'More than one plotname can be given at once.')
args = parser.parse_args()
sys.exit(main(**vars(args)))
-2
View File
@@ -1,2 +0,0 @@
python3 plot.py plotdefs.json images/
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
set -e
export PATH="$HOME/.local/bin:$PATH"
export PROJ_LIB="$HOME/.local/share/proj"
cd docs/plot
python plot.py plotdefs.json images
cd ../..
mkdir -p docs/source/operations/projections/images/
cp -r docs/plot/images/* docs/source/operations/projections/images/
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
set -e
mkdir build
cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-Wno-error -DCMAKE_INSTALL_PREFIX=$HOME/.local ..
ninja install
+24 -12
View File
@@ -14,7 +14,6 @@
import sys
import os
import datetime
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -49,8 +48,7 @@ master_doc = 'index'
# General information about the project.
project = u'PROJ.4'
now = datetime.datetime.now()
copyright = u'1983-{0}'.format(now.year)
copyright = u'1983-2018'
author = u'Gerald Evenden, Frank Warmerdam, and others'
# The version info for the project you're documenting, acts as replacement for
@@ -58,20 +56,20 @@ author = u'Gerald Evenden, Frank Warmerdam, and others'
# built documents.
#
# The short X.Y version.
version = u'5.0.0'
version = u'5.0'
# The full version, including alpha/beta/rc tags.
release = u'5.0.0'
release = u'5.0.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# language = 'en'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
today = 'April 2018'
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
@@ -97,6 +95,9 @@ exclude_patterns = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# Specify default language for syntax highlighting.
highlight_language = 'none'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
@@ -144,10 +145,16 @@ html_theme_options = {}
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
htm_css_files = [
'theme_overrides.css', # override wide tables in RTD theme
]
html_context = {
'css_files': [
'_static/theme_overrides.css', # override wide tables in RTD theme
],
'display_github': True,
'theme_vcs_pageview_mode': 'edit',
'github_user': 'OSGeo',
'github_repo': 'PROJ',
'github_version': '/5.0/docs/source/',
}
# Add any extra paths that contain custom files (such as robots.txt or
@@ -217,6 +224,11 @@ htmlhelp_basename = 'proj4doc'
preamble = r"""
\ifdefined\DeclareUnicodeCharacter
\DeclareUnicodeCharacter{2032}{$'$}% prime
\fi
\usepackage[notbib,notindex]{tocbibind}
"""
latex_elements = {
@@ -228,7 +240,7 @@ latex_elements = {
# Additional stuff for the LaTeX preamble.
'preamble': preamble,
'inputenc':'\usepackage[utf8x]{inputenc}'
'inputenc': r'\usepackage[utf8]{inputenc}',
# Latex figure (float) alignment
#'figure_align': 'htbp',
@@ -239,7 +251,7 @@ latex_elements = {
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'proj4.tex', u'PROJ.4 Documentation',
u'Gerald Evenden', 'manual'),
author, 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -419,7 +419,7 @@ Various
:returns: :c:type:`PJ_COORD`
.. c:function:: double proj_roundtrip(PJ *P, PJ_DIRECTION direction, int n, PJ_COORD *coo)
.. c:function:: double proj_roundtrip(PJ *P, PJ_DIRECTION direction, int n, PJ_COORD *coord)
Measure internal consistency of a given transformation. The function
performs :c:data:`n` round trip transformations starting in either
@@ -432,7 +432,7 @@ Various
:param `direction`: Starting direction of transformation
:type `direction`: PJ_DIRECTION
:param int n: Number of roundtrip transformations
:param PJ_OBS obs: Input coordinate
:param PJ_COORD coord: Input coordinate
:returns: :c:type:`double` Distance between original coordinate and the \
resulting coordinate after :c:data:`n` transformation iterations.
@@ -487,7 +487,7 @@ Various
:returns: :c:type:`char*` Pointer to output buffer (same as :c:data:`s`)
.. c:function:: PJ_COORD proj_geocentric_latitude(const PJ *P, PJ_DIRECTION direction, PJ_COORD coo)
.. c:function:: PJ_COORD proj_geocentric_latitude(const PJ *P, PJ_DIRECTION direction, PJ_COORD coord)
Convert from geographical latitude to geocentric latitude.
@@ -495,8 +495,8 @@ Various
:type `P`: const PJ*
:param `direction`: Starting direction of transformation
:type `direction`: PJ_DIRECTION
:param `coo`: Coordinate
:type `coo`: PJ_COORD
:param `coord`: Coordinate
:type `coord`: PJ_COORD
:returns: :c:type:`PJ_COORD` Converted coordinate
+5 -7
View File
@@ -4,18 +4,14 @@
Download
================================================================================
.. contents:: Contents
:depth: 3
:backlinks: none
Release Notes
--------------------------------------------------------------------------------
* `NEWS <https://github.com/OSGeo/proj.4/blob/master/NEWS>`_
* `NEWS <https://github.com/OSGeo/proj.4/blob/5.0/NEWS>`_
Current Release
--------------------------------------------------------------------------------
* **2018-03-01** `proj-5.0.0.tar.gz`_ (`md5`_)
* **2018-04-01** `proj-5.0.1.tar.gz`_ (`md5`_)
* **2018-03-01** `proj-datumgrid-1.7.zip`_
* **2018-03-01** `proj-datumgrid-europe-1.0.zip`_
* **2018-03-01** `proj-datumgrid-north-america-1.0.zip`_
@@ -24,12 +20,14 @@ Current Release
Past Releases
--------------------------------------------------------------------------------
* **2018-03-01** `proj-5.0.0.tar.gz`_
* **2016-09-02** `proj-4.9.3.tar.gz`_
* **2015-09-13** `proj-4.9.2.tar.gz`_
* **2015-03-04** `proj-4.9.1.tar.gz`_
* **2016-09-11** `proj-datumgrid-1.6.zip`_
.. _`proj-5.0.1.tar.gz`: http://download.osgeo.org/proj/proj-5.0.1.tar.gz
.. _`proj-5.0.0.tar.gz`: http://download.osgeo.org/proj/proj-5.0.0.tar.gz
.. _`proj-4.9.1.tar.gz`: http://download.osgeo.org/proj/proj-4.9.1.tar.gz
.. _`proj-4.9.2.tar.gz`: http://download.osgeo.org/proj/proj-4.9.2.tar.gz
@@ -39,7 +37,7 @@ Past Releases
.. _`proj-datumgrid-europe-1.0.zip`: http://download.osgeo.org/proj/proj-datumgrid-europe-1.0.zip
.. _`proj-datumgrid-north-america-1.0.zip`: http://download.osgeo.org/proj/proj-datumgrid-north-america-1.0.zip
.. _`proj-datumgrid-oceania-1.0.zip`: http://download.osgeo.org/proj/proj-datumgrid-oceania-1.0.zip
.. _`md5`: http://download.osgeo.org/proj/proj-5.0.0.tar.gz.md5
.. _`md5`: http://download.osgeo.org/proj/proj-5.0.1.tar.gz.md5
Binaries
--------------------------------------------------------------------------------
+2 -2
View File
@@ -305,14 +305,14 @@ Output of above command:
What options does PROJ allow for the shape of the Earth (geodesy)?
--------------------------------------------------------------------------------
See https://github.com/OSGeo/proj.4/blob/master/src/pj_ellps.c
See https://github.com/OSGeo/proj.4/blob/5.0/src/pj_ellps.c
for possible ellipse options. For example, putting ``+ellps=WGS84`` uses
the ``WGS84`` Earth shape.
What if I want a spherical Earth?
--------------------------------------------------------------------------------
Use ``+ellps=sphere``. See https://github.com/OSGeo/proj.4/blob/master/src/pj_ellps.c
Use ``+ellps=sphere``. See https://github.com/OSGeo/proj.4/blob/5.0/src/pj_ellps.c
for the radius used in this case.
How do I change the radius of the Earth? How do I use PROJ for work on Mars?
+1 -1
View File
@@ -11,7 +11,7 @@ Introduction
------------
Consider a ellipsoid of revolution with equatorial radius :math:`a`, polar
semi-axis :math:`b`, and flattening :math:`f=(a−b)/a`. Points on
semi-axis :math:`b`, and flattening :math:`f=(a-b)/a`. Points on
the surface of the ellipsoid are characterized by their latitude :math:`\phi`
and longitude :math:`\lambda`. (Note that latitude here means the
*geographical latitude*, the angle between the normal to the ellipsoid
+4 -29
View File
@@ -10,29 +10,9 @@ a C API for software developers to include coordinate transformation in their
own software. PROJ is maintained on `GitHub <http://github.com/OSGeo/proj.4/>`_.
============= ================================================================
Platform Test Status and Coverage
============= ================================================================
Travis |travis|
AppVeyor |appveyor|
Coverage |coverals|
============= ================================================================
.. |travis| image:: https://travis-ci.org/OSGeo/proj.4.svg?branch=master
:target: https://travis-ci.org/OSGeo/proj.4
.. |appveyor| image:: https://ci.appveyor.com/api/projects/status/584j49uguwoo5evi?svg=true
:target: https://ci.appveyor.com/project/OSGeo/proj-4
.. |coverals| image:: https://coveralls.io/repos/OSGeo/proj.4/badge.svg?branch=master
:target: https://coveralls.io/r/OSGeo/proj.4?branch=master
Full documentation is available as a single PDF at
https://raw.githubusercontent.com/OSGeo/proj.4/gh-pages/proj4.pdf
Documentation
=================
.. toctree::
:maxdepth: 1
:maxdepth: 3
:hidden:
usage/index
operations/index
@@ -46,14 +26,9 @@ Documentation
license
references
Mailing List
================================================================================
The PROJ mailing list can be found at http://lists.maptools.org/mailman/listinfo/proj
Indices and tables
==================
.. only:: html
* :ref:`genindex`
* :ref:`search`
See also :ref:`genindex`
+7 -5
View File
@@ -1,8 +1,10 @@
.. _references:
================================================================================
References
================================================================================
.. only:: not latex
================================================================================
References
================================================================================
.. [AltamimiEtAl2002] Altamimi, Z., P. Sillard, and C. Boucher (2002),
ITRF2000: A new release of the International Terrestrial Reference Frame for earth science applications,
@@ -41,12 +43,12 @@ References
.. [Evenden1995] G. I. Evenden, 1995,
`Cartograpic Projection Procedures for the UNIX Environment -
A User's Manual
<https://github.com/OSGeo/proj.4/blob/master/docs/old/proj_4_3_12.pdf>`_.
<https://github.com/OSGeo/PROJ/blob/5.0/docs/old/proj_4_3_12.pdf>`_.
.. [Evenden2005] G. I. Evenden, 2005,
`libproj4: A Comprehensive Library of Cartographic Projection Functions
(Preliminary Draft)
<https://github.com/OSGeo/proj.4/blob/master/docs/old/libproj.pdf>`_.
<https://github.com/OSGeo/PROJ/blob/5.0/docs/old/libproj.pdf>`_.
.. [EversKnudsen2017] K. Evers and T. Knudsen, 2017,
`Transformation pipelines for PROJ.4
+74
View File
@@ -0,0 +1,74 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's compiler
# or gives an error. (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 5
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS
+205 -91
View File
@@ -1,112 +1,226 @@
.\" release 5
.\"
.ad b
.hy 1
.TH CCT 1 "2018/02/25 Rel. 5.0.0"
.\" Man page generated from reStructuredText.
.
.TH "CCT" "1" "Apr 1, 2018" "5.0.1" "PROJ.4"
.SH NAME
cct \- 4D equivalent to the "proj" projection program
cct \- Coordinate Conversion and Transformation
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.B cct
[\-options]... [+operator_specs]... infile...
.INDENT 0.0
.INDENT 3.5
\fBcct\fP [ \fB\-cotvz\fP [ args ] ] \fI+opts[=arg]\fP file[s]
.UNINDENT
.UNINDENT
.SH DESCRIPTION
.I cct
is a 4D equivalent to the proj(1) projection program.
.PP
cct is an acronym meaning "Coordinate Conversion and Transformation".
.PP
The acronym refers to definitions given in the OGC 08-015r2/ISO-19111
standard "Geographical Information -- Spatial Referencing by Coordinates",
which defines two different classes of coordinate operations:
.PP
*Coordinate Conversions*, which are coordinate operations where input
.sp
\fBcct\fP a 4D equivalent to the \fBproj\fP projection program,
performs transformation coordinate systems on a set of input points. The
coordinate system transformation can include translation between projected
and geographic coordinates as well as the application of datum shifts.
.sp
The following control parameters can appear in any order:
.INDENT 0.0
.TP
.B \-c <x,y,z,t>
Specify input columns for (up to) 4 input parameters. Defaults to 1,2,3,4.
.UNINDENT
.INDENT 0.0
.TP
.B \-o <output file name>, \-\-output=<output file name>
Specify the name of the output file.
.UNINDENT
.INDENT 0.0
.TP
.B \-t <time>, \-\-time=<time>
Specify a fixed observation time to be used for all input data.
.UNINDENT
.INDENT 0.0
.TP
.B \-z <height>, \-\-height=<height>
Specify a fixed observation height to be used for all input data.
.UNINDENT
.INDENT 0.0
.TP
.B \-v, \-\-verbose
Write non\-essential, but potentially useful, information to stderr.
Repeat for additional information (\fB\-vv\fP, \fB\-vvv\fP, etc.)
.UNINDENT
.sp
The \fI+args\fP arguments are associated with coordinate operation parameters.
Usage varies with operation.
.sp
\fBcct\fP is an acronym meaning \fICoordinate Conversion and Transformation\fP\&.
.sp
The acronym refers to definitions given in the OGC 08\-015r2/ISO\-19111
standard “Geographical Information – Spatial Referencing by Coordinates”,
which defines two different classes of \fIcoordinate operations\fP:
.sp
\fICoordinate Conversions\fP, which are coordinate operations where input
and output datum are identical (e.g. conversion from geographical to
cartesian coordinates) and
.PP
*Coordinate Transformations*, which are coordinate operations where
.sp
\fICoordinate Transformations\fP, which are coordinate operations where
input and output datums differ (e.g. change of reference frame).
.PP
\fBcct\fR, however, also refers to Carl Christian Tscherning (1942--2014),
.SH EXAMPLES
.INDENT 0.0
.IP 1. 3
The operator specs describe the action to be performed by \fBcct\fP\&. So
the following script
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
echo 12 55 0 0 | cct +proj=utm +zone=32 +ellps=GRS80
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
will transform the input geographic coordinates into UTM zone 32 coordinates.
Hence, the command
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
echo 12 55 | cct \-z0 \-t0 +proj=utm +zone=32 +ellps=GRS80
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Should give results comparable to the classic proj command
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
echo 12 55 | proj +proj=utm +zone=32 +ellps=GRS80
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.IP 2. 3
Convert geographical input to UTM zone 32 on the GRS80 ellipsoid:
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
cct +proj=utm +ellps=GRS80 +zone=32
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.IP 3. 3
Roundtrip accuracy check for the case above:
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
cct +proj=pipeline +proj=utm +ellps=GRS80 +zone=32 +step +step +inv
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.IP 4. 3
As (2) but specify input columns for longitude, latitude, height and time:
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
cct \-c 5,2,1,4 +proj=utm +ellps=GRS80 +zone=32
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.IP 5. 3
As (2) but specify fixed height and time, hence needing only 2 cols in
input:
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
cct \-t 0 \-z 0 +proj=utm +ellps=GRS80 +zone=32
.ft P
.fi
.UNINDENT
.UNINDENT
.SH BACKGROUND
.sp
\fBcct\fP also refers to Carl Christian Tscherning (1942–2014),
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
International Association of Geodesy, IAG (1995–2007), fellow of the
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
cct, or Christian, as he was known to most of us, was recognized for his
.sp
\fIcct\fP, or Christian, as he was known to most of us, was recognized for his
good mood, his sharp wit, his tireless work, and his great commitment to
the development of geodesy - both through his scientific contributions,
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
.sp
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
so much, and meant so much to so many people.
.PP
Hence, in honour of cct (the geodesist) this is cct (the program).
.SH OPTIONS
.IP "\fB\fB\-o /path/to/file\fR\fR" 1c
Specify output file name\&
.IP "\fB\fB\-c x,y,z,t\fR\fR" 1c
Specify input columns for (up to) 4 input parameters.
Defaults to 1,2,3,4\&
.IP "\fB\fB\-z value\fR\fR" 1c
Provide a fixed z value for all input data (e.g. \-z 0)\&
.IP "\fB\fB\-t value\fR\fR" 1c
Provide a fixed t value for all input data (e.g. \-t 0)\&
.IP "\fB\fB\-I\fR\fR" 1c
Do the inverse transformation\&
.IP "\fB\fB\-v\fR\fR" 1c
Verbose: Provide non-essential informational output.
Repeat \-v for more verbosity (e.g. \-vv)\&
.SH LONG OPTIONS
.IP "\fB\fB\-\-output\fR\fR" 1c
Alias for \-o\&
.IP "\fB\fB\-\-columns\fR\fR" 1c
Alias for \-c\&
.IP "\fB\fB\-\-height\fR\fR" 1c
Alias for \-z\&
.IP "\fB\fB\-\-time\fR\fR" 1c
Alias for \-t\&
.IP "\fB\fB\-\-verbose\fR\fR" 1c
Alias for \-v\&
.IP "\fB\fB\-\-inverse\fR\fR" 1c
Alias for \-I\&
.IP "\fB\fB\-\-help\fR\fR" 1c
Alias for -h\&
.SH OPERATOR SPECS
The operator specs describe the action to be performed by cct, e.g:
.IP
+proj=utm +ellps=GRS80 +zone=32
.PP
instructs cct to convert input data to Universal Transverse Mercator, zone 32
coordinates, based on the GRS80 ellipsoid.
.PP
Hence, the command
.IP
echo 12 55 | cct -z0 -t0 +proj=utm +zone=32 +ellps=GRS80
.PP
Should give results comparable to the classic proj command
.IP
echo 12 55 | proj +proj=utm +zone=32 +ellps=GRS80
.SH EXAMPLES
1. convert geographical input to UTM zone 32 on the GRS80 ellipsoid:
.IP
cct +proj=utm +ellps=GRS80 +zone=32
.PP
2. roundtrip accuracy check for the case above:
.IP
cct +proj=pipeline +proj=utm +ellps=GRS80 +zone=32 +step +step +inv
.PP
3. as (1) but specify input columns for longitude, latitude, height and time:
.IP
cct -c 5,2,1,4 +proj=utm +ellps=GRS80 +zone=32
.PP
4. as (1) but specify fixed height and time, hence needing only 2 cols in input:
.IP
cct -t 0 -z 0 +proj=utm +ellps=GRS80 +zone=32
.sp
Hence, in honour of \fIcct\fP (the geodesist) this is \fBcct\fP (the program).
.SH SEE ALSO
.sp
\fBproj(1)\fP, \fBcs2cs(1)\fP, \fBgeod(1)\fP, \fBgie(1)\fP
.SH BUGS
.sp
A list of know bugs can be found at \fI\%http://github.com/OSGeo/proj.4/issues\fP
where new bug reports can be submitted to.
.SH HOME PAGE
http://proj4.org/
.sp
\fI\%http://proj4.org/\fP
.SH AUTHOR
Thomas Knudsen
.SH COPYRIGHT
1983-2018
.\" Generated by docutils manpage writer.
.
+196 -181
View File
@@ -1,205 +1,220 @@
.\" release 5
.\"
.ad b
.hy 1
.TH CS2CS 1 "2018/02/15 Rel. 5.0.0"
.\" Man page generated from reStructuredText.
.
.TH "CS2CS" "1" "Apr 1, 2018" "5.0.1" "PROJ.4"
.SH NAME
cs2cs \- cartographic coordinate system filter
cs2cs \- Cartographic coordinate system filter
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.B cs2cs
[
.B \-eEfIlrstvwW
[
.I args
] ] [
.B +opts[=arg]
]
.br
[ \fB+to\fR [\fB+opts\fR[\fB=arg\fR]] ]
file[s]
.INDENT 0.0
.INDENT 3.5
\fBcs2cs\fP [ \fB\-eEfIlrstvwW\fP [ args ] ] [ \fI+opts[=arg]\fP ] [ +to [\fI+opts[=arg]\fP] ] file[s]
.UNINDENT
.UNINDENT
.SH DESCRIPTION
.I Cs2cs
performs transformation between the source and destination cartographic
coordinate system on a set of input points. The coordinate system
transformation can include translation between projected and geographic
coordinates as well as the application of datum shifts.
.PP
The following control parameters can appear in any order:
.sp
\fBcs2cs\fP performs transformation between the source and destination
cartographic coordinate system on a set of input points. The coordinate
system transformation can include translation between projected and
geographic coordinates as well as the application of datum shifts.
.sp
The following control parameters can appear in any order:
.INDENT 0.0
.TP
.BI \-I
method to specify inverse translation, convert from \fB+to\fR coordinate
system to the primary coordinate system defined.
.B \-I
method to specify inverse translation, convert from \fI+to\fP coordinate system to
the primary coordinate system defined.
.UNINDENT
.INDENT 0.0
.TP
.BI \-t "a"
.I A
specifies a character employed as the first character to denote
a control line to be passed through without processing.
This option applicable to ascii input only.
(# is the default value).
.B \-t<a>
A specifies a character employed as the first character to denote a control
line to be passed through without processing. This option applicable to
ascii input only. (# is the default value).
.UNINDENT
.INDENT 0.0
.TP
.BI \-e " string"
.I String
is an arbitrary string to be output if an error is detected during
data transformations.
The default value is: *\et*.
Note that if the
.B \-b,
.B \-i
or
.B \-o
options are employed, an error is returned as HUGE_VAL
value for both return values.
.B \-e <string>
String is an arbitrary string to be output if an error is detected during
data transformations. The default value is: \fIt\fP\&. Note that if the \-b, \-i
or \-o options are employed, an error is returned as HUGE_VAL value for both
return values.
.UNINDENT
.INDENT 0.0
.TP
.BI \-E
causes the input coordinates to be copied to the output line
prior to printing the converted values.
.B \-E
causes the input coordinates to be copied to the output line prior to
printing the converted values.
.UNINDENT
.INDENT 0.0
.TP
.B \-l<[=id]>
List projection identifiers that can be selected with \fI+proj\fP\&. \fBcs2cs \-l=id\fP
gives expanded description of projection id, e.g. \fBcs2cs \-l=merc\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.BI \-l "[p|P|=|e|u|d]" id
List projection identifiers with
.B \-l,
.B \-lp
or
.B \-lP (expanded)
that can be selected with
.B +proj.
.BI \-l= id
gives expanded description of projection
.I id.
List ellipsoid identifiers with
.B \-le,
that can be selected with
.B +ellps,
List of all projection id that can be used with the \fI+proj\fP parameter.
Equivalent to \fBcs2cs \-l\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-lP
Expanded description of all projections that can be used with the \fI+proj\fP
parameter.
.UNINDENT
.INDENT 0.0
.TP
.B \-le
List of all ellipsoids that can be selected with the \fI+ellps\fP parameters.
.UNINDENT
.INDENT 0.0
.TP
.B \-lu
list of cartesian to meter conversion factors
that can be selected with
.B +units
or
List of all distance units that can be selected with the \fI+units\fP parameter.
.UNINDENT
.INDENT 0.0
.TP
.B \-ld
list of datums that can be selected with
.B +datum.
List of datums that can be selected with the \fI+datum\fP parameter.
.UNINDENT
.INDENT 0.0
.TP
.BI \-r
This options reverses the order of the
expected input from longitude-latitude or x-y to latitude-longitude or y-x.
.B \-r
This options reverses the order of the expected input from
longitude\-latitude or x\-y to latitude\-longitude or y\-x.
.UNINDENT
.INDENT 0.0
.TP
.BI \-s
This options reverses the order of the
output from x-y or longitude-latitude to y-x or latitude-longitude.
.B \-s
This options reverses the order of the output from x\-y or longitude\-latitude
to y\-x or latitude\-longitude.
.UNINDENT
.INDENT 0.0
.TP
.BI \-f " format"
.I Format
is a
.I printf
format string to control the form of the output values.
For inverse projections, the output will be in degrees when this option
is employed.
If a format is specified for inverse projection the
output data will be in decimal degrees.
The default format is "%.2f" for forward projection and DMS
for inverse.
.B \-f <format>
Format is a printf format string to control the form of the output values.
For inverse projections, the output will be in degrees when this option is
employed. If a format is specified for inverse projection the output data
will be in deci\- mal degrees. The default format is “%.2f” for forward
projection and DMS for inverse.
.UNINDENT
.INDENT 0.0
.TP
.BI \-[w|W] n
.I N
is the number of significant fractional digits to employ for
seconds output (when the option is not specified,
.B \-w3
is assumed).
When
.B \-W
is employed the fields will be constant width and with leading zeroes.
.B \-[w|W]<n>
N is the number of significant fractional digits to employ for seconds
output (when the option is not specified, \-w3 is assumed). When \-W is
employed the fields will be constant width and with leading zeroes.
.UNINDENT
.INDENT 0.0
.TP
.B \-v
causes a listing of cartographic control parameters tested for and
used by the program to be printed prior to input data.
.PP
The
.B +args
run-line arguments are associated with cartographic parameters
and usage varies with projection and for a complete description see
.I "Cartographic Projection Procedures for the UNIX Environment\(emA User's Manual"
and supplementary documentation for Release 4.
.PP
The \fIcs2cs\fR program requires two coordinate system definitions. The
first (or primary is defined based on all projection parameters not
appearing after the \fB+to\fR argument. All projection parameters
appearing after the \fB+to\fR argument are considered the definition
of the second coordinate system. If there is no second coordinate system
defined, a geographic coordinate system based on the datum and ellipsoid of
the source coordinate system is assumed. Note that the source and destination
coordinate system can both be projections, both be geographic, or one of
each and may have the same or different datums.
.PP
Additional projection control parameters may be contained in two
auxiliary control files:
the first is optionally referenced with the
.BI +init= file:id
and the second is always processed after the name
of the projection has been established from either the run-line
or the contents of
.B +init
file.
The environment parameter
.B PROJ_LIB
establishes the default directory for a file reference without
an absolute path. This is also used for supporting files like
datum shift files.
.PP
One or more
.I files
(processed in left to right 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
.I stdin.
For 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 trailing portions
causes a listing of cartographic control parameters tested for and used by
the program to be printed prior to input data.
.UNINDENT
.sp
The \fI+args\fP run\-line arguments are associated with cartographic
parameters.
.sp
The \fBcs2cs\fP program requires two coordinate system definitions. The first (or
primary is defined based on all projection parameters not appearing after the
\fI+to\fP argument. All projection parameters appearing after the \fI+to\fP argument
are considered the definition of the second coordinate system. If there is no
second coordinate system defined, a geographic coordinate system based on the
datum and ellipsoid of the source coordinate system is assumed. Note that the
source and destination coordinate system can both be projections, both be
geographic, or one of each and may have the same or different datums.
.sp
Additional projection control parameters may be contained in two auxiliary
control files: the first is optionally referenced with the
\fI+init=file:id\fP and the second is always processed after the name of the
projection has been established from either the run\-line or the contents of
\fI+init\fP file. The environment parameter PROJ_LIB establishes the default
directory for a file reference without an absolute path. This is also used
for supporting files like datum shift files.
.sp
One or more files (processed in left to right order) specify the source of
data to be transformed. A \fB\-\fP will specify the location of processing standard
input. If no files are specified, the input is assumed to be from stdin.
For 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 trailing portions
of the input line are appended to the output line.
.PP
Input geographic data
(longitude and latitude) must be in DMS or decimal degrees format and input
cartesian data must be in units consistent with the ellipsoid
major axis or sphere radius units.
Output geographic coordinates will normally be in DMS format (use
.B \-f %.12f
for decimal degrees with 12 decimal places), while
projected (cartesian) coordinates will be in linear (meter, feet) units.
.sp
Input geographic data (longitude and latitude) must be in DMS or decimal
degrees format and input cartesian data must be in units consistent with the
ellipsoid major axis or sphere radius units. Output geographic coordinates will
normally be in DMS format (use \fB\-f %.12f\fP for decimal degrees with 12 decimal
places), while projected (cartesian) coordinates will be in linear
(meter, feet) units.
.SH EXAMPLE
.sp
The following script
.RS 5
\f(CWcs2cs +proj=latlong +datum=NAD83
+to +proj=utm +zone=10 +datum=NAD27 \-r <<EOF
45d15'33.1" 111.5W
45d15.551666667N \-111d30
+45.25919444444 111d30'000w
EOF\fR
.RE
will transform the input NAD83 geographic coordinates into NAD27 coordinates
in the UTM projection with zone 10 selected.
The geographic values of this example are equivalent and meant
as examples of various forms of DMS input.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27 \-r
<<EOF 45d15\(aq33.1" 111.5W 45d15.551666667N \-111d30 +45.25919444444
111d30\(aq000w EOF
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
will transform the input NAD83 geographic coordinates into NAD27 coordinates in
the UTM projection with zone 10 selected. The geographic values of this
example are equivalent and meant as examples of various forms of DMS input.
The x\-y output data will appear as three lines of:
.RS 5
\f(CW1402285.99 5076292.42 0.000
.RE
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
1402285.99 5076292.42 0.000
.ft P
.fi
.UNINDENT
.UNINDENT
.SH SEE ALSO
.B proj(1),
.br
.I "Cartographic Projection Procedures for the UNIX Environment\(emA User's Manual,"
(Evenden, 1990, Open-file report 90\-284).
.br
.I "Map Projections Used by the U. S. Geological Survey"
(Snyder, 1984,
USGS Bulletin 1532).
.br
.I "Map Projections\(emA Working Manual"
(Snyder, 1988, USGS Prof. Paper 1395).
.br
.I "An Album of Map Projections"
(Snyder & Voxland, 1989, USGS Prof. Paper 1453).
.sp
\fBproj(1)\fP, \fBcct(1)\fP, \fBgeod(1)\fP, \fBgie(1)\fP
.SH BUGS
A list of known bugs can found at https://github.com/OSGeo/proj.4/issues
where new bug reports can be submitted too.
.sp
A list of know bugs can be found at \fI\%http://github.com/OSGeo/proj.4/issues\fP
where new bug reports can be submitted to.
.SH HOME PAGE
http://proj4.org/
.sp
\fI\%http://proj4.org/\fP
.SH AUTHOR
Frank Warmerdam
.SH COPYRIGHT
1983-2018
.\" Generated by docutils manpage writer.
.
+241 -210
View File
@@ -1,231 +1,262 @@
.\" @(#)geod.1
.\"
.ad b
.hy 1
.TH GEOD 1 "2018/02/15 Rel. 5.0.0"
.\" Man page generated from reStructuredText.
.
.TH "GEOD" "1" "Apr 1, 2018" "5.0.1" "PROJ.4"
.SH NAME
geod \- direct geodesic computations
.br
invgeod \- inverse geodesic computations
geod \- Geodesic computations
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.B geod
.B +ellps=<ellipse>
[
.B \-afFIlptwW
[
.I args
] ] [
.B +args
]
file[s]
.br
.B invgeod
.B +ellps=<ellipse>
[
.B \-afFIlptwW
[
.I args
] ] [
.B +args
]
file[s]
.INDENT 0.0
.INDENT 3.5
\fBgeod\fP \fI+ellps=<ellipse>\fP [ \fB\-afFIlptwW\fP [ args ] ] [ \fI+args\fP ] file[s]
.sp
\fBinvgeod\fP \fI+ellps=<ellipse>\fP [ \fB\-afFIlptwW\fP [ args ] ] [ \fI+args\fP ] file[s]
.UNINDENT
.UNINDENT
.SH DESCRIPTION
.I geod
(direct) and
.I invgeod
(inverse)
perform geodesic ("Great Circle") computations for determining
latitude, longitude and back azimuth of a terminus point
given a initial point latitude, longitude, azimuth and distance (direct) or
the forward and back azimuths and distance between an initial and
terminus point latitudes and longitudes (inverse). The results are
accurate to round off for |\fIf\fR| < 1/50, where \fIf\fR is flattening.
.B invgeod
may not be available on all platforms; in this case call
.B geod
with the
.B \-I
option.
.PP
The following command-line options can appear in any order:
.sp
\fBgeod\fP (direct) and \fBinvgeod\fP (inverse) perform geodesic
(Great Circle) computations for determining latitude, longitude and back
azimuth of a terminus point given a initial point latitude, longitude,
azimuth and distance (direct) or the forward and back azimuths and distance
between an initial and terminus point latitudes and longitudes (inverse).
The results are accurate to round off for |f| < 1/50, where
f is flattening.
.sp
\fBinvgeod\fP may not be available on all platforms; in this case
use \fI\%geod \-I\fP instead.
.sp
The following command\-line options can appear in any order:
.INDENT 0.0
.TP
.B \-I
Specifies that the inverse geodesic computation is to be performed.
May be used with execution of
.B geod
as an alternative to
.B invgeod
execution.
Specifies that the inverse geodesic computation is to be performed. May be
used with execution of geod as an alternative to invgeod execution.
.UNINDENT
.INDENT 0.0
.TP
.B \-a
Latitude and longitudes of the initial and terminal points,
forward and back azimuths and distance are output.
Latitude and longitudes of the initial and terminal points, forward and
back azimuths and distance are output.
.UNINDENT
.INDENT 0.0
.TP
.BI \-t "a"
.I A
specifies a character employed as the first character to denote
a control line to be passed through without processing.
.B \-ta
A specifies a character employed as the first character to denote a control
line to be passed through without processing.
.UNINDENT
.INDENT 0.0
.TP
.BI \-le
.B \-le
Gives a listing of all the ellipsoids that may be selected with the
.B +ellps=
\fI+ellps=\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-lu
Gives a listing of all the units that may be selected with the \fI+units=\fP
option.
.UNINDENT
.INDENT 0.0
.TP
.BI \-lu
Gives a listing of all the units that may be selected with the
.B +units=
option.
.B \-f <format>
Format is a printf format string to control the output form of the
geographic coordinate values. The default mode is DMS for geographic
coordinates and “%.3f” for distance.
.UNINDENT
.INDENT 0.0
.TP
.BI \-[f|F] " format"
.I Format
is a
.I printf
format string to control the output form of the geographic coordinate values
(\fBf\fR) or distance value (\fBF\fR).
The default mode is DMS for geographic coordinates and "%.3f" for distance.
.B \-F <format>
Format is a printf format string to control the output form of the distance
value (\fB\-F\fP). The default mode is DMS for geographic coordinates and
“%.3f” for distance.
.UNINDENT
.INDENT 0.0
.TP
.BI \-[w|W] n
.I N
is the number of significant fractional digits to employ for
seconds output (when the option is not specified,
.B \-w3
is assumed).
When
.B \-W
is employed the fields will be constant width with leading zeroes.
.B \-w<n>
N is the number of significant fractional digits to employ for seconds
output (when the option is not specified, \fB\-w3\fP is assumed).
.UNINDENT
.INDENT 0.0
.TP
.B \-W<n>
N is the number of significant fractional digits to employ for seconds
output. When \fB\-W\fP is employed the fields will be constant width
with leading zeroes.
.UNINDENT
.INDENT 0.0
.TP
.B \-p
This option causes the azimuthal values to be output as unsigned
DMS numbers between 0 and 360 degrees. Also note \-f.
.PP
The
.B +args
command-line options are associated with geodetic parameters
for specifying the ellipsoidal or sphere to use.
See
.B proj
documentation for full list of these parameters and controls.
The options are processed in left to right order
from the command line.
Reentry of an option is ignored with the first occurrence assumed to
be the desired value.
.PP
One or more
.I files
(processed in left to right 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
.I stdin.
.PP
For direct determinations input data must be in latitude,
longitude, azimuth and distance order and output will be
latitude, longitude and back azimuth of the terminus point.
Latitude, longitude of the initial and terminus point are
input for the inverse mode and respective forward and back
azimuth from the initial and terminus points are output along
with the distance between the points.
.PP
Input geographic coordinates (latitude and longitude) and azimuthal data
must be in decimal degrees or DMS format and input distance data must be
in units consistent with the ellipsoid major axis or sphere radius
units. The latitude must lie in the range [-90d,90d]. Output
geographic coordinates will be in DMS (if the
.B \-f
switch is not employed) to 0.001"
with trailing, zero-valued minute-second fields deleted.
Output distance data will be in the same units as the ellipsoid or
sphere radius.
.PP
The Earth's ellipsoidal figure may be selected in the same
manner as program
.B proj
by using
.B "+ellps=, +a=, +es=,"
etc.
.PP
.I Geod
may also be used to determine intermediate points along either
a geodesic line between two points or along an arc of specified distance
from a geographic point.
In both cases an initial point must be specified with
.BI +lat_1= lat
and
.BI +lon_1= lon
parameters and either a terminus point
.BI +lat_2= lat
and
.BI +lon_2= lon
or a distance and azimuth from the initial point with
.BI +S= distance
and
.BI +A= azimuth
must be specified.
.PP
If points along a geodesic are to be determined then either
.BI +n_S= integer
specifying the number of intermediate points and/or
.BI +del_S= distance
specifying the incremental distance between points must be specified.
.PP
To determine points along an arc equidistant from the initial point both
.BI +del_A= angle
and
.BI +n_A= integer
must be specified which determine the respective angular increments
and number of points to be determined.
.RE
.SH EXAMPLE
The following script determines the geodesic azimuths and distance in
U.S. statute miles from Boston, MA, to Portland, OR:
.RS 5
\f(CWgeod +ellps=clrk66 <<EOF \-I +units=us\-mi
42d15'N 71d07'W 45d31'N 123d41'W
EOF\fR
.RE
This option causes the azimuthal values to be output as unsigned DMS
numbers between 0 and 360 degrees. Also note \fI\%\-f\fP\&.
.UNINDENT
.sp
The \fI+args\fP command\-line options are associated with geodetic
parameters for specifying the ellipsoidal or sphere to use.
controls. The options are processed in left to right order
from the command line. Reentry of an option is ignored with
the first occurrence assumed to be the desired value.
.sp
See the PROJ documentation for a full list of these parameters and
controls.
.sp
One or more files (processed in left to right order) specify
the source of data to be transformed. A \fB\-\fP will specify the
location of processing standard input. If no files are specified,
the input is assumed to be from stdin.
.sp
For direct determinations input data must be in latitude, longitude,
azimuth and distance order and output will be latitude,
longitude and back azimuth of the terminus point. Latitude,
longitude of the initial and terminus point are input for the
inverse mode and respective forward and back azimuth from the
initial and terminus points are output along with the distance
between the points.
.sp
Input geographic coordinates (latitude and longitude) and
azimuthal data must be in decimal degrees or DMS format and
input distance data must be in units consistent with the ellipsoid
major axis or sphere radius units. The latitude must lie
in the range [\-90d,90d]. Output geographic coordinates will be
in DMS (if the \fI\%\-f\fP switch is not employed) to 0.001” with trailing,
zero\-valued minute\-second fields deleted. Output distance
data will be in the same units as the ellipsoid or sphere
radius.
.sp
The Earth’s ellipsoidal figure may be selected in the same manner
as program \fBproj\fP by using \fI+ellps=\fP, \fI+a=\fP, \fI+es=\fP, etc.
.sp
Geod may also be used to determine intermediate points along
either a geodesic line between two points or along an arc of
specified distance from a geographic point. In both cases an
initial point must be specified with \fI+lat_1=lat\fP and \fI+lon_1=lon\fP
parameters and either a terminus point \fI+lat_2=lat\fP and
\fI+lon_2=lon\fP or a distance and azimuth from the initial point
with \fI+S=distance\fP and \fI+A=azimuth\fP must be specified.
.sp
If points along a geodesic are to be determined then either
\fI+n_S=integer\fP specifying the number of intermediate points
and/or \fI+del_S=distance\fP specifying the incremental distance
between points must be specified.
.sp
To determine points along an arc equidistant from the initial
point both \fI+del_A=angle\fP and \fI+n_A=integer\fP must be specified
which determine the respective angular increments and number of
points to be determined.
.SH EXAMPLES
.sp
The following script determines the geodesic azimuths and distance in U.S.
statute miles from Boston, MA, to Portland, OR:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
geod +ellps=clrk66 <<EOF \-I +units=us\-mi
42d15\(aqN 71d07\(aqW 45d31\(aqN 123d41\(aqW
EOF
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
which gives the results:
.RS 5
\f(CW-66d31'50.141" 75d39'13.083" 2587.504
.RE
where the first two values are the
azimuth from Boston to Portland, the back azimuth from Portland to
Boston followed by the distance.
.PP
An example of forward geodesic use is to use the Boston location and determine
Portland's location by azimuth and distance:
.RS 5
\f(CWgeod +ellps=clrk66 <<EOF +units=us-mi
42d15'N 71d07'W \-66d31'50.141" 2587.504
EOF\fR
.RE
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
\-66d31\(aq50.141" 75d39\(aq13.083" 2587.504
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
where the first two values are the azimuth from Boston to Portland,
the back azimuth from Portland to Boston followed by the distance.
.sp
An example of forward geodesic use is to use the Boston location
and determine Portland’s location by azimuth and distance:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
geod +ellps=clrk66 <<EOF +units=us\-mi
42d15\(aqN 71d07\(aqW \-66d31\(aq50.141" 2587.504
EOF
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
which gives:
.RS 5
\f(CW45d31'0.003"N 123d40'59.985"W 75d39'13.094"\fR
.RE
Note: lack of precision in the distance value compromises
the precision of the Portland location.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
45d31\(aq0.003"N 123d40\(aq59.985"W 75d39\(aq13.094"
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Lack of precision in the distance value compromises the
precision of the Portland location.
.UNINDENT
.UNINDENT
.SH FURTHER READING
.INDENT 0.0
.IP 1. 3
\fI\%GeographicLib\fP\&.
.IP 2. 3
C. F. F. Karney, \fI\%Algorithms for Geodesics\fP, J. Geodesy \fB87\fP(1), 43–55 (2013);
\fI\%addenda\fP\&.
.IP 3. 3
\fI\%A geodesic bibliography\fP\&.
.UNINDENT
.SH SEE ALSO
.B geodesic(3)
.PP
\fBGeographicLib\fR, https://geographiclib.sourceforge.io
.PP
The \fBGeodSolve\fR utility in GeographicLib. With the \fB-E\fR option,
this solves the geodesic problems in terms of elliptic integrals; the
results are accurate for arbitrary \fIf\fR.
.PP
C. F. F. Karney, \fIAlgorithms for Geodesics\fR,
.br
J. Geodesy \fB87\fR, 43-55 (2013);
.br
DOI: https://doi.org/10.1007/s00190-012-0578-z
.br
https://geographiclib.sourceforge.io/geod-addenda.html
.PP
The \fIonline geodesic bibliography\fR,
.br
https://geographiclib.sourceforge.io/geodesic-papers/biblio.html
.sp
\fBproj(1)\fP, \fBcs2cs(1)\fP, \fBcct(1)\fP, \fBgeod(1)\fP, \fBgie(1)\fP
.SH BUGS
A list of known bugs can found at https://github.com/OSGeo/proj.4/issues
where new bug reports can be submitted too.
.sp
A list of know bugs can be found at \fI\%http://github.com/OSGeo/proj.4/issues\fP
where new bug reports can be submitted to.
.SH HOME PAGE
http://proj4.org/
.sp
\fI\%http://proj4.org/\fP
.SH AUTHOR
Charles Karney
.SH COPYRIGHT
1983-2018
.\" Generated by docutils manpage writer.
.
+369 -106
View File
@@ -1,116 +1,379 @@
.\" release 5
.\"
.ad b
.hy 1
.TH GIE 1 "2018/02/25 Rel. 5.0.0"
.\" Man page generated from reStructuredText.
.
.TH "GIE" "1" "Apr 1, 2018" "5.0.1" "PROJ.4"
.SH NAME
gie \- The Geospatial Integrity Investigation Environment
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.B gie
[\-options]... infile...
.INDENT 0.0
.INDENT 3.5
\fBgie\fP [ \fB\-hovql\fP [ args ] ] file[s]
.UNINDENT
.UNINDENT
.SH DESCRIPTION
\fBgie\fR, the Geospatial Integrity Investigation Environment, is a modest
regression testing environment for the PROJ transformation library.
.PP
Its primary design goal was to be able to replace those thousands of
lines of regression testing code that are (at time of writing) part
of PROJ, while not requiring any other kind of tooling than the same
C compiler already employed for compiling the library.
.PP
The basic functionality of the gie command language is implemented
through just 3 command verbs:
.PP
operation, which defines the PROJ operation to test,
.br
accept, which defines the input coordinate to read, and
.br
expect, which defines the result to expect.
.PP
E.g:
.PP
.sp
\fBgie\fP, the Geospatial Integrity Investigation Environment, is a
regression testing environment for the PROJ transformation library. Its primary
design goal is to be able to perform regression testing of code that are a part
of PROJ, while not requiring any other kind of tooling than the same C compiler
already employed for compiling the library.
.INDENT 0.0
.TP
.B \-h, \-\-help
Print usage information
.UNINDENT
.INDENT 0.0
.TP
.B \-o <file>, \-\-output <file>
Specify output file name
.UNINDENT
.INDENT 0.0
.TP
.B \-v, \-\-verbose
Verbose: Provide non\-essential informational output. Repeat \fI\%\-v\fP for
more verbosity (e.g. \fB\-vv\fP)
.UNINDENT
.INDENT 0.0
.TP
.B \-q, \-\-quiet
Quiet: Opposite of verbose. In quiet mode not even errors are
reported. Only interaction is through the return code (0 on success,
non\-zero indicates number of FAILED tests)
.UNINDENT
.INDENT 0.0
.TP
.B \-l, \-\-list
List the PROJ internal system error codes
.UNINDENT
.sp
Tests for \fBgie\fP are defined in simple text files. Usually having the
extension \fB\&.gie\fP\&. Test for \fBgie\fP are written in the purpose\-build command language for gie.
The basic functionality of the gie command language is implemented through just
3 command verbs: \fBoperation\fP, which defines the PROJ operation to test,
\fBaccept\fP, which defines the input coordinate to read, and \fBexpect\fP, which
defines the result to expect.
.sp
A sample test file for \fBgie\fP that uses the three above basic commands looks
like:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
<gie>
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
Test output of the UTM projection
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
operation +proj=utm +zone=32 +ellps=GRS80
.br
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
accept 12 55
.br
expect 691_875.632_14 6_098_907.825_05
.PP
Note that gie accepts the underscore ("_") as a thousands separator.
It is not required (in fact, it is entirely ignored by the input
routine), but it significantly improves the readability of the very
long strings of numbers typically required in projected coordinates.
.PP
By default, gie considers the EXPECTation met, if the result comes to
within 0.5 mm of the expected. This default can be changed using the
"tolerance" command verb (and yes, I know, linguistically speaking, both
"operation" and "tolerance" are nouns, not verbs). See the first
few hundred lines of the "builtins.gie" test file for more details of
the command verbs available (verbs of both the VERBal and NOUNistic
persuation).
.PP
But more importantly than being an acronym for "Geospatial Integrity
Investigation Environment", gie were also the initials, user id, and
USGS email address of Gerald Ian Evenden (1935--2016), the geospatial
visionary, who, already in the 1980s, started what was to become the
PROJ of today.
.PP
Gerald's clear vision was that map projections are *just special
functions*. Some of them rather complex, most of them of two variables,
but all of them *just special functions*, and not particularly more
special than the sin(), cos(), tan(), and hypot() already available in
the C standard library.
.PP
And hence, according to Gerald, *they should not be particularly much
harder to use*, for a programmer, than the sin()s, tan()s and hypot()s
so readily available.
.PP
Gerald's ingenuity also showed in the implementation of the vision,
where he devised a comprehensive, yet simple, system of key-value
pairs for parameterising a map projection, and the highly flexible
PJ struct, storing run-time compiled versions of those key-value pairs,
hence making a map projection function call, pj_fwd(PJ, point), as easy
as a traditional function call like hypot(x,y).
.PP
While today, we may have more formally well defined metadata systems
(most prominent the OGC WKT2 representation), nothing comes close being
as easily readable ("human compatible") as Gerald's key-value system.
This system in particular, and the PROJ system in general, was
Gerald's great gift to anyone using and/or communicating about geodata.
.PP
It is only reasonable to name a program, keeping an eye on the integrity
of the PROJ system, in honour of Gerald.
.PP
So in honour, and hopefully also in the spirit, of Gerald Ian Evenden
(1935--2016), this is the Geospatial Integrity Investigation Environment.
.SH OPTIONS
.IP "\fB\fB\-h\fR\fR" 1c
Help: print usage information\&
.IP "\fB\fB\-o /path/to/file\fR\fR" 1c
Specify output file name\&
.IP "\fB\fB\-v\fR\fR" 1c
Verbose: Provide non-essential informational output.
Repeat \-v for more verbosity (e.g. \-vv)\&
.IP "\fB\fB\-q\fR\fR" 1c
Quiet: Opposite of verbose. In quiet mode not even errors
are reported. Only interaction is through the return code
(0 on success, non-zero indicates number of FAILED tests)\&
.IP "\fB\fB\-l\fR\fR" 1c
List the PROJ internal system error codes\&
.SH LONG OPTIONS
.IP "\fB\fB\-\-output\fR\fR" 1c
Alias for \-o\&
.IP "\fB\fB\-\-verbose\fR\fR" 1c
Alias for \-v\&
.IP "\fB\fB\-\-help\fR\fR" 1c
Alias for -h\&
.IP "\fB\fB\-\-list\fR\fR" 1c
Alias for \-l\&
</gie>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Parsing of a \fBgie\fP file starts at \fB<gie>\fP and ends when \fB</gie>\fP
is reached. Anything before \fB<gie>\fP and after \fB</gie>\fP is not considered.
Test cases are created by defining an \fI\%operation\fP which
\fI\%accept\fP an input coordinate and \fI\%expect\fP an output
coordinate.
.sp
Because \fBgie\fP tests are wrapped in the \fB<gie>\fP/\fB</gie>\fP tags it is
also possible to add test cases to custom made init files\&.
The tests will be ignore by PROJ when reading the init file with \fI+init\fP and
\fBgie\fP ignores anything not wrapped in \fB<gie>\fP/\fB</gie>\fP\&.
.sp
\fBgie\fP tests are defined by a set of commands like \fI\%operation\fP,
\fI\%accept\fP and \fI\%expect\fP in the example above. Together the
commands make out the \fBgie\fP command language. Any line in a
\fBgie\fP file that does not start with a command is ignored. In the
example above it is seen how this can be used to add comments and styling to
\fBgie\fP test files in order to make them more readable as well as
documenting what the purpose of the various tests are.
.sp
Below the \fI\%gie command language\fP is explained in details.
.SH EXAMPLES
1. Run all tests in file \"corner-cases.gie\", providing much extra information
.IP
gie \-vvvv corner-cases.gie
.PP
2. Run all tests in files \"foo\" and \"bar\", providing info on failures only
.IP
.INDENT 0.0
.IP 1. 3
Run all tests in a file with all debug information turned on
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gie \-vvvv corner\-cases.gie
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.IP 2. 3
Run all tests in several files
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gie foo bar
.ft P
.fi
.UNINDENT
.UNINDENT
.SH GIE COMMAND LANGUAGE
.INDENT 0.0
.TP
.B operation <+args>
Define a PROJ operation to test. Example:
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
operation proj=utm zone=32 ellps=GRS80
# test 4D function
accept 12 55 0 0
expect 691875.63214 6098907.82501 0 0
# test 2D function
accept 12 56
expect 687071.4391 6210141.3267
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B accept <x y [z [t]]>
Define the input coordinate to read. Takes test coordinate. The coordinate
can be defined by either 2, 3 or 4 values, where the first two values are
the x\- and y\-components, the 3rd is the z\-component and the 4th is the time
component. The number of components in the coordinate determines which
version of the operation is tested (2D, 3D or 4D). Many coordinates can be
accepted for one \fI\%operation\fP\&. For each \fI\%accept\fP an
accompanying \fI\%expect\fP is needed.
.sp
Note that \fBgie\fP accepts the underscore (“_”) as a thousands
separator. It is not required (in fact, it is entirely ignored by the
input routine), but it significantly improves the readability of the very
long strings of numbers typically required in projected coordinates.
.sp
See \fI\%operation\fP for an example.
.UNINDENT
.INDENT 0.0
.TP
.B expect <x y [z [t]]> | <error code>
Define the expected coordinate that will be returned from accepted
coordinate passed though an operation. The expected coordinate can be
defined by either 2, 3 or 4 components, similarly to \fI\%accept\fP\&.
Many coordinates can be expected for one \fI\%operation\fP\&. For each
\fI\%expect\fP an accompanying \fI\%accept\fP is needed.
.sp
See \fI\%operation\fP for an example.
.sp
In addition to expecting a coordinate it is also possible to expect a
PROJ error code in case an operation can’t be created. This is useful when
testing that errors are caught and handled correctly. Below is an example of
that tests that the pipeline operator fails correctly when a non\-invertable
pipeline is constructed.
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
operation proj=pipeline step
proj=urm5 n=0.5 inv
expect failure pjd_err_malformed_pipeline
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
See \fBgie \-l\fP for a list of error codes that can be expected.
.UNINDENT
.INDENT 0.0
.TP
.B tolerance <tolerance>
The \fI\%tolerance\fP command controls how much accepted coordinates
can deviate from the expected coordinate. This is handy to test that an
operation meets a certain numerical tolerance threshold. Some operations
are expexted to be accurate within milimeters where others might only be
accurate within a few meters. \fI\%tolerance\fP should
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
operation proj=merc
# test coordinate as returned by \(ga\(ga\(gaecho 12 55 | proj +proj=merc\(ga\(ga
tolerance 1 cm
accept 12 55
expect 1335833.89 7326837.72
# test that the same coordinate with a 50 m false easting as determined
# by \(ga\(gaecho 12 55 |proj +proj=merc +x_0=50\(ga\(ga is still within a 100 m
# tolerance of the unaltered coordinate from proj=merc
tolerance 100 m
accept 12 55
expect 1335883.89 7326837.72
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The default tolerance is 0.5 mm. See \fBproj \-lu\fP for a list of possible
units.
.UNINDENT
.INDENT 0.0
.TP
.B roundtrip <n> <tolerance>
Do a roundtrip test of an operation. \fI\%roundtrip\fP needs a
\fI\%operation\fP and a \fI\%accept\fP command
to function. The accepted coordinate is passed to the operation first in
it’s forward mode, then the output from the forward operation is passed
back to the inverse operation. This procedure is done \fBn\fP times. If the
resulting coordinate is within the set tolerance of the initial coordinate
the test is passed.
.sp
Example:
.sp
operation proj=merc
accept 12 55
roundtrip 10000 5 mm
.UNINDENT
.INDENT 0.0
.TP
.B direction <direction>
The \fI\%direction\fP command specifies in which direction an operation
is performed. This can either be \fBforward\fP or \fBinverse\fP\&. An example of
this is seen below where it is tested that a symmetrical transformation
pipeline returns the same results in both directions.
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
operation proj=pipeline zone=32 step
proj=utm ellps=GRS80 step
proj=utm ellps=GRS80 inv
tolerance 0.1 mm
accept 12 55 0 0
expect 12 55 0 0
# Now the inverse direction (still same result: the pipeline is symmetrical)
direction inverse
expect 12 55 0 0
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The default direction is “forward”.
.UNINDENT
.INDENT 0.0
.TP
.B ignore <error code>
This is especially
useful in test cases that rely on a grid that is not guaranteed to be
available. Below is an example of that situation.
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
operation proj=hgridshift +grids=nzgd2kgrid0005.gsb ellps=GRS80
tolerance 1 mm
ignore pjd_err_failed_to_load_grid
accept 172.999892181021551 \-45.001620431954613
expect 173 \-45
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
See \fBgie \-l\fP for a list of error codes that can be ignored.
.UNINDENT
.SH BACKGROUND
.sp
More importantly than being an acronym for “Geospatial Integrity Investigation
Environment”, gie were also the initials, user id, and USGS email address of
Gerald Ian Evenden (1935–2016), the geospatial visionary, who, already in the
1980s, started what was to become the PROJ of today.
.sp
Gerald’s clear vision was that map projections are \fIjust special functions\fP\&.
Some of them rather complex, most of them of two variables, but all of them
\fIjust special functions\fP, and not particularly more special than the \fBsin()\fP,
\fBcos()\fP, \fBtan()\fP, and \fBhypot()\fP already available in the C standard library.
.sp
And hence, according to Gerald, \fIthey should not be particularly much harder
to use\fP, for a programmer, than the \fBsin()\fP’s, \fBtan()\fP’s and
\fBhypot()\fP’s so readily available.
.sp
Gerald’s ingenuity also showed in the implementation of the vision, where
he devised a comprehensive, yet simple, system of key\-value pairs for
parameterising a map projection, and the highly flexible PJ struct, storing
run\-time compiled versions of those key\-value pairs, hence mak\- ing a map
projection function call, pj_fwd(PJ, point), as easy as a traditional function
call like \fBhypot(x,y)\fP\&.
.sp
While today, we may have more formally well defined metadata systems (most
prominent the OGC WKT2 representation), nothing comes close being as easily
readable (“human compatible”) as Gerald’s key\-value system. This system in
particular, and the PROJ system in general, was Gerald’s great gift to anyone
using and/or communicating about geodata.
.sp
It is only reasonable to name a program, keeping an eye on the
integrity of the PROJ system, in honour of Gerald.
.sp
So in honour, and hopefully also in the spirit, of Gerald Ian Evenden
(1935–2016), this is the Geospatial Integrity Investigation Environment.
.SH SEE ALSO
.sp
\fBproj(1)\fP, \fBcs2cs(1)\fP, \fBcct(1)\fP, \fBgeod(1)\fP
.SH BUGS
.sp
A list of know bugs can be found at \fI\%http://github.com/OSGeo/proj.4/issues\fP
where new bug reports can be submitted to.
.SH HOME PAGE
http://proj4.org/
.sp
\fI\%http://proj4.org/\fP
.SH AUTHOR
Thomas Knudsen
.SH COPYRIGHT
1983-2018
.\" Generated by docutils manpage writer.
.
+251 -277
View File
@@ -1,303 +1,277 @@
.\" release 5
.\"
.ad b
.hy 1
.TH PROJ 1 "2018/02/25 Rel. 5.0.0"
.\" Man page generated from reStructuredText.
.
.TH "PROJ" "1" "Apr 1, 2018" "5.0.1" "PROJ.4"
.SH NAME
proj \- forward cartographic projection filter
.br
invproj \- inverse cartographic projection filter
proj \- Cartographic projection filter
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.B proj
[
.B \-bcCeEfiIlmorsStTvVwW
[
.I args
] ] [
.B +args
]
file[s]
.br
.B invproj
[
.B \-bcCeEfiIlmorsStTwW
[
.I args
] ] [
.B +args
]
file[s]
.INDENT 0.0
.INDENT 3.5
\fBproj\fP [ \fB\-bceEfiIlmorsStTvVwW\fP ] [ args ] ] [ \fI+args\fP ] file[s]
.sp
\fBinvproj\fP [ \fB\-bceEfiIlmorsStTwW\fP ] [ args ] ] [ \fI+args\fP ] file[s]
.UNINDENT
.UNINDENT
.SH DESCRIPTION
.I Proj
and
.I invproj
perform respective forward and inverse transformation of cartographic data
to or from cartesian data with a wide range of selectable projection functions.
.PP
The following control parameters can appear in any order:
.sp
\fBproj\fP and \fBinvproj\fP perform respective forward and inverse
transformation of cartographic data to or from cartesian data with a wide
range of selectable projection functions.
.sp
\fBinvproj\fP may not be available on all platforms; in this case
use \fI\%proj \-I\fP instead.
.sp
The following control parameters can appear in any order
.INDENT 0.0
.TP
.BI \-b
Special option for binary coordinate data input and output
through standard input and standard output.
Data is assumed to be in system type
.I double
floating point words.
This option is to be used when
.B proj
is a
.I son
process and allows bypassing formatting operations.
.B \-b
Special option for binary coordinate data input and output through standard
input and standard output. Data is assumed to be in system type double
floating point words. This option is to be used when proj is a son process
and allows bypassing formatting operations.
.UNINDENT
.INDENT 0.0
.TP
.BI \-i
Selects binary input only (see
.B \-b option).
.TP
.BI \-I
alternate method to specify inverse projection.
Redundant when used with
.B invproj.
.TP
.BI \-o
Selects binary output only (see
.B \-b option).
.TP
.BI \-t "a"
.I A
specifies a character employed as the first character to denote
a control line to be passed through without processing.
This option applicable to ascii input only.
(# is the default value).
.TP
.BI \-e " string"
.I String
is an arbitrary string to be output if an error is detected during
data transformations.
The default value is: *\et*.
Note that if the
.B \-b,
.B \-i
or
Selects binary input only (see \fI\%\-b\fP).
.UNINDENT
.INDENT 0.0
.TP
.B \-I
alternate method to specify inverse projection. Redundant when used with
invproj.
.UNINDENT
.INDENT 0.0
.TP
.B \-o
options are employed, an error is returned as HUGE_VAL
value for both return values.
Selects binary output only (see \fI\%\-b\fP).
.UNINDENT
.INDENT 0.0
.TP
.BI \-E
causes the input coordinates to be copied to the output line
prior to printing the converted values.
.B \-t<a>
\fIa\fP specifies a character employed as the first character to denote a
control line to be passed through without processing. This option
applicable to ascii input only. (# is the default value).
.UNINDENT
.INDENT 0.0
.TP
.B \-e <string>
String is an arbitrary string to be output if an error is detected during
data transformations. The default value is: \fIt\fP\&. Note that if the
\fI\%\-b\fP, \fI\%\-i\fP or \fI\%\-o\fP options are employed, an error
is returned as HUGE_VAL value for both return values.
.UNINDENT
.INDENT 0.0
.TP
.B \-E
causes the input coordinates to be copied to the output line prior to
printing the converted values.
.UNINDENT
.INDENT 0.0
.TP
.B \-l<[=id]>
List projection identifiers that can be selected with \fI+proj\fP\&. \fBproj \-l=id\fP
gives expanded description of projection id, e.g. \fBproj \-l=merc\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.BI \-l "[p|P|=|e|u|d]" id
List projection identifiers with
.B \-l,
.B \-lp
or
.B \-lP (expanded)
that can be selected with
.B +proj.
.BI \-l= id
gives expanded description of projection
.I id.
List ellipsoid identifiers with
.B \-le,
that can be selected with
.B +ellps,
.B \-lu
list of cartesian to meter conversion factors
that can be selected with
.B +units
or
.B \-ld
list of datums that can be selected with
.B +datum.
List of all projection id that can be used with the \fI+proj\fP parameter.
Equivalent to \fBproj \-l\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.BI \-r
This options reverses the order of the
expected input from longitude-latitude or x-y to latitude-longitude or y-x.
.TP
.BI \-s
This options reverses the order of the
output from x-y or longitude-latitude to y-x or latitude-longitude.
.TP
.BI \-S
Causes estimation of
.I meridional
and
.I parallel
scale factors,
.I area
scale factor and
.I angular distortion,
and
.I maximum
and
.I minimum
scale factors to be listed between <> 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.
.TP
.BI \-m " mult"
The cartesian data may be scaled by the
.I mult
.B \-lP
Expanded description of all projections that can be used with the \fI+proj\fP
parameter.
When processing data in a forward projection mode the
cartesian output values are multiplied by
.I mult
otherwise the input cartesian values are divided by
.I mult
before inverse projection.
If the first two characters of
.I mult
are 1/ or 1: then the reciprocal value of
.I mult
is employed.
.UNINDENT
.INDENT 0.0
.TP
.BI \-f " format"
.I Format
is a
.I printf
format string to control the form of the output values.
For inverse projections, the output will be in degrees when this option
is employed.
The default format is "%.2f" for forward projection and DMS
for inverse.
.B \-le
List of all ellipsoids that can be selected with the \fI+ellps\fP parameters.
.UNINDENT
.INDENT 0.0
.TP
.BI \-[w|W] n
.I N
is the number of significant fractional digits to employ for
seconds output (when the option is not specified,
.B \-w3
is assumed).
When
.B \-W
is employed the fields will be constant width and with leading zeroes.
.B \-lu
List of all distance units that can be selected with the \fI+units\fP parameter.
.UNINDENT
.INDENT 0.0
.TP
.B \-ld
List of datums that can be selected with the \fI+datum\fP parameter.
.UNINDENT
.INDENT 0.0
.TP
.B \-r
This options reverses the order of the expected input from
longitude\-latitude or x\-y to latitude\-longitude or y\-x.
.UNINDENT
.INDENT 0.0
.TP
.B \-s
This options reverses the order of the output from x\-y or longitude\-latitude
to y\-x or latitude\-longitude.
.UNINDENT
.INDENT 0.0
.TP
.B \-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 meridional
and parallel scales factors will be equal and angular distortion zero. Equal
area projections will have an area factor of 1.
.UNINDENT
.INDENT 0.0
.TP
.B \-m <mult>
The cartesian data may be scaled by the mult parameter. When processing data
in a forward projection mode the cartesian output values are multiplied by
mult otherwise the input cartesian values are divided by mult before inverse
projection. If the first two characters of mult are 1/ or 1: then the
reciprocal value of mult is employed.
.UNINDENT
.INDENT 0.0
.TP
.B \-f <format>
Format is a printf format string to control the form of the output values.
For inverse projections, the output will be in degrees when this option is
employed. The default format is “%.2f” for forward projection and DMS for
inverse.
.UNINDENT
.INDENT 0.0
.TP
.B \-[w|W]<n>
N is the number of significant fractional digits to employ for seconds
output (when the option is not specified, \fB\-w3\fP is assumed). When \fB\-W\fP
is employed the fields will be constant width and with leading zeroes.
.UNINDENT
.INDENT 0.0
.TP
.B \-v
causes a listing of cartographic control parameters tested for and
used by the program to be printed prior to input data.
Should not be used with the
.B \-T
option.
causes a listing of cartographic control parameters tested for and used by
the program to be printed prior to input data. Should not be used with the
\fI\%\-T\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-V
This option causes an expanded annotated listing of the characteristics
of the projected point.
.B -v is implied with this option.
This option causes an expanded annotated listing of the characteristics of
the projected point. \fI\%\-v\fP is implied with this option.
.UNINDENT
.INDENT 0.0
.TP
.BI \-T " ulow,uhi,vlow,vhi,res[,umax,vmax]"
This option creates a set of bivariate Chebyshev polynomial
coefficients that approximate the selected cartographic projection on
.I stdout.
The values
.I low
and
.I hi
denote the range of the input where the
.I u
or
.I v
prefixes apply to respective longitude-x or latitude-y
depending upon whether a forward or inverse projection is selected.
.I Res
is an integer number specifying the power of 10 precision of the
approximation.
For example, a
.I res
of \-3 specifies an approximation with an accuracy better than .001.
.I Umax,
and
.I vmax
.B \-T <ulow,uhi,vlow,vhi,res[,umax,vmax]>
This option creates a set of bivariate Chebyshev polynomial coefficients
that approximate the selected cartographic projection on stdout. The values
low and hi denote the range of the input where the u or v prefixes apply to
respective longitude\-x or latitude\-y depending upon whether a forward or
inverse projection is selected. Res is an integer number specifying the
power of 10 precision of the approximation. For example, a res of \-3
specifies an approximation with an accuracy better than .001. Umax, and vmax
specify maximum degree of the polynomials (default: 15).
See also:
.B fproj(1).
.PP
The
.B +args
run-line arguments are associated with cartographic parameters
and usage varies with projection and for a complete description see
.I "Cartographic Projection Procedures for the UNIX Environment\(emA User's Manual"
and supplementary documentation for Release 4.
.PP
Additional projection control parameters may be contained in two
auxiliary control files:
the first is optionally referenced with the
.BI +init= file:id
and the second is always processed after the name
of the projection has been established from either the run-line
or the contents of
.B +init
file.
The environment parameter
.B PROJ_LIB
establishes the default directory for a file reference without
an absolute path. This is also used for supporting files like
datum shift files.
.PP
One or more
.I files
(processed in left to right 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
.I 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 trailing portions
of the input line are appended to the output line.
.PP
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 geographic coordinates will be in DMS
(if the
.B \-w
switch is not employed) and precise to 0.001"
with trailing, zero-valued minute-second fields deleted.
.UNINDENT
.sp
The \fI+args\fP run\-line arguments are associated with cartographic parameters.
Additional projection control parameters may be contained in two auxiliary
control files: the first is optionally referenced with the
\fI+init=file:id\fP and the second is always processed after the name of the
projection has been established from either the run\-line or the contents of
+init file. The environment parameter \fBPROJ_LIB\fP establishes the
default directory for a file reference without an absolute path. This is
also used for supporting files like datum shift files.
.sp
One or more files (processed in left to right order) specify the source of
data to be transformed. A \fB\-\fP 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 trailing
portions of the input line are appended to the output line.
.sp
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 geographic coordinates will be in DMS (if the
\fB\-w\fP switch is not employed) and precise to 0.001” with trailing, zero\-valued
minute\-second fields deleted.
.SH EXAMPLE
.sp
The following script
.RS 5
\f(CWproj +proj=utm +lon_0=112w +ellps=clrk66 \-r <<EOF
45d15'33.1" 111.5W
45d15.551666667N \-111d30
+45.25919444444 111d30'000w
EOF\fR
.RE
will perform UTM forward projection with a standard UTM
central meridian nearest longitude 112\(deW.
The geographic values of this example are equivalent and meant
as examples of various forms of DMS input.
The x\-y output data will appear as three lines of:
.RS 5
\f(CW460769.27 5011648.45
.RE
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
proj +proj=utm +lon_0=112w +ellps=clrk66
\-r <<EOF
45d15\(aq33.1" 111.5W
45d15.551666667N \-111d30
+45.25919444444 111d30\(aq000w
EOF
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
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 appear as three lines of:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
460769.27 5011648.45
.ft P
.fi
.UNINDENT
.UNINDENT
.SH OTHER PROGRAMS
.PP
The \fIproj\fR program is limited to converting between geographic and
projection coordinates within one datum.
.PP
The \fIcs2cs\fR program operates
similarly, but allows translation between any pair of definable coordinate
systems, including support for datum translation.
.PP
The \fIgeod\fR program provides the ability to compute geodesic (Great
Circle) computations.
.sp
The \fBproj\fP program is limited to converting between geographic and
projected coordinates within one datum.
.sp
The \fBcs2cs\fP program operates similarly, but allows translation
between any paor of definable coordinate reference systems, including
support for datum translation.
.SH SEE ALSO
.B cs2cs(1), geod(1), pj_init(3),
.br
.I "Cartographic Projection Procedures for the UNIX Environment\(emA User's Manual,"
(Evenden, 1990, Open-file report 90\-284).
.br
.I "Map Projections Used by the U. S. Geological Survey"
(Snyder, 1984,
USGS Bulletin 1532).
.br
.I "Map Projections\(emA Working Manual"
(Snyder, 1988, USGS Prof. Paper 1395).
.br
.I "An Album of Map Projections"
(Snyder & Voxland, 1989, USGS Prof. Paper 1453).
.sp
\fBcs2cs(1)\fP, \fBcct(1)\fP, \fBgeod(1)\fP, \fBgie(1)\fP
.SH BUGS
A list of known bugs can found at https://github.com/OSGeo/proj.4/issues
where new bug reports can be submitted too.
.sp
A list of know bugs can be found at \fI\%http://github.com/OSGeo/proj.4/issues\fP
where new bug reports can be submitted to.
.SH HOME PAGE
http://proj4.org/
.sp
\fI\%http://proj4.org/\fP
.SH AUTHOR
Gerald I. Evenden
.SH COPYRIGHT
1983-2018
.\" Generated by docutils manpage writer.
.
+1 -1
View File
@@ -1,6 +1,6 @@
.\" @(#)geodesic.3
.\"
.TH GEODESIC 3 "2018/02/15 Rel. 5.0.0"
.TH GEODESIC 3 "2018/02/15 Rel. 5.0.1"
.ad b
.hy 1
.SH NAME
+2 -2
View File
@@ -1,6 +1,6 @@
.\" @(#)pj_init.3 - 5.0.0
.\" @(#)pj_init.3 - 5.0.1
.\"
.TH PJ_INIT 3 "2018/02/15 Rel. 5.0.0"
.TH PJ_INIT 3 "2018/02/15 Rel. 5.0.1"
.ad b
.hy 1
.SH NAME
+5 -5
View File
@@ -1,16 +1,16 @@
+init=./IGNF:NTFG +to +init=./IGNF:RGF93G
3.300866856 43.4477976569 0.0000 3d18'0.915"E 43d26'52.077"N 0.000
+init=./IGNF:LAMBE +to +init=./IGNF:LAMB93
600000.0000 2600545.4523 0.0000 652760.737 7033791.244 0.000
600000.0000 2600545.4523 0.0000 652760.737 7033791.243 0.000
135638.3592 2418760.4094 0.0000 187194.062 6855928.882 0.000
998137.3947 2413822.2844 0.0000 1049052.258 6843776.562 0.000
600000.0000 2200000.0000 0.0000 649398.872 6633524.192 0.000
600000.0000 2200000.0000 0.0000 649398.872 6633524.191 0.000
311552.5340 1906457.4840 0.0000 358799.172 6342652.486 0.000
960488.4138 1910172.8812 0.0000 1007068.686 6340907.237 0.000
600000.0000 1699510.8340 0.0000 645204.279 6133556.746 0.000
1203792.5981 626873.17210 0.0000 1238875.764 5057405.017 0.000
1203792.5981 626873.17210 0.0000 1238875.764 5057405.016 0.000
+init=./IGNF:LAMBE +to +init=./IGNF:GEOPORTALFXX
600000.0000 2600545.4523 0.0000 179040.148 5610495.276 0.000
600000.0000 2600545.4523 0.0000 179040.148 5610495.275 0.000
135638.3592 2418760.4094 0.0000 -303729.363 5410118.356 0.000
998137.3947 2413822.2844 0.0000 592842.792 5410120.554 0.000
600000.0000 2200000.0000 0.0000 179041.670 5209746.080 0.000
@@ -37,4 +37,4 @@
2d20'11.7754730" 42d18'00.0824436" 0.0 260109.601 5009175.714 0.000
9d32'12.6680218" 41d24'00.3542556" 0.0 1061637.534 4889066.592 0.000
+init=./IGNF:RGR92 +to +init=./IGNF:REUN47
3356123.5400 1303218.3090 5247430.6050 3353421.833 1304074.314 5248935.606
3356123.5400 1303218.3090 5247430.6050 3353421.833 1304074.314 5248935.607
+4 -4
View File
@@ -1,5 +1,5 @@
%define PACKAGE_NAME proj
%define PACKAGE_VERSION 5.0.0
%define PACKAGE_VERSION 5.0.1
%define PACKAGE_URL http://proj4.org
%define _prefix /usr
@@ -7,7 +7,7 @@ Summary: Cartographic projection and geodetic transformation software
Name: %PACKAGE_NAME
Version: %PACKAGE_VERSION
Release: 1
Source0: proj-5.0.0.tar.gz
Source0: proj-5.0.1.tar.gz
License: MIT, Copyright (c) 2000, Frank Warmerdam
Group: Applications/GIS
Vendor: Intevation GmbH <http://intevation.net>
@@ -24,7 +24,7 @@ coordinates from one coordinate reference system (CRS) to another. This
includes cartographic projections as well as geodetic transformations.
%prep
%setup -D -n proj-5.0.0
%setup -D -n proj-5.0.1
%{_builddir}/%{name}-%{version}/autogen.sh
%configure
@@ -36,7 +36,7 @@ rm -rf $RPM_BUILD_ROOT
%makeinstall
%clean
rm -rf %{_builddir}/proj-5.0.0
rm -rf %{_builddir}/proj-5.0.1
rm -rf $RPM_BUILD_ROOT
%files
+1 -1
View File
@@ -40,7 +40,7 @@ geodtest_LDADD = libproj.la
lib_LTLIBRARIES = libproj.la
libproj_la_LDFLAGS = -no-undefined -version-info 13:0:0
libproj_la_LDFLAGS = -no-undefined -version-info 13:1:0
libproj_la_SOURCES = \
pj_list.h proj_internal.h\
+1 -1
View File
@@ -28,7 +28,7 @@
*****************************************************************************/
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include <errno.h>
#include "projects.h"
+1 -1
View File
@@ -27,7 +27,7 @@
#define PJ_LIB__
#include "geodesic.h"
#include <proj.h>
#include "proj.h"
#include <errno.h>
#include "projects.h"
+1 -1
View File
@@ -27,7 +27,7 @@
*****************************************************************************/
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include <errno.h>
#include "projects.h"
+1 -1
View File
@@ -29,7 +29,7 @@
*****************************************************************************/
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include <errno.h>
#include "projects.h"
+1 -1
View File
@@ -2,7 +2,7 @@
# define EPS 1e-10
#define PJ_LIB__
#include <errno.h>
#include <projects.h>
#include "projects.h"
struct pj_opaque {
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include <errno.h>
#include "projects.h"
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
# include <errno.h>
# include <projects.h>
# include "projects.h"
PROJ_HEAD(boggs, "Boggs Eumorphic") "\n\tPCyl., no inv., Sph.";
# define NITER 20
# define EPS 1e-7
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(bonne, "Bonne (Werner lat_1=90)")
+2 -2
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(calcofi,
@@ -8,7 +8,7 @@ PROJ_HEAD(calcofi,
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <proj_api.h>
#include "proj_api.h"
#include <errno.h>
/* Conversions for the California Cooperative Oceanic Fisheries Investigations
+12 -12
View File
@@ -131,39 +131,39 @@ static double geocentric_radius (double a, double b, double phi) {
/*********************************************************************/
static XYZ cartesian (LPZ geodetic, PJ *P) {
static XYZ cartesian (LPZ geod, PJ *P) {
/*********************************************************************/
double N, cosphi = cos(geodetic.phi);
double N, cosphi = cos(geod.phi);
XYZ xyz;
N = normal_radius_of_curvature(P->a, P->es, geodetic.phi);
N = normal_radius_of_curvature(P->a, P->es, geod.phi);
/* HM formula 5-27 (z formula follows WP) */
xyz.x = (N + geodetic.z) * cosphi * cos(geodetic.lam);
xyz.y = (N + geodetic.z) * cosphi * sin(geodetic.lam);
xyz.z = (N * (1 - P->es) + geodetic.z) * sin(geodetic.phi);
xyz.x = (N + geod.z) * cosphi * cos(geod.lam);
xyz.y = (N + geod.z) * cosphi * sin(geod.lam);
xyz.z = (N * (1 - P->es) + geod.z) * sin(geod.phi);
return xyz;
}
/*********************************************************************/
static LPZ geodetic (XYZ cartesian, PJ *P) {
static LPZ geodetic (XYZ cart, PJ *P) {
/*********************************************************************/
double N, p, theta, c, s;
LPZ lpz;
/* Perpendicular distance from point to Z-axis (HM eq. 5-28) */
p = hypot (cartesian.x, cartesian.y);
p = hypot (cart.x, cart.y);
/* HM eq. (5-37) */
theta = atan2 (cartesian.z * P->a, p * P->b);
theta = atan2 (cart.z * P->a, p * P->b);
/* HM eq. (5-36) (from BB, 1976) */
c = cos(theta);
s = sin(theta);
lpz.phi = atan2 (cartesian.z + P->e2s*P->b*s*s*s, p - P->es*P->a*c*c*c);
lpz.lam = atan2 (cartesian.y, cartesian.x);
lpz.phi = atan2 (cart.z + P->e2s*P->b*s*s*s, p - P->es*P->a*c*c*c);
lpz.lam = atan2 (cart.y, cart.x);
N = normal_radius_of_curvature (P->a, P->es, lpz.phi);
@@ -174,7 +174,7 @@ static LPZ geodetic (XYZ cartesian, PJ *P) {
/* minus the geocentric radius of the Earth at the given */
/* latitude */
double r = geocentric_radius (P->a, P->b, lpz.phi);
lpz.z = fabs (cartesian.z) - r;
lpz.z = fabs (cart.z) - r;
}
else
lpz.z = p / c - N;
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(cc, "Central Cylindrical") "\n\tCyl, Sph";
+1 -1
View File
@@ -22,7 +22,7 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
#define EPS10 1e-10
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
struct pj_opaque {
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
typedef struct { double r, Az; } VECT;
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(collg, "Collignon") "\n\tPCyl, Sph.";
+1 -1
View File
@@ -7,7 +7,7 @@ Port to PROJ.4 by Bojan Savric, 4 April 2016
*/
#define PJ_LIB__
#include <projects.h>
#include "projects.h"
PROJ_HEAD(comill, "Compact Miller") "\n\tCyl., Sph.";
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
# include <projects.h>
# include "projects.h"
PROJ_HEAD(crast, "Craster Parabolic (Putnins P4)") "\n\tPCyl., Sph.";
+1 -1
View File
@@ -53,7 +53,7 @@ grid-values in units of mm/year in ENU-space.
***********************************************************************/
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "proj_internal.h"
#include "projects.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <projects.h>
#include "projects.h"
PROJ_HEAD(denoy, "Denoyer Semi-Elliptical") "\n\tPCyl., no inv., Sph.";
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(eck2, "Eckert II") "\n\tPCyl. Sph.";
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <projects.h>
#include "projects.h"
PROJ_HEAD(eck4, "Eckert IV") "\n\tPCyl, Sph.";
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
struct pj_opaque {
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
struct pj_opaque {
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <projects.h>
#include "projects.h"
PROJ_HEAD(fahey, "Fahey") "\n\tPcyl, Sph.";
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(fouc_s, "Foucaut Sinusoidal") "\n\tPCyl., Sph.";
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <projects.h>
#include "projects.h"
PROJ_HEAD(gall, "Gall (Gall Stereographic)") "\n\tCyl, Sph";
+1 -1
View File
@@ -27,7 +27,7 @@
*****************************************************************************/
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include <errno.h>
#include "projects.h"
+1 -1
View File
@@ -29,7 +29,7 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
struct pj_opaque {
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(gn_sinu, "General Sinusoidal Series") "\n\tPCyl, Sph.\n\tm= n=";
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(gnom, "Gnomonic") "\n\tAzi, Sph.";
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(goode, "Goode Homolosine") "\n\tPCyl, Sph.";
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(hammer, "Hammer & Eckert-Greifendorff")
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(hatano, "Hatano Asymmetrical Equal Area") "\n\tPCyl, Sph.";
+6 -6
View File
@@ -31,7 +31,7 @@
# define PJ_LIB__
# include <errno.h>
# include "proj_internal.h"
# include <proj.h>
# include "proj.h"
# include "projects.h"
PROJ_HEAD(healpix, "HEALPix") "\n\tSph., Ellps.";
@@ -71,7 +71,7 @@ static const double rot[7][2][2] = ROT;
* @param v the parameter whose sign is returned.
* @return 1 for positive number, -1 for negative, and 0 for zero.
**/
static double pj_sign (double v) {
static double sign (double v) {
return v > 0 ? 1 : (v < 0 ? -1 : 0);
}
@@ -236,7 +236,7 @@ static double auth_lat(PJ *P, double alpha, int inverse) {
if (fabs(ratio) > 1) {
/* Rounding error. */
ratio = pj_sign(ratio);
ratio = sign(ratio);
}
return asin(ratio);
} else {
@@ -269,7 +269,7 @@ static XY healpix_sphere(LP lp) {
}
lamc = -3*M_FORTPI + M_HALFPI*cn;
xy.x = lamc + (lam - lamc)*sigma;
xy.y = pj_sign(phi)*M_FORTPI*(2 - sigma);
xy.y = sign(phi)*M_FORTPI*(2 - sigma);
}
return xy;
}
@@ -297,10 +297,10 @@ static LP healpix_sphere_inverse(XY xy) {
xc = -3*M_FORTPI + M_HALFPI*cn;
tau = 2.0 - 4*fabs(y)/M_PI;
lp.lam = xc + (x - xc)/tau;
lp.phi = pj_sign(y)*asin(1.0 - pow(tau, 2)/3.0);
lp.phi = sign(y)*asin(1.0 - pow(tau, 2)/3.0);
} else {
lp.lam = -M_PI;
lp.phi = pj_sign(y)*M_HALFPI;
lp.phi = sign(y)*M_HALFPI;
}
return (lp);
}
+4 -4
View File
@@ -436,7 +436,7 @@ static int parse_coefs (PJ *P, double *coefs, char *param, int ncoefs) {
/*********************************************************************/
PJ *PROJECTION(horner) {
/*********************************************************************/
int degree = 0, n, complex_horner = 0;
int degree = 0, n, complex_polynomia = 0;
HORNER *Q;
P->fwd4d = horner_forward_4d;
P->inv4d = horner_reverse_4d;
@@ -456,14 +456,14 @@ PJ *PROJECTION(horner) {
}
if (pj_param (P->ctx, P->params, "tfwd_c").i || pj_param (P->ctx, P->params, "tinv_c").i) /* complex polynomium? */
complex_horner = 1;
complex_polynomia = 1;
Q = horner_alloc (degree, complex_horner);
Q = horner_alloc (degree, complex_polynomia);
if (Q == 0)
return horner_freeup (P, ENOMEM);
P->opaque = (void *) Q;
if (complex_horner) {
if (complex_polynomia) {
/* Westings and/or southings? */
Q->uneg = pj_param_exists (P->params, "uneg") ? 1 : 0;
Q->vneg = pj_param_exists (P->params, "vneg") ? 1 : 0;
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(imw_p, "International Map of the World Polyconic")
+1 -1
View File
@@ -1027,7 +1027,7 @@ isea_forward(struct isea_dgg *g, struct isea_geo *in)
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(isea, "Icosahedral Snyder Equal Area") "\n\tSph";
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(laea, "Lambert Azimuthal Equal Area") "\n\tAzi, Sph&Ell";
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(lagrng, "Lagrange") "\n\tMisc Sph, no inv.\n\tW=";
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(lcc, "Lambert Conformal Conic")
+1 -1
View File
@@ -47,7 +47,7 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(lcca, "Lambert Conformal Conic Alternative")
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(loxim, "Loximuthal") "\n\tPCyl Sph";
+1 -1
View File
@@ -1,7 +1,7 @@
/* based upon Snyder and Linck, USGS-NMD */
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(lsat, "Space oblique for LANDSAT")
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(mbtfpp, "McBride-Thomas Flat-Polar Parabolic") "\n\tCyl., Sph.";
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(mbtfpq, "McBryde-Thomas Flat-Polar Quartic") "\n\tCyl., Sph.";
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(merc, "Mercator") "\n\tCyl, Sph&Ell\n\tlat_ts=";
+1 -1
View File
@@ -22,7 +22,7 @@
/* based upon Snyder and Linck, USGS-NMD */
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(misrsom, "Space oblique for MISR")
+1 -1
View File
@@ -44,7 +44,7 @@
***********************************************************************/
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "proj_internal.h"
#include "projects.h"
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
enum Mode {
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
#include <string.h>
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <projects.h>
#include "projects.h"
PROJ_HEAD(ocea, "Oblique Cylindrical Equal Area") "\n\tCyl, Sph"
"lonc= alpha= or\n\tlat_1= lat_2= lon_1= lon_2=";
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(oea, "Oblated Equal Area") "\n\tMisc Sph\n\tn= m= theta=";
+1 -1
View File
@@ -23,7 +23,7 @@
*/
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(omerc, "Oblique Mercator")
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(ortho, "Orthographic") "\n\tAzi, Sph.";
+1 -1
View File
@@ -39,7 +39,7 @@
*/
#define PJ_LIB__
#include <projects.h>
#include "projects.h"
PROJ_HEAD(patterson, "Patterson Cylindrical") "\n\tCyl.";
+2 -2
View File
@@ -95,8 +95,8 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-20
********************************************************************************/
#define PJ_LIB__
#include <geodesic.h>
#include <proj.h>
#include "geodesic.h"
#include "proj.h"
#include "proj_internal.h"
#include "projects.h"
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(poly, "Polyconic (American)")
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <projects.h>
#include "projects.h"
struct pj_opaque {
double A;
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <projects.h>
#include "projects.h"
struct pj_opaque {
double C_x, C_y, A, B, D;
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(robin, "Robinson") "\n\tPCyl., Sph.";
+1 -1
View File
@@ -32,7 +32,7 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
#include "geocent.h"
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(somerc, "Swiss. Obl. Mercator") "\n\tCyl, Ell\n\tFor CH1903";
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(stere, "Stereographic") "\n\tAzi, Sph&Ell\n\tlat_ts=";
+1 -1
View File
@@ -25,7 +25,7 @@
*/
#define PJ_LIB__
#include <errno.h>
#include <projects.h>
#include "projects.h"
struct pj_opaque {
+1 -1
View File
@@ -1,5 +1,5 @@
#define PJ_LIB__
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(tcc, "Transverse Central Cylindrical") "\n\tCyl, Sph, no inv.";
+1 -1
View File
@@ -30,7 +30,7 @@
*****************************************************************************/
#define PJ_LIB__
#include <projects.h>
#include "projects.h"
PROJ_HEAD(times, "Times") "\n\tCyl, Sph";
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(tmerc, "Transverse Mercator") "\n\tCyl, Sph&Ell";
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
+1 -1
View File
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
#include <proj.h>
#include "proj.h"
#include "projects.h"
PROJ_HEAD(urm5, "Urmaev V") "\n\tPCyl., Sph., no inv.\n\tn= q= alpha=";

Some files were not shown because too many files have changed in this diff Show More