Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src/pj_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ PROJ_HEAD(imw_p, "International Map of the World Polyconic")
PROJ_HEAD(dsea, "Dodecahedral Snyder Equal Area")
PROJ_HEAD(isea, "Icosahedral Snyder Equal Area")
PROJ_HEAD(isea2, "Icosahedral Snyder Equal Area (generalized)")
PROJ_HEAD(ivea, "Icosahedral Vertex Equal Area")
PROJ_HEAD(kav5, "Kavrayskiy V")
PROJ_HEAD(kav7, "Kavrayskiy VII")
PROJ_HEAD(krovak, "Krovak")
Expand Down
15 changes: 15 additions & 0 deletions src/projections/polyhedral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,21 @@ PJ *PJ_PROJECTION(isea2) { // TODO rename to `isea`?
return P;
}

PROJ_HEAD(ivea, "Icosahedral Vertex Equal Area") "\n\tSph";
constexpr double IVEA_AZ_DEG = 36.0;
PJ *PJ_PROJECTION(ivea) {
auto *Q = static_cast<pj_polyhedral_data *>(calloc(1, sizeof(pj_polyhedral_data)));
if (nullptr == Q) return pj_default_destructor(P, PROJ_ERR_OTHER /*ENOMEM*/);
P->opaque = Q;

polyhedral::load_triangles(Q, decakis_dodecahedron::SPH_TRI, nets::dsea::icosahedron::FACE_TRI);
polyhedral::set_orient_from_angles(Q, ISEA_STD_LAT_DEG, ISEA_STD_LON_DEG, IVEA_AZ_DEG);

@jerstlouis jerstlouis Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@felixpalmer Curious about this (IVEA_AZ_DEG) here...

Is that the azimuth from DSEA's perspective?

If so, that might be problematic if trying to override +proj=ivea with +azi from ISEA/IVEA's perspective?

Is that positioning the vertices of the icosahedron at ISEA_STD_LAT_DEG, ISEA_STD_LON_DEG, or the vertices of the dodecahedron?

Also wondering if you updated this PR already or it still needs refactoring (it shows no conflict)?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

No this PR is out of date, no point keeping it as the other branch has diverged too much

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@felixpalmer Thanks for clarifying that. Still really hoping for a follow-up PR for +proj=ivea support though :)

Are you leaving that to me or were you planning to update this one yourself? :)

I'm also wondering if we could have a +net=5x6 that could work across all the icosahedral ones like dsea and isea (and eventually tisea), before we have the full blown affine transformation available... When selecting that net, dsea and ivea would be exactly the same (the only difference for ivea is that it defaults to an icosahedron net).

I guess currently the nets are specified as the number of faces for the selected solid, rather than the component kis or meta triangles though, right? I was thinking depending on the count of faces in the net, it could auto-select the right mode (for the eventual +proj=polyhedral, but also for the these internal nets like +net=5x6, +net=dymaxion, etc.)

P->fwd = polyhedral_fwd;
P->inv = polyhedral_inv;
return P;
}

PROJ_HEAD(tsea, "Tetrahedral Snyder Equal Area") "\n\tSph";
PJ *PJ_PROJECTION(tsea) {
auto *Q = static_cast<pj_polyhedral_data *>(calloc(1, sizeof(pj_polyhedral_data)));
Expand Down
4 changes: 4 additions & 0 deletions test/render_nets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ $RENDER --proj="+proj=isea2 +R=1" \
--title="ISEA: Icosahedral Snyder Equal Area" \
-o isea_net.png

$RENDER --proj="+proj=ivea +R=1" \
--title="IVEA: DSEA unfolded onto icosahedral net" \
-o ivea_net.png

$RENDER --proj="+proj=tsea +R=1" \
--title="TSEA: Tetrahedral Snyder Equal Area" \
-o tsea_net.png
1 change: 1 addition & 0 deletions test/unit/test_polyhedral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ static const char *proj_strings[] = {
"+proj=dsea +net=two_flower +R=1",
"+proj=dsea +net=icosahedron +R=1",
"+proj=isea2 +R=1",
"+proj=ivea +R=1",
};

static void roundtrip_test(const char *proj_string, double tolerance) {
Expand Down