-
Notifications
You must be signed in to change notification settings - Fork 887
Feature: Snyder Polyhedral Equal Area projections #4758
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
Open
felixpalmer
wants to merge
62
commits into
OSGeo:master
Choose a base branch
from
felixpalmer:felix/polyhedral
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
4c7a57f
Feature: Snyder Polyhedral Equal Area projections
felixpalmer f382bfd
Documentation
felixpalmer 402608b
Remove authalic.h, replacing with pj_authalic_xxx
felixpalmer f461d3e
Don't redefine PI
felixpalmer 85a00f5
Remove render scripts
felixpalmer 26d7234
Linting
felixpalmer 7d09495
spelling
felixpalmer 1d851a5
clang-format
felixpalmer 7d9658e
try with meta operator
felixpalmer b2b8885
reduce planar triangles storage via meta
felixpalmer 58a3a1b
tidy
felixpalmer e7671e6
consistency
felixpalmer 0199fd3
Tidy net
felixpalmer 714e125
Tidy
felixpalmer ecb8f24
Run linter
felixpalmer 19165c1
Tidy up conway code
felixpalmer b6a1fff
Tidy
felixpalmer 05ebb58
format
felixpalmer 73997b8
Add proj options. Implement DSEA, ISEA & net unfolding
felixpalmer 4dcb330
Code review
felixpalmer ad34fb7
Tidy
felixpalmer 61ee123
ISEA back-compatibilty
felixpalmer 69dadc8
Tidy
felixpalmer 7cc1cee
orient option for ISEA
felixpalmer 0309c49
Authalic conversion of orient_lat
felixpalmer 4a2942e
General rigid_transform
felixpalmer 66f5a7d
General rigid transform
felixpalmer cf2ecdf
face_centroid
felixpalmer 75081d9
Tidy vec names
felixpalmer 0f26588
Improve nets
felixpalmer f0ddf00
Improve nets
felixpalmer 5073f55
Rotate nets
felixpalmer 76dcbe8
Rearrange dodecahedron faces
felixpalmer 2c18a51
Rearrange tetrahedron
felixpalmer 98128f2
Snyder compatible tetrahedron
felixpalmer 08d5e37
test update
felixpalmer 6fe2b0e
Automatically reorient z axis
felixpalmer 41ee13b
Switch to 1-indexing
felixpalmer 15eacb0
Recenter tsea
felixpalmer 06f22e3
Update comments for 1-indexing
felixpalmer 28400ce
Utility for dumping nets
felixpalmer c452348
Review polyhedral.rst
felixpalmer 7d66076
options
felixpalmer 67e20ea
rename old isea to isea_legacy
felixpalmer 00af60c
Doc pages for all projections
felixpalmer 6e3234c
Figure numbers
felixpalmer 5d9c9f2
clockwise
felixpalmer b770575
Fix CI failures: subproject include, RST nesting, spelling
felixpalmer 6d86c2d
Remove legacy isea
felixpalmer 48610ce
Update docs/source/operations/projections/polyhedral.rst
felixpalmer 934037d
Update docs/source/operations/projections/dsea.rst
felixpalmer 7ceb0a1
Update docs/source/operations/projections/tsea.rst
felixpalmer 53041f5
Braces
felixpalmer 074aa14
Regenerate figures using plotdefs & update docs
felixpalmer bfb82bb
Remove print_polyhedral_layout
felixpalmer c5141d2
Remove extra brace
felixpalmer 54faf21
Add sanity check for net unfolding
felixpalmer f5d7da8
Move polyhedral
felixpalmer ef23b7b
Update generate_all_images.py
felixpalmer faa4bcd
Wordlist
felixpalmer bea50ba
Move shared vec3 & sphere code to src
felixpalmer a1541df
Use safer aatan2
felixpalmer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| .. option:: +azi=<value> | ||
|
|
||
| Azimuth from the polyhedron's first vertex to its second, in degrees | ||
| clockwise. Together with ``+orient_lat`` and ``+orient_lon`` this fully | ||
| constrains the 3D pose of the polyhedron on the sphere. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| .. option:: +lat_0=<value> | ||
|
|
||
| Geodetic latitude of the geographic point that should land at the | ||
| projected origin ``(0, 0)``. Used together with ``+lon_0``; the pair | ||
| translates the projected output without rotating the polyhedron. | ||
| ``+x_0`` / ``+y_0`` are applied on top of this translation. | ||
|
|
||
| When unset, the projected origin falls on the unfold's root face | ||
| instead (its centroid in general, or its bounding-box centre for | ||
| ``+proj=isea``) rather than at a fixed lat / lon. | ||
|
|
||
| .. note:: | ||
| The default convention is to interpret this value as decimal degrees. To | ||
| specify radians instead, follow the value with the "r" character. | ||
|
|
||
| Example: `+lat_0=1.570796r` | ||
|
|
||
| See :ref:`Projection Units <projection_units>` for more information. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| .. option:: +lon_0=<value> | ||
|
|
||
| Geodetic longitude of the geographic point that should land at the | ||
| projected origin ``(0, 0)``. Used together with ``+lat_0``; the pair | ||
| translates the projected output without rotating the polyhedron. | ||
| ``+x_0`` / ``+y_0`` are applied on top of this translation. | ||
|
|
||
| When unset, the projected origin falls on the unfold's root face | ||
| instead (its centroid in general, or its bounding-box centre for | ||
| ``+proj=isea``) rather than at a fixed lat / lon. | ||
|
|
||
| .. note:: | ||
| The default convention is to interpret this value as decimal degrees. To | ||
| specify radians instead, follow the value with the "r" character. | ||
|
|
||
| Example: `+lon_0=1.570796r` | ||
|
|
||
| See :ref:`Projection Units <projection_units>` for more information. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| .. option:: +orient_lat=<value> | ||
|
|
||
| Geodetic latitude of the polyhedron's first vertex, in degrees. Together | ||
| with ``+orient_lon`` and ``+azi`` this fully constrains the 3D pose of | ||
| the polyhedron on the sphere. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| .. option:: +orient_lon=<value> | ||
|
|
||
| Longitude of the polyhedron's first vertex, in degrees. Together with | ||
| ``+orient_lat`` and ``+azi`` this fully constrains the 3D pose of the | ||
| polyhedron on the sphere. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| .. _dsea: | ||
|
|
||
| ******************************************************************************** | ||
| Dodecahedral Snyder Equal Area | ||
| ******************************************************************************** | ||
|
|
||
| .. versionadded:: 9.9 | ||
|
|
||
| Snyder's equal-area mapping :cite:`Snyder1992` applied to the twelve pentagonal | ||
| faces of a regular dodecahedron and unfolded into a planar net. | ||
|
|
||
| The dodecahedron is subdivided into 12 × 10 = 120 right sub-triangles, | ||
| and each sub-triangle is mapped independently using the area-preserving | ||
| Snyder construction. | ||
|
|
||
| See :ref:`polyhedral` for the shared theory. | ||
|
|
||
| +---------------------+----------------------------------------------------------+ | ||
| | **Classification** | Polyhedral, equal area | | ||
| +---------------------+----------------------------------------------------------+ | ||
| | **Available forms** | Forward and inverse, spherical and ellipsoidal | | ||
| +---------------------+----------------------------------------------------------+ | ||
| | **Defined area** | Global | | ||
| +---------------------+----------------------------------------------------------+ | ||
| | **Alias** | dsea | | ||
| +---------------------+----------------------------------------------------------+ | ||
| | **Domain** | 2D | | ||
| +---------------------+----------------------------------------------------------+ | ||
| | **Input type** | Geodetic coordinates | | ||
| +---------------------+----------------------------------------------------------+ | ||
| | **Output type** | Projected coordinates | | ||
| +---------------------+----------------------------------------------------------+ | ||
|
|
||
|
|
||
| .. figure:: ./images/dsea.png | ||
| :width: 500 px | ||
| :align: center | ||
| :alt: Dodecahedral Snyder Equal Area | ||
|
|
||
| proj-string: ``+proj=dsea`` | ||
|
|
||
|
|
||
| Nets | ||
| ################################################################################ | ||
|
|
||
| The default net (shown above) follows Snyder's Figure 11. Three alternative | ||
| nets are available via ``+net=``: | ||
|
|
||
| a5 | ||
| -------------------------------------------------------------------------------- | ||
|
|
||
| Layout used by the `A5 index <https://a5geo.org>`_. The first 8 faces contain | ||
| the majority of the populated land mass. | ||
|
|
||
| .. figure:: ./images/dsea_a5.png | ||
| :width: 500 px | ||
| :align: center | ||
| :alt: DSEA A5 net | ||
|
|
||
| proj-string: ``+proj=dsea +net=a5`` | ||
|
|
||
| crescent | ||
| -------------------------------------------------------------------------------- | ||
|
|
||
| .. figure:: ./images/dsea_crescent.png | ||
| :width: 500 px | ||
| :align: center | ||
| :alt: DSEA crescent net | ||
|
|
||
| proj-string: ``+proj=dsea +net=crescent`` | ||
|
|
||
| flower | ||
| -------------------------------------------------------------------------------- | ||
|
|
||
| .. figure:: ./images/dsea_flower.png | ||
| :width: 500 px | ||
| :align: center | ||
| :alt: DSEA flower net | ||
|
|
||
| proj-string: ``+proj=dsea +net=flower`` | ||
|
|
||
|
|
||
| Parameters | ||
| ################################################################################ | ||
|
|
||
| .. note:: | ||
| All parameters are optional. | ||
|
|
||
| .. option:: +net=<name> | ||
|
|
||
| Selects the planar unfolding. Accepted values: ``dsea``, ``a5``, | ||
| ``crescent``, ``flower``. | ||
|
|
||
| *Defaults to* ``dsea``. | ||
|
|
||
| .. include:: ../options/orient_lat.rst | ||
|
|
||
| *Defaults to* ``atan((1 + 2·cos(36°))/2) ≈ 52.6226°``. | ||
|
|
||
| .. include:: ../options/orient_lon.rst | ||
|
|
||
| *Defaults to −36.0 (or −129.0 when* ``+net=a5`` *).* | ||
|
|
||
| .. include:: ../options/azi.rst | ||
|
|
||
| *Defaults to 240.0.* | ||
|
|
||
| .. include:: ../options/lat_0_polyhedral.rst | ||
|
|
||
| .. include:: ../options/lon_0_polyhedral.rst | ||
|
|
||
| .. include:: ../options/x_0.rst | ||
|
|
||
| .. include:: ../options/y_0.rst | ||
|
|
||
| .. include:: ../options/ellps.rst | ||
|
|
||
| .. include:: ../options/R.rst | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.