Feature: ISEA projection (generalized)#2
Conversation
| @@ -0,0 +1,135 @@ | |||
| // Auto-generated by scripts/generate_isea_mapping.py — DO NOT EDIT | |||
There was a problem hiding this comment.
@felixpalmer Is the script committed in any of these PRs?
Couldn't we just generate this dynamically when setting up the projection instead? (I would personally prefer that over hardcoded constants).
We could even potentially support describing the polyhedron, and the mapping of great circles, with a parameter instead?
There was a problem hiding this comment.
Honestly I decided not to commit that as it was messy and I didn't want to make this large contribution even more complex. I'm not sure if such a polyhedron generator should be in PROJ, it feels a bit like feature creep.
Perhaps we could find a way to extract the values from a well-known source, e.g. https://dmccooey.com/polyhedra/DisdyakisTriacontahedron.txt
Open to discussion here, this was an area where I wasn't sure what would be best. If you have such a script then you could try adapting it for this purpose and we could see how it looks
There was a problem hiding this comment.
Given how flexible you have this already, and the original isea projection initially tried to support multiple polyhedron, and that the 1992 paper actually was about general "polyhedral", my preference would be a parameter to specify the polyhedron and generate these dynamically. But I'd like to discuss with you to better understand how flexible the code currently is in terms of going beyond Snyder (which implied the "center" of the face), and support for the Truncated Icosahedron etc.
There was a problem hiding this comment.
My code to generate the 12 vertices of the icosahedron (centroids of the dodeahedron faces) is here:
https://github.com/ecere/dggal/blob/main/src/projections/ri5x6.ec#L345
and then the d120 vertices can easily be obtained by calculating the midpoints and then the centroids by using the normalized midpoints as done here:
https://github.com/ecere/dggal/blob/main/src/projections/ri5x6.ec#L103
There was a problem hiding this comment.
The polyhedron vertices are one thing, but calculating the net isn't so simple for all the various cases.
Once you have the net then just storing a bunch of triangles is simple, even it is verbose. I would argue that explicit is better than implicit in this case.
As a first iteration of supporting this in PROJ it would be simpler to omit the generators, and they could be added as a followup.
Let's discuss offline so we don't span the comments going back and forth
|
Closing as ISEA is now in root PR |
Overview
This PR is stacked on top of the root PR: OSGeo#4758 - please see there before reviewing
Adds support for the
ISEAprojection, implemented using the generic polyhedral projection code. Could be used to replace the existing isea projectionChange list
ISEA:hexakis_icosahedron.hnets/isea2/***.hExample renders
ISEA