Skip to content

Add interrupted projection for "sinu", "tmerc", "cass" and "poly"#4770

Open
jjimenezshaw wants to merge 6 commits into
OSGeo:masterfrom
jjimenezshaw:interrupted
Open

Add interrupted projection for "sinu", "tmerc", "cass" and "poly"#4770
jjimenezshaw wants to merge 6 commits into
OSGeo:masterfrom
jjimenezshaw:interrupted

Conversation

@jjimenezshaw
Copy link
Copy Markdown
Contributor

Creates a "meta" projection to make an interrupted projection with gores. It can be used with sinu, tmerc, cass, and poly projections, using their algorithms. It could be easily extended for other pseudo-cylindrical projections.

The definition of the gores can be just the number, like in +gores=3 or with a comma separated list, like in +gores=1,3,1. For the latter, the values are relative sizes, that will be translated into the 360 degrees.

There are several graphic examples in #4533

See that a single point in the frontier of two gores can only be projected in one side or the other. But not in both. That makes that meridians right in the division of gores are plotted only in one side. As a hack you can define another meridian with a tiny offset. Due to rounding problems it is not defined if the meridian is plotted on the right or left.

Evaluating Map Projections for Globemaking

  • AI (Copilot or something similar) supported my development of this PR. See our policy about AI tool use. Use of AI tools must be indicated.
  • Closes Interrupted projection proposal. #4533
  • Tests added
  • Added clear title that can be used to generate release notes
  • Fully documented, including updating docs/source/*.rst for new API

Comment on lines +158 to +163
Q->base_pj->es = P->es;
Q->base_pj->one_es = P->one_es;
Q->base_pj->k0 = P->k0;
Q->base_pj->f = P->f;
Q->base_pj->f2 = P->f2;
Q->base_pj->n = P->n;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Those parameters are the ones I found needed for the ellipsoidal projections. Do I need more? Is there already any function that copies them?

@jjimenezshaw
Copy link
Copy Markdown
Contributor Author

I can squash it in one commit before merging

@busstoptaktik
Copy link
Copy Markdown
Member

@jjimenezshaw I think I understand the usefulness of interrupting a cylindrical projection along a set of longitudes outside the domain of interest (i.e. ocean vs. continent), in order to limit the poleward deformation of wide area coverage maps.

I just don't see why this should be useful for transverse mercator, which does not deform significantly poleward (but rather as one approaches +/-90 degreees from the central meridian.

Wouldn't it make more sense supporting proj=merc, rather than proj=tmerc?

@jjimenezshaw
Copy link
Copy Markdown
Contributor Author

@busstoptaktik The usefulness of this meta-projection is for projections that do not have "vertical" (parallel to the Y axis) meridians. For Mercator it does not bring any value: the final output would be the same.

Daan Strebe (who suggested me the paper mentioned above https://www.tandfonline.com/doi/full/10.1080/00087041.2024.2436324 ) mentioned that transverse Mercator, being conformal, is better than sinusoidal if you want to later put the gores in a physical sphere: the parallels do not have an angle in the union of the gores.

@busstoptaktik
Copy link
Copy Markdown
Member

@jjimenezshaw Thanks! (now still confused, but at a higher level)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interrupted projection proposal.

2 participants