diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2020-04-13 22:45:14 +0200 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2020-04-15 09:10:01 +0200 |
| commit | e4bf822158aa5193022e8392f0eddd6510653bfa (patch) | |
| tree | f72ef7d24befc2f45087dc9eeb9e491d303da715 /docs | |
| parent | 21ebdfb89bc4b222c4fb78815971b19192a2a09e (diff) | |
| download | PROJ-e4bf822158aa5193022e8392f0eddd6510653bfa.tar.gz PROJ-e4bf822158aa5193022e8392f0eddd6510653bfa.zip | |
Add square conformal projections from libproject
This commit adds five new projections to PROJ:
adams_hemi: Adams Hemisphere in a Square
adams_wsI: Adams World in a Square I
adams_wsII: Adams World in a Square II
guyou: Guyou
peirce_q: Pierce Quincuncial
The code originates from Gerry Evendens libproject and has been adapted
to work with modern PROJ. To ensure that the modified code works as
intended extensive test data has been created using libproject and
sproj so that no errors occured when porting from libproject to PROJ.
The test data is wrapped in a gie files. All test cases reproduce
results from libproject at the mm level.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/plot/plot.py | 6 | ||||
| -rw-r--r-- | docs/plot/plotdefs.json | 58 | ||||
| -rw-r--r-- | docs/source/operations/projections/adams_hemi.rst | 42 | ||||
| -rw-r--r-- | docs/source/operations/projections/adams_ws1.rst | 42 | ||||
| -rw-r--r-- | docs/source/operations/projections/adams_ws2.rst | 42 | ||||
| -rw-r--r-- | docs/source/operations/projections/guyou.rst | 42 | ||||
| -rw-r--r-- | docs/source/operations/projections/images/adams_hemi.png | bin | 0 -> 326319 bytes | |||
| -rw-r--r-- | docs/source/operations/projections/images/adams_ws1.png | bin | 0 -> 546212 bytes | |||
| -rw-r--r-- | docs/source/operations/projections/images/adams_ws2.png | bin | 0 -> 457151 bytes | |||
| -rw-r--r-- | docs/source/operations/projections/images/guyou.png | bin | 0 -> 391949 bytes | |||
| -rw-r--r-- | docs/source/operations/projections/images/peirce_q.png | bin | 0 -> 385052 bytes | |||
| -rw-r--r-- | docs/source/operations/projections/index.rst | 5 | ||||
| -rw-r--r-- | docs/source/operations/projections/peirce_q.rst | 42 |
13 files changed, 278 insertions, 1 deletions
diff --git a/docs/plot/plot.py b/docs/plot/plot.py index a4f330f6..ec263fe4 100644 --- a/docs/plot/plot.py +++ b/docs/plot/plot.py @@ -248,7 +248,11 @@ def plotproj(plotdef, data, outdir): (plotdef['lonmax'], plotdef['latmax']), (plotdef['lonmax'], plotdef['latmin']), ]) - temp_pol = temp_pol.intersection(box) + try: + temp_pol = temp_pol.intersection(box) + except Exception as e: + continue + if plotdef['type'] == 'poly': if isinstance(temp_pol, MultiPolygon): diff --git a/docs/plot/plotdefs.json b/docs/plot/plotdefs.json index bb0ebbe7..9a2f4836 100644 --- a/docs/plot/plotdefs.json +++ b/docs/plot/plotdefs.json @@ -1,5 +1,41 @@ [ { + "filename": "adams_hemi.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "adams_hemi", + "projstring": "+proj=adams_hemi", + "res": "low", + "type": "poly" + + }, + { + "filename": "adams_ws1.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "adams_ws1", + "projstring": "+proj=adams_ws1", + "res": "low", + "type": "poly" + + }, + { + "filename": "adams_ws2.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "adams_ws2", + "projstring": "+proj=adams_ws2", + "res": "low", + "type": "poly" + + }, + { "filename": "aea.png", "latmax": 90, "latmin": -90, @@ -475,6 +511,17 @@ "type": "poly" }, { + "filename": "guyou.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "guyou", + "projstring": "+proj=guyou", + "res": "low", + "type": "poly" + }, + { "filename": "hammer.png", "latmax": 90, "latmin": -90, @@ -993,6 +1040,17 @@ "type": "poly" }, { + "filename": "peirce_q.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "peirce_q", + "projstring": "+proj=peirce_q", + "res": "low", + "type": "poly" + }, + { "filename": "poly.png", "latmax": 90, "latmin": -90, diff --git a/docs/source/operations/projections/adams_hemi.rst b/docs/source/operations/projections/adams_hemi.rst new file mode 100644 index 00000000..96fe78f1 --- /dev/null +++ b/docs/source/operations/projections/adams_hemi.rst @@ -0,0 +1,42 @@ +.. _adams_hemi: + +******************************************************************************** +Adams Hemisphere in a Square +******************************************************************************** + ++---------------------+----------------------------------------------------------+ +| **Classification** | Miscellaneous | ++---------------------+----------------------------------------------------------+ +| **Available forms** | Forward spherical projection | ++---------------------+----------------------------------------------------------+ +| **Defined area** | Global | ++---------------------+----------------------------------------------------------+ +| **Alias** | adams_hemi | ++---------------------+----------------------------------------------------------+ +| **Domain** | 2D | ++---------------------+----------------------------------------------------------+ +| **Input type** | Geodetic coordinates | ++---------------------+----------------------------------------------------------+ +| **Output type** | Projected coordinates | ++---------------------+----------------------------------------------------------+ + + +.. figure:: ./images/adams_hemi.png + :width: 500 px + :align: center + :alt: Adams Hemisphere in a Square + + proj-string: ``+proj=adams_hemi`` + +Parameters +################################################################################ + +.. note:: All parameters are optional. + +.. include:: ../options/lon_0.rst + +.. include:: ../options/R.rst + +.. include:: ../options/x_0.rst + +.. include:: ../options/y_0.rst diff --git a/docs/source/operations/projections/adams_ws1.rst b/docs/source/operations/projections/adams_ws1.rst new file mode 100644 index 00000000..3283ff57 --- /dev/null +++ b/docs/source/operations/projections/adams_ws1.rst @@ -0,0 +1,42 @@ +.. _adams_ws1: + +******************************************************************************** +Adams World in a Square I +******************************************************************************** + ++---------------------+----------------------------------------------------------+ +| **Classification** | Miscellaneous | ++---------------------+----------------------------------------------------------+ +| **Available forms** | Forward spherical projection | ++---------------------+----------------------------------------------------------+ +| **Defined area** | Global | ++---------------------+----------------------------------------------------------+ +| **Alias** | adams_ws1 | ++---------------------+----------------------------------------------------------+ +| **Domain** | 2D | ++---------------------+----------------------------------------------------------+ +| **Input type** | Geodetic coordinates | ++---------------------+----------------------------------------------------------+ +| **Output type** | Projected coordinates | ++---------------------+----------------------------------------------------------+ + + +.. figure:: ./images/adams_ws1.png + :width: 500 px + :align: center + :alt: Adams World in a Square I + + proj-string: ``+proj=adams_ws1`` + +Parameters +################################################################################ + +.. note:: All parameters are optional. + +.. include:: ../options/lon_0.rst + +.. include:: ../options/R.rst + +.. include:: ../options/x_0.rst + +.. include:: ../options/y_0.rst diff --git a/docs/source/operations/projections/adams_ws2.rst b/docs/source/operations/projections/adams_ws2.rst new file mode 100644 index 00000000..2ba6ee88 --- /dev/null +++ b/docs/source/operations/projections/adams_ws2.rst @@ -0,0 +1,42 @@ +.. _adams_ws2: + +******************************************************************************** +Adams World in a Square II +******************************************************************************** + ++---------------------+----------------------------------------------------------+ +| **Classification** | Miscellaneous | ++---------------------+----------------------------------------------------------+ +| **Available forms** | Forward spherical projection | ++---------------------+----------------------------------------------------------+ +| **Defined area** | Global | ++---------------------+----------------------------------------------------------+ +| **Alias** | adams_ws2 | ++---------------------+----------------------------------------------------------+ +| **Domain** | 2D | ++---------------------+----------------------------------------------------------+ +| **Input type** | Geodetic coordinates | ++---------------------+----------------------------------------------------------+ +| **Output type** | Projected coordinates | ++---------------------+----------------------------------------------------------+ + + +.. figure:: ./images/adams_ws2.png + :width: 500 px + :align: center + :alt: Adams World in a Square II + + proj-string: ``+proj=adams_ws2`` + +Parameters +################################################################################ + +.. note:: All parameters are optional. + +.. include:: ../options/lon_0.rst + +.. include:: ../options/R.rst + +.. include:: ../options/x_0.rst + +.. include:: ../options/y_0.rst diff --git a/docs/source/operations/projections/guyou.rst b/docs/source/operations/projections/guyou.rst new file mode 100644 index 00000000..89d455be --- /dev/null +++ b/docs/source/operations/projections/guyou.rst @@ -0,0 +1,42 @@ +.. _guyou: + +******************************************************************************** +Guyou +******************************************************************************** + ++---------------------+----------------------------------------------------------+ +| **Classification** | Miscellaneous | ++---------------------+----------------------------------------------------------+ +| **Available forms** | Forward spherical projection | ++---------------------+----------------------------------------------------------+ +| **Defined area** | Global | ++---------------------+----------------------------------------------------------+ +| **Alias** | guyou | ++---------------------+----------------------------------------------------------+ +| **Domain** | 2D | ++---------------------+----------------------------------------------------------+ +| **Input type** | Geodetic coordinates | ++---------------------+----------------------------------------------------------+ +| **Output type** | Projected coordinates | ++---------------------+----------------------------------------------------------+ + + +.. figure:: ./images/guyou.png + :width: 500 px + :align: center + :alt: Guyou + + proj-string: ``+proj=guyou`` + +Parameters +################################################################################ + +.. note:: All parameters are optional. + +.. include:: ../options/lon_0.rst + +.. include:: ../options/R.rst + +.. include:: ../options/x_0.rst + +.. include:: ../options/y_0.rst diff --git a/docs/source/operations/projections/images/adams_hemi.png b/docs/source/operations/projections/images/adams_hemi.png Binary files differnew file mode 100644 index 00000000..7bfce0e5 --- /dev/null +++ b/docs/source/operations/projections/images/adams_hemi.png diff --git a/docs/source/operations/projections/images/adams_ws1.png b/docs/source/operations/projections/images/adams_ws1.png Binary files differnew file mode 100644 index 00000000..5ec2917b --- /dev/null +++ b/docs/source/operations/projections/images/adams_ws1.png diff --git a/docs/source/operations/projections/images/adams_ws2.png b/docs/source/operations/projections/images/adams_ws2.png Binary files differnew file mode 100644 index 00000000..b133c084 --- /dev/null +++ b/docs/source/operations/projections/images/adams_ws2.png diff --git a/docs/source/operations/projections/images/guyou.png b/docs/source/operations/projections/images/guyou.png Binary files differnew file mode 100644 index 00000000..08cb3df4 --- /dev/null +++ b/docs/source/operations/projections/images/guyou.png diff --git a/docs/source/operations/projections/images/peirce_q.png b/docs/source/operations/projections/images/peirce_q.png Binary files differnew file mode 100644 index 00000000..9e5fe446 --- /dev/null +++ b/docs/source/operations/projections/images/peirce_q.png diff --git a/docs/source/operations/projections/index.rst b/docs/source/operations/projections/index.rst index c5b249c9..fc2ef9fd 100644 --- a/docs/source/operations/projections/index.rst +++ b/docs/source/operations/projections/index.rst @@ -12,6 +12,9 @@ Projections map the spherical 3D space to a flat 2D space. .. toctree:: :maxdepth: 1 + adams_hemi + adams_ws1 + adams_ws2 aea aeqd airy @@ -55,6 +58,7 @@ Projections map the spherical 3D space to a flat 2D space. goode gs48 gs50 + guyou hammer hatano healpix @@ -104,6 +108,7 @@ Projections map the spherical 3D space to a flat 2D space. ortho patterson pconic + peirce_q poly putp1 putp2 diff --git a/docs/source/operations/projections/peirce_q.rst b/docs/source/operations/projections/peirce_q.rst new file mode 100644 index 00000000..86445ea1 --- /dev/null +++ b/docs/source/operations/projections/peirce_q.rst @@ -0,0 +1,42 @@ +.. _peirce_q: + +******************************************************************************** +Peirce Quincuncial +******************************************************************************** + ++---------------------+----------------------------------------------------------+ +| **Classification** | Miscellaneous | ++---------------------+----------------------------------------------------------+ +| **Available forms** | Forward spherical projection | ++---------------------+----------------------------------------------------------+ +| **Defined area** | Global | ++---------------------+----------------------------------------------------------+ +| **Alias** | peirce_q | ++---------------------+----------------------------------------------------------+ +| **Domain** | 2D | ++---------------------+----------------------------------------------------------+ +| **Input type** | Geodetic coordinates | ++---------------------+----------------------------------------------------------+ +| **Output type** | Projected coordinates | ++---------------------+----------------------------------------------------------+ + + +.. figure:: ./images/peirce_q.png + :width: 500 px + :align: center + :alt: Peirce Quincuncial + + proj-string: ``+proj=peirce_q`` + +Parameters +################################################################################ + +.. note:: All parameters are optional. + +.. include:: ../options/lon_0.rst + +.. include:: ../options/R.rst + +.. include:: ../options/x_0.rst + +.. include:: ../options/y_0.rst |
