From 23415f832cc74b56958f90900d8b55b356678a88 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sun, 8 Apr 2018 17:26:55 +0200 Subject: Override style of Sphinx versionmodified directives so they stand out more clearly in the text --- docs/source/_static/theme_overrides.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'docs/source') diff --git a/docs/source/_static/theme_overrides.css b/docs/source/_static/theme_overrides.css index b82d2881..4e612939 100644 --- a/docs/source/_static/theme_overrides.css +++ b/docs/source/_static/theme_overrides.css @@ -55,3 +55,16 @@ div.math { overflow-x: auto; overflow-y: hidden; } + +/* Override style of versionmodified directives */ +.versionadded { + font-style: italic; +} + +.versionchanged { + font-style: italic; +} + +.deprecated { + font-style: italic; +} -- cgit v1.2.3 From c2d5216b02705f5b1432d91aa1e6bef7f23d0ce6 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 9 Apr 2018 02:02:26 +0200 Subject: Fix bad example in eqc docs --- docs/source/operations/projections/eqc.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'docs/source') diff --git a/docs/source/operations/projections/eqc.rst b/docs/source/operations/projections/eqc.rst index be431977..5833bd61 100644 --- a/docs/source/operations/projections/eqc.rst +++ b/docs/source/operations/projections/eqc.rst @@ -64,9 +64,8 @@ Example using EPSG 32662 (WGS84 Plate Carrée):: Example using Plate Carrée projection with true scale at latitude 30° and central meridian 90°W:: - $ echo -88 30 | proj +proj=eqc +lat_ts=30 +lat_0=90w - -8483684.61 13358338.90 - + $ echo -88 30 | proj +proj=eqc +lat_ts=30 +lon_0=90w + 192811.01 3339584.72 Mathematical definition ####################### -- cgit v1.2.3 From a4f4228d055aac7bb66f77b10fe5128e69e9e09a Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 7 Apr 2018 13:41:12 +0200 Subject: Add webmerc projection --- docs/source/operations/projections/index.rst | 1 + docs/source/operations/projections/webmerc.rst | 78 ++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 docs/source/operations/projections/webmerc.rst (limited to 'docs/source') diff --git a/docs/source/operations/projections/index.rst b/docs/source/operations/projections/index.rst index 9255d9fd..77decd6c 100644 --- a/docs/source/operations/projections/index.rst +++ b/docs/source/operations/projections/index.rst @@ -141,6 +141,7 @@ Projections map the spherical 3D space to a flat 2D space. wag5 wag6 wag7 + webmerc weren wink1 wink2 diff --git a/docs/source/operations/projections/webmerc.rst b/docs/source/operations/projections/webmerc.rst new file mode 100644 index 00000000..0c465afc --- /dev/null +++ b/docs/source/operations/projections/webmerc.rst @@ -0,0 +1,78 @@ +.. _webmerc: + +******************************************************************************** +Web Mercator / Pseudo Mercator +******************************************************************************** + +The Web Mercator / Pseudo Mercator projection is a cylindrical map projection. +This is a variant of the regular :ref:`merc` projection, except that the computation +is done on a sphere, using the semi-major axis of the ellipsoid. + +From `Wikipedia `_: + + This projection is widely used by the Web Mercator, Google Web Mercator, + Spherical Mercator, WGS 84 Web Mercator[1] or WGS 84/Pseudo-Mercator is a + variant of the Mercator projection and is the de facto standard for Web + mapping applications. [...] + It is used by virtually all major online map providers [...] + Its official EPSG identifier is EPSG:3857, although others have been used + historically. + + ++---------------------+----------------------------------------------------------+ +| **Classification** | Cylindrical (non conformant if used with ellipsoid) | ++---------------------+----------------------------------------------------------+ +| **Version** | Added in proj 5.1.0 | ++---------------------+----------------------------------------------------------+ +| **Available forms** | Forward and inverse, spherical projection | ++---------------------+----------------------------------------------------------+ +| **Defined area** | Global, but best used near the equator | ++---------------------+----------------------------------------------------------+ +| **Options** | Neither lat_0, lon_0, lat_ts or k_0 should be used. | ++---------------------+----------------------------------------------------------+ + +Usage +######## + +Example:: + + $ echo 2 49 | proj +proj=webmerc +datum=WGS84 + 222638.98 6274861.39 + +Mathematical definition +####################### + +The formulas describing the Mercator projection are all taken from G. Evenden's libproj manuals [Evenden2005]_. + +Forward projection +================== + +.. math:: + + x = \lambda + +.. math:: + + y = \ln \left[ \tan \left(\frac{\pi}{4} + \frac{\phi}{2} \right) \right] + + +Inverse projection +================== + +.. math:: + + \lambda = {x} + +.. math:: + + \phi = \frac{\pi}{2} - 2 \arctan \left[ e^{-y} \right] + + + +Further reading +############### + +#. `Wikipedia `_ + + + -- cgit v1.2.3 From 4731bc4a3438b04574545a78ac52ba631e0504c4 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 9 Apr 2018 22:27:59 +0200 Subject: Add description of projection and +lat_b parameter --- docs/source/operations/projections/airy.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'docs/source') diff --git a/docs/source/operations/projections/airy.rst b/docs/source/operations/projections/airy.rst index d2730592..eefda4e9 100644 --- a/docs/source/operations/projections/airy.rst +++ b/docs/source/operations/projections/airy.rst @@ -3,6 +3,11 @@ ******************************************************************************** Airy ******************************************************************************** + +The Airy projection is an azimuthal minimum error projection for the region +within the small or great circle defined by an angular distance, +:math:`\phi_b`, from the tangency point of the plane :math:`( \lambda_0, \phi_0 )`. + +---------------------+----------------------------------------------------------+ | **Classification** | | +---------------------+----------------------------------------------------------+ @@ -14,7 +19,10 @@ Airy +---------------------+----------------------------------------------------------+ | **Options** | +---------------------+----------------------------------------------------------+ -| `+lat_b` | | +| `+lat_b` | Angular distance from tangency point of the plane | +| | :math:`( \lambda_0, \phi_0 )` where the error is kept at | +| | minimum. Defaults to :math:`90^{\circ}` which is | +| | suitable for hemispherical maps. | +---------------------+----------------------------------------------------------+ | `+no_cut` | Do not cut at hemisphere limit | +---------------------+----------------------------------------------------------+ -- cgit v1.2.3 From 75764c42c96aec7d3181b2b23ac4c2400ee8a427 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 11 Apr 2018 23:11:23 +0200 Subject: Update docs for nsper --- docs/source/operations/projections/nsper.rst | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'docs/source') diff --git a/docs/source/operations/projections/nsper.rst b/docs/source/operations/projections/nsper.rst index 4a8651fc..3f46f2b4 100644 --- a/docs/source/operations/projections/nsper.rst +++ b/docs/source/operations/projections/nsper.rst @@ -4,7 +4,28 @@ Near-sided perspective ******************************************************************************** +The near-sided perspective projection simulates a view from a height +:math:`h` similar to how a satellite in orbit would see it. + ++---------------------+-------------------------------------------------------------+ +| **Classification** | Azimuthal. Neither conformal nor equal area. | ++---------------------+-------------------------------------------------------------+ +| **Available forms** | Forward and inverse spherical projection | ++---------------------+-------------------------------------------------------------+ +| **Defined area** | Global, although for one hemisphere at a time. | ++---------------------+-------------------------------------------------------------+ +| **Options** | ++---------------------+-------------------------------------------------------------+ +| `+h` | Height of the view point above the Earth and must be in | +| | the same units as the radius of the sphere. Required. | ++---------------------+-------------------------------------------------------------| +| `+lat_0` | Latitude (in degrees) of the view position. Defaults to 0. | ++---------------------+-------------------------------------------------------------+ +| `+lon_0` | Longitude (in degrees) of the view position. Defaults to 0. | ++---------------------+-------------------------------------------------------------+ + + .. image:: ./images/nsper.png :scale: 50% - :alt: Near-sided perspective + :alt: Near-sided perspective -- cgit v1.2.3 From f9d81882c473310e5a1785bdbee06d8658998051 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 3 Apr 2018 17:45:23 +0200 Subject: Add --skip-lines option to cct With this it is possible to skip the header when transforming coordinates from a file. --- docs/source/apps/cct.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/source') diff --git a/docs/source/apps/cct.rst b/docs/source/apps/cct.rst index dc2944f2..20aec06c 100644 --- a/docs/source/apps/cct.rst +++ b/docs/source/apps/cct.rst @@ -44,6 +44,13 @@ The following control parameters can appear in any order: Specify a fixed observation height to be used for all input data. +.. option:: s , --skip-lines= + + .. versionadded:: 5.1.0 + + Skip the first *n* lines of input. This applies to any kind of input, wether + it comes from ``STDIN``, a file or interactive user input. + .. option:: -v, --verbose Write non-essential, but potentially useful, information to stderr. -- cgit v1.2.3 From 2f082b70cbdafdea49bb123e027406089e7ad65b Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 5 Apr 2018 19:25:31 +0000 Subject: Move logging functions to proj.h API --- docs/source/development/reference/datatypes.rst | 50 +++++++++++++++++++++++++ docs/source/development/reference/functions.rst | 28 ++++++++++++++ 2 files changed, 78 insertions(+) (limited to 'docs/source') diff --git a/docs/source/development/reference/datatypes.rst b/docs/source/development/reference/datatypes.rst index 8966923a..2a335a15 100644 --- a/docs/source/development/reference/datatypes.rst +++ b/docs/source/development/reference/datatypes.rst @@ -744,3 +744,53 @@ Info structures .. c:member:: char PJ_INIT_INFO.lastupdate Date of last update of the init-file. + + +Logging +------------------------------------------------------------------------------- + +.. c:type:: PJ_LOG_LEVEL + + Enum of logging levels in PROJ. Used to set the logging level in PROJ. + Usually using :c:func:`proj_log_level`. + + .. c:member:: PJ_LOG_NONE + + Don't log anything. + + .. c:member:: PJ_LOG_ERROR + + Log only errors. + + .. c:member:: PJ_LOG_DEBUG + + Log errors and additional debug information. + + .. c:member:: PJ_LOG_TRACE + + Highest logging level. Log everything including very detailed debug + information. + + .. c:member:: PJ_LOG_TELL + + Special logging level that when used in :c:func:`proj_log_level` + will return the current logging level set in PROJ. + + .. versionadded:: 5.1.0 + +.. c:type:: PJ_LOG_FUNC + + Function prototype for the logging function used by PROJ. + Defined as + + .. code-block:: C + + typedef void (*PJ_LOG_FUNCTION)(void *, int, const char *); + + where the :c:type:`void` pointer references a data structure used by the + calling application, the :c:type:`int` is used to set the logging level + and the :c:type:`const char` pointer is the string that will be logged + by the function. + + + .. versionadded:: 5.1.0 diff --git a/docs/source/development/reference/functions.rst b/docs/source/development/reference/functions.rst index 3d141ae2..52f801e5 100644 --- a/docs/source/development/reference/functions.rst +++ b/docs/source/development/reference/functions.rst @@ -276,6 +276,34 @@ Change the error-state of :c:data:`P` to `err`. .. note:: Available from version 5.1.0. + +Logging +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. c:function:: PJ_LOG_LEVEL proj_log_level (PJ_CONTEXT *ctx, PJ_LOG_LEVEL level) + + Get and set logging level for a given context. Changes the log level to + :c:data:`level` and returns the previous logging level. If called with + :c:data:`level` set to :c:type:`PJ_LOG_TELL` the function returns the current + logging level without changing it. + + :param PJ_CONTEXT* ctx: Threading context. + :param PJ_LOG_LEVEL level: New logging level. + + :returns: :c:type:`PJ_LOG_LEVEL` + + .. versionadded:: 5.1.0 + +.. c:function:: void proj_log_func (PJ_CONTEXT *ctx, void *app_data, PJ_LOG_FUNCTION logf) + + Override the internal log function of PROJ. + + :param PJ_CONTEXT* ctx: Threading context. + :param void* app_data: Pointer to data structure used by the calling application. + :param PJ_LOG_FUNCTION logf: Log function that overrides the PROJ log function. + + .. versionadded:: 5.1.0 + Info functions ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- cgit v1.2.3