Skip to content
Closed
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 @@ -79,6 +79,7 @@ PROJ_HEAD(imoll_o, "Interrupted Mollweide Oceanic View")
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(kav5, "Kavrayskiy V")
PROJ_HEAD(kav7, "Kavrayskiy VII")
PROJ_HEAD(krovak, "Krovak")
Expand Down
18 changes: 18 additions & 0 deletions src/projections/polyhedral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@

#include "polyhedral/sphere.h"
#include "polyhedral/polyhedra/decakis_dodecahedron.h"
#include "polyhedral/polyhedra/hexakis_icosahedron.h"
#include "polyhedral/polyhedra/hexakis_tetrahedron.h"
#include "polyhedral/nets/dsea/a5.h"
#include "polyhedral/nets/dsea/crescent.h"
#include "polyhedral/nets/dsea/dsea.h"
#include "polyhedral/nets/dsea/icosahedron.h"
#include "polyhedral/nets/dsea/two_flower.h"
#include "polyhedral/nets/isea2/isea2.h"
#include "polyhedral/nets/tsea/tsea.h"

#include "proj.h"
Expand Down Expand Up @@ -113,6 +115,22 @@ PJ *PJ_PROJECTION(dsea) {
return P;
}

PROJ_HEAD(isea2, "Icosahedral Snyder Equal Area (generalized)") "\n\tSph";
constexpr double ISEA_STD_LAT_DEG = 58.282525588539;
constexpr double ISEA_STD_LON_DEG = 11.25;
PJ *PJ_PROJECTION(isea2) { // TODO rename to `isea`?
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, hexakis_icosahedron::SPH_TRI, nets::isea2::isea2::FACE_TRI);
polyhedral::set_orient_from_angles(Q, ISEA_STD_LAT_DEG, ISEA_STD_LON_DEG, 0.0);

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
Loading