Skip to content
Open
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);

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