aboutsummaryrefslogtreecommitdiff
path: root/docs/plot
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2020-04-13 22:45:14 +0200
committerKristian Evers <kristianevers@gmail.com>2020-04-15 09:10:01 +0200
commite4bf822158aa5193022e8392f0eddd6510653bfa (patch)
treef72ef7d24befc2f45087dc9eeb9e491d303da715 /docs/plot
parent21ebdfb89bc4b222c4fb78815971b19192a2a09e (diff)
downloadPROJ-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/plot')
-rw-r--r--docs/plot/plot.py6
-rw-r--r--docs/plot/plotdefs.json58
2 files changed, 63 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,