Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Airocean projection (formerly Dymaxion) #4303

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e6787b0
- Add dymaxion projection
plouvart Sep 8, 2024
bd72f6b
- Fix inadequate normals on split polygons.
plouvart Sep 12, 2024
ef2f17d
- Fix numerical issue due to improper center position
plouvart Sep 22, 2024
dc922de
- Remove dead code and comments
plouvart Oct 30, 2024
44ef3a9
- Add dymaxion projection entry to he documentation
plouvart Oct 30, 2024
2c3beb8
- Add test to the dymaxion projection
plouvart Oct 30, 2024
f0d194a
Merge branch 'OSGeo:master' into dymaxion
plouvart Nov 1, 2024
f7ab809
- Improve wording on dymaxion doc page. Add a note on dymaxion extent…
plouvart Nov 1, 2024
61a5cdf
- Drop the name dymaxion in favor of airocean. Adjust the doc accordi…
plouvart Nov 1, 2024
b757564
- Document constants. Rename variables to remove references to dymaxi…
plouvart Nov 1, 2024
2839e88
- Remove reference to Dymaxion Fuller. Fix typo.
plouvart Nov 1, 2024
7ade90e
Merge branch 'OSGeo:master' into airocean
plouvart Nov 1, 2024
b0b4e2f
Update src/projections/airocean.cpp
rouault Nov 1, 2024
cfc8cde
- Fix spelling errors. Add legitimate words to spelling wordlist.
plouvart Nov 1, 2024
d52587c
Merge branch 'airocean' of https://github.com/plouvart/PROJ into airo…
plouvart Nov 1, 2024
03220f5
Update src/projections/airocean.cpp
rouault Nov 1, 2024
93d8ccc
Update docs/source/operations/projections/airocean.rst
rouault Nov 2, 2024
dea2417
- Add a test point that triggers an out of bounds error
plouvart Nov 5, 2024
6f5866c
Merge branch 'airocean' of https://github.com/plouvart/PROJ into airo…
plouvart Nov 5, 2024
55aa072
- Add support for chosing between vertical and horizontal orientation.
plouvart Nov 10, 2024
8d00367
- Set matrix multiplication function to be static
plouvart Nov 10, 2024
4b5e714
- Add missing airocean space face transform when selection +orient=ho…
plouvart Nov 10, 2024
3f2f7c1
- Add tests for +orient=horizontal
plouvart Nov 10, 2024
9516118
Update docs/source/operations/projections/airocean.rst
plouvart Nov 10, 2024
d76c738
Update docs/source/references.bib
plouvart Nov 10, 2024
75885d6
- Correct typo in Builtins test. except becomes expect
plouvart Nov 10, 2024
f39ee02
Merge branch 'airocean' of https://github.com/plouvart/PROJ into airo…
plouvart Nov 10, 2024
18f9d9e
- Document +orient option
plouvart Nov 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/plot/plotdefs.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,18 @@
"res": "low",
"type": "poly"
},
{
"filename": "airocean.png",
"latmax": 90,
"latmin": -90,
"lonmax": 180,
"lonmin": -180,
"name": "airocean",
"projstring": "+proj=airocean",
"res": "low",
"type": "line",
"delta_cut": 1e6
},
{
"filename": "eck1.png",
"latmax": 90,
Expand Down
65 changes: 65 additions & 0 deletions docs/source/operations/projections/airocean.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
.. _airocean:

********************************************************************************
Airocean
********************************************************************************

.. versionadded:: 9.6.0

The Airocean map projection is a icosahedron polyhedral projection that intends
rouault marked this conversation as resolved.
Show resolved Hide resolved
to lay down continental landmasses into a contiguous map with minimal scale and angular
distortion while preserving land surfaces from (most) interruptions.
In comparison to the Snyder's Icosahedral Equal Area, this projection relies on a specific way
to orient and cut the icosahedron so that most interruptions lie within the ocean. The projection
was first invented by Buckminster Fuller in 1943 using a cuboctahedron as basis.
The idea to use an icosahedron came later in 1954, and it wasn't until 1978 that the projection
was formally mathematically defined :cite:`Gray1995`.

+---------------------+----------------------------------------------------------+
| **Classification** | Polyhedral, equal area |
+---------------------+----------------------------------------------------------+
| **Available forms** | Forward and inverse, spherical and ellipsoidal |
+---------------------+----------------------------------------------------------+
| **Defined area** | Global |
+---------------------+----------------------------------------------------------+
| **Alias** | airocean |
+---------------------+----------------------------------------------------------+
| **Domain** | 2D |
+---------------------+----------------------------------------------------------+
| **Input type** | Geodetic coordinates |
+---------------------+----------------------------------------------------------+
| **Output type** | Projected coordinates |
+---------------------+----------------------------------------------------------+


.. figure:: ./images/airocean.png
:width: 500 px
:align: center
:alt: Airocean

proj-string: ``+proj=airocean``

.. note::
The airocean map of the whole globe has an extent of approximately
:math:`[0, 0, 17404000, 36844000]` in meters. Although the airocean map has no
true up or down, the choice was made to lay it out vertically, from Antarctica to Australia.
plouvart marked this conversation as resolved.
Show resolved Hide resolved


Parameters
################################################################################

.. note:: All parameters are optional for the projection.

.. option:: +orient=<string>

Can be set to either ``vertical`` or ``horizontal``.

*Defaults to vertical*

.. include:: ../options/lon_0.rst

.. include:: ../options/R.rst

.. include:: ../options/x_0.rst

.. include:: ../options/y_0.rst
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/source/operations/projections/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Projections map the spherical 3D space to a flat 2D space.
adams_ws2
aea
aeqd
airocean
airy
aitoff
alsk
Expand Down
12 changes: 12 additions & 0 deletions docs/source/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ @TechReport{Deakin2004
Url = {http://www.mygeodesy.id.au/documents/Molodensky%20V2.pdf}
}

@Article{Gray1995,
Title = {Exact Transformation Equations for {Fuller's World Map}},
Author = {Robert W. Gray},
Journal = {Cartographica},
Year = {1995},
Number = {3},
Pages = {17--25},
Volume = {32},

Doi = {10.3138/1677-3273-Q862-1885}
}

@Article{EberHewitt1979,
Title = {Conversion algorithms for the {CalCOFI} station grid},
Author = {L. E. Eber and Roger P. Hewitt},
Expand Down
4 changes: 4 additions & 0 deletions docs/source/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ adams
advertized
aea
aeqd
airocean
Airocean
affine
Affine
Agri
Expand Down Expand Up @@ -105,6 +107,7 @@ Boucher
boundcrs
boundCRS
Bregler
Buckminster
brussels
cadastral
cadastre
Expand Down Expand Up @@ -210,6 +213,7 @@ ctable
CTable
CTest
ctx
cuboctahedron
cURL
customizability
customizations
Expand Down
1 change: 1 addition & 0 deletions src/lib_proj.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ print_variable(ENABLE_IPO)
##############################################

set(SRC_LIBPROJ_PROJECTIONS
projections/airocean.cpp
projections/aeqd.cpp
projections/adams.cpp
projections/gnom.cpp
Expand Down
1 change: 1 addition & 0 deletions src/pj_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ PROJ_HEAD(crast, "Craster Parabolic (Putnins P4)")
PROJ_HEAD(defmodel, "Deformation model")
PROJ_HEAD(deformation, "Kinematic grid shift")
PROJ_HEAD(denoy, "Denoyer Semi-Elliptical")
PROJ_HEAD(airocean, "Airocean Fuller")
PROJ_HEAD(eck1, "Eckert I")
PROJ_HEAD(eck2, "Eckert II")
PROJ_HEAD(eck3, "Eckert III")
Expand Down
345 changes: 345 additions & 0 deletions src/projections/airocean.cpp

Large diffs are not rendered by default.

209 changes: 209 additions & 0 deletions test/gie/builtins.gie
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,215 @@ accept -2 -1
expect -223377.422876954 -111701.072127637


===============================================================================
# Airocean
# Sph., Ellps.
# (Each of the 23 faces tested separately around their center, inverse included)
===============================================================================

-------------------------------------------------------------------------------
operation +proj=airocean +ellps=GRS80
-------------------------------------------------------------------------------
tolerance 0.1 mm
accept 23 28
expect 13556926.823490718 23467359.674033195
accept 72 46
expect 9643052.686797861 23470487.369125906
accept 145 75
expect 7737390.782312192 20104788.054769896
accept -77 61
expect 9668545.797051517 16783947.67041814
accept -26 35
expect 15441270.037205558 20068684.009483118
accept 29 -13
expect 15454500.775444025 26772291.248060163
accept 72 -25
expect 9646854.070149897 30174627.37899145
accept 96 10
expect 7748510.227719365 26793197.86531571
accept 169 35
expect 3879364.926075886 20112884.602338977
accept -151 13
expect 3855457.9788894877 13372404.237126907
accept -108 25
expect 7757309.887436695 13427462.802436445
accept -84 -10
expect 9655653.729867224 10046033.288760712
accept -42 -5
expect 13531956.757129436 10009950.782333512
accept -11 -35
expect 13524799.031510707 3365720.025783973
accept 154 -35
expect 1943420.8175922546 30184052.521318957
accept -157 -28
expect 1942090.2539895012 10076591.20216224
accept -108 -46
expect 7761111.270788729 6723322.792570909
accept -35 -75
expect 9666773.175274398 3357623.4782149
accept 98 -48
expect 4871988.820643149 32910398.56714167
accept 113 -72
expect 7725850.483813245 1088496.8256700835
accept 143 -9
expect 3215425.0474725077 27916795.439275663
accept 124 7
expect 5140625.112062726 26778848.513305675
accept 147 15
expect 2546085.5873131985 22379298.380909223

direction inverse
accept 13500000 23400000
expect 23.028334260781396 29.00141845366607
accept 9700000 23400000
expect 70.91748976033631 46.69938767448572
accept 7700000 20100000
expect 145.97790022956485 74.66181692499651
accept 9700000 16700000
expect -76.80102747900565 59.99374652248361
accept 15500000 20100000
expect -25.944389921688217 34.24636404674132
accept 15500000 26800000
expect 28.780505935021033 -13.567140588707066
accept 9700000 30100000
expect 71.4679674085186 -24.079311453738754
accept 7700000 26800000
expect 96.5497950965985 9.88121445991218
accept 3900000 20100000
expect 169.13009208849755 35.254403049754224
accept 3900000 13400000
expect -150.64046965868116 13.481494624013168
accept 7700000 13400000
expect -108.66196431422468 24.604190039126202
accept 9700000 10000000
expect -83.45176986114532 -10.484774451578211
accept 13500000 10000000
expect -42.33857403889376 -5.173528026525927
accept 13500000 3300000
expect -10.156579309260813 -35.39429168339308
accept 1900000 30100000
expect 154.6981118584859 -34.09548216619245
accept 1900000 10000000
expect -157.1486568493204 -28.983938091775162
accept 7700000 6700000
expect -109.0368655953666 -46.16466623109972
accept 9700000 3300000
expect -32.11127170743792 -74.98612150074251
accept 4800000 32900000
expect 98.90848938837188 -48.50784207235999
accept 7700000 1100000
expect 114.00231130949376 -71.99425265168686
accept 3200000 27900000
expect 143.20066829467564 -8.847739058325072
accept 5200000 26800000
expect 123.33794956763194 6.861286881197438
accept 2600000 22300000
expect 147.63769509437498 15.818879769693432
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plouvart could you add a test point that triggers the out-of-projection-domain error ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I'll do that in a few minutes

accept 0 0
expect failure

-------------------------------------------------------------------------------
operation +proj=airocean +orient=horizontal +ellps=GRS80
-------------------------------------------------------------------------------
tolerance 0.1 mm
accept 23 29
expect 13445038.138395257 13501788.272168122
accept 71 47
expect 13469321.22856612 9691162.310202885
accept 146 75
expect 16758940.408539249 7725947.54927852
accept -77 60
expect 20145508.681780424 9691320.12928607
accept -26 34
expect 16738437.29206201 15521444.12245347
accept 29 -14
expect 10002182.5715067 15508486.660989888
accept 71 -24
expect 6745544.686885769 9738408.304902693
accept 97 10
expect 10057167.426204873 7661719.142318802
accept 169 35
expect 16730877.466082027 3879364.926075886
accept -151 13
expect 23471357.831294097 3855457.9788894877
accept -109 25
expect 23405563.0692953 7677848.871802735
accept -83 -10
expect 26804332.00275987 9742444.815267786
accept -42 -5
expect 26833811.28608749 13531956.757129436
accept -10 -35
expect 33549702.824863963 13536077.88916722
accept 155 -34
expect 6754064.240713957 1878658.9644939895
accept -157 -29
expect 26849240.124435734 1910219.231732698
accept -109 -46
expect 30129033.055957943 7700118.744271104
accept -32 -75
expect 33546604.455268644 9700086.856617931
accept 99 -49
expect 3917784.3424766464 4762210.008135711
accept 114 -72
expect 35743305.80505435 7700279.4959819885
accept 143 -9
expect 8926966.62914534 3215425.0474725077
accept 123 7
expect 10051797.28039541 5233302.981464034
accept 148 16
expect 14580207.201673953 2606103.035139274

direction inverse
accept 13400000 13500000
expect 23.38101068889326 28.613417194415643
accept 13500000 9700000
expect 70.7802085458946 47.32843064371629
accept 16800000 7700000
expect 148.10287981014486 74.96215466929766
accept 20100000 9700000
expect -76.54133367948258 60.47011202998829
accept 16700000 15500000
expect -25.402102068835045 34.038552037244074
accept 10000000 15500000
expect 29.093669699644725 -13.960206072298153
accept 6700000 9700000
expect 71.39502686260073 -24.572248553401327
accept 10100000 7700000
expect 96.5989815165186 10.519796023191507
accept 16700000 3900000
expect 168.5332718079372 35.173954828735
accept 23500000 3900000
expect -150.39605816066683 12.8877109123015
accept 23400000 7700000
expect -108.73571568748467 25.097014645260366
accept 26800000 9700000
expect -83.48998116482932 -9.98785063836723
accept 26800000 13500000
expect -42.42285754320226 -4.68222695695373
accept 33500000 13500000
expect -10.755116011311662 -35.31735130903507
accept 6800000 1900000
expect 154.76504012111806 -33.459989505310055
accept 26800000 1900000
expect -157.35174676612695 -28.520246787409704
accept 30100000 7700000
expect -108.93360340357648 -45.67479874983113
accept 33500000 9700000
expect -33.77121014744891 -74.7525617691622
accept 3900000 4800000
expect 98.35846530162404 -48.821443120344455
accept 35700000 7700000
expect 114.65803383575242 -72.41879106994266
accept 8900000 3200000
expect 143.1150335988881 -9.311213341657826
accept 10100000 5200000
expect 123.42786172727975 7.474238270475286
accept 14600000 2600000
expect 148.23146560737166 16.00099471760901
accept 0 0
expect failure


===============================================================================
# Eckert I
# PCyl., Sph.
Expand Down