Corners & Repetitions

Discussion of things we want in Geocart
Post Reply
Atarimaster
Posts: 446
Joined: Fri Nov 07, 2014 2:43 am

Corners & Repetitions

Post by Atarimaster »

Hello,

in his Geocart review of 2010, Mr. Kelso whished for

Code: Select all

the “corners” that form when a pseudocylindric or lenticular projection is extended to fill out it’s rectangular bounding box by repeating content that would otherwise only be found on the opposite edge of the map.
Since seven years later, Geocart still doesn’t offer that feature, I guess there a no plans to add it?
Well, I just like to voice my opinion that I’d like to have those corners, too. They are certainly not high on my priority list, but sometimes, it’d be nice to use them. The same applies to something like this:
An atlas I bought recently uses Winkel Tripel for the world map, having its usual "bowl-shaped" form (i.e. not using the corners mentioned above), centered to 10° East, but extents from 180° on the left to 160° West on the right edge of the map, thus repeating the portion between 160° West and 180°.

Again, I don’t think these things are very important. If it’s a lot of work, then I think the time can be spent better doing other things – e.g. the things I suggested in the "Some more information" thread. ;)


Oh, and here’s a question, too:
Those "corners" that Mr. Kelso talks about… I’ve seen them quite often on wall maps, but curiously, all maps of that kind that I remember have been using the van der Grinten I projection. Is there some specific reason for this or is it just coincidence?

Kind regards,
and happy new year,
Tobias
Piotr
Posts: 313
Joined: Thu Mar 23, 2017 12:27 pm

Re: Corners & Repetitions

Post by Piotr »

Many projections are able to have their formulas generalized beyond 180° as long as they are equatorial (as far as I know all cylindrical and pseudocylindrical projections, don't worry conic projections you can join the list too, Werner, Aitoff, Hammer (Aitoff and Hammer are based on halving longitudes then stretching), Winkel Tripel (averages equirectangular and Aitoff, both being in the list too)) but I'm sure some can't.
Atarimaster
Posts: 446
Joined: Fri Nov 07, 2014 2:43 am

Re: Corners & Repetitions

Post by Atarimaster »

Well, I wouldn’t mind if these features would be available only to a subset of the projections that Geocart offers.
After all, you can’t mix or interrupt all available projections, too.
Piotr
Posts: 313
Joined: Thu Mar 23, 2017 12:27 pm

Re: Corners & Repetitions

Post by Piotr »

A similar feature that requires above 180° calculation is Longitude Mix if the factor is more than 1. Note that Longitude Mix doesn't exist in Geocart 3 yet.
daan
Site Admin
Posts: 977
Joined: Sat Mar 28, 2009 11:17 pm

Re: Corners & Repetitions

Post by daan »

Since seven years later, Geocart still doesn’t offer that feature, I guess there a no plans to add it?
Oh, definitely on the backlog, but, well… priorities, and mmummbblemmmrmph blah blah, and it’s hard, and…

But yes, actually, it’s fairly hard in Geocart’s raster architecture. I built in provision for it at the lowest levels of the data structures from the beginning of Geocart 3, so adding it in the future won’t require messy changes at that level, but it’s still no cakewalk.

One fundamental distinction between a projection you can extend beyond normalized range from one you cannot, is that an extensible projection projects longitudes as a monotonic function, whereas nonextensible one project longitudes as functions that are periodic beyond [-180°…180°). Hence, Mollweide (or any cylindric and pseudocylindric projection) can be extended indefinitely because the longitude appears as a simple multiplier in its generating formulae.

Meanwhile something like Hammer is more complicated. The longitudinal value gets scaled, but then periodic functions (sine, cosine) are applied, and so there is a limit to how far it can be extended. That limit is specific to each projection, and so in order to enable longitudinal extension, every projection would need to declare how far it can be extended. How far it can be extended may depend on parameterization: Hammer, for example, uses ½ as the longitudinal duplication factor in canonical form, but you can change that value, and changing that value changes the extent to which you can repeat swaths of the earth. This implies a bunch of code, custom to each projection formula, to solve an equation that may have no closed form solution.

If that were not hard enough, the extension could fundamentally change the topology of the boundary. Because the boundary description is, itself, another piece of custom programming, the complexity starts spiraling out of control when you consider parameterization’s contribution to boundary changes. The projection code also has to make sure the resulting topology is coherent: Does the projection wrap back on itself and start overlapping? That would be the normal case for an azimuthal projection, which you cannot extend at all. Azimuthals are easy; you just mark them as non-extensible, but there are lots of projections that can be extended “some amount”, but how much is not obvious, both from the perspective of periodicity in the functions applied to the longitude, as well as the perspective of topological coherency.

Long explanation. I hope that helps. Yes, I could just enable longitude extension for easy classes (cylindric, pseudocylindric) and leave the rest for incremental updates. Even there I have hard problems to solve because the map is no longer bijective. That complicates a lot of underlying machinery that depends on bijection. Geocart depends heavily on numerical computation of projection inverse in order to achieve its beautiful raster imaging. Numerical inverse is already incredibly messy in the domain of map projections, but if you complicate it further with something like, xf ⁻¹∙f (x), well, ouch!

Happy 2018!
— daan
Piotr
Posts: 313
Joined: Thu Mar 23, 2017 12:27 pm

Re: Corners & Repetitions

Post by Piotr »

For Aitoff and Hammer, as long as you understand them, extending to 360° is obvious. Note that I didn't say that they can be extended to Infinity°, I just said they can be extended beyond 180°.

Here is the 360° extension of Winkel Tripel:
Image
Atarimaster
Posts: 446
Joined: Fri Nov 07, 2014 2:43 am

Re: Corners & Repetitions

Post by Atarimaster »

Piotr wrote: Here is the 360° extension of Winkel Tripel
Nice!
It also might explain why van der Grinten I is usually used for those "corners" – probably, because they’d look terrible on most other projections… ;)

By the way, how did you generate that image?
Piotr
Posts: 313
Joined: Thu Mar 23, 2017 12:27 pm

Re: Corners & Repetitions

Post by Piotr »

1. Using Paint in XP (it's my name for the version of Paint that came with XP, the actual OS I'm using is 10) I made a .tif image that is based on the largest political database I have, but squished horizontally 2x and the left-over space filled with second copies of east and west hemispheres. This simulates the longitude halving Aitoff and Hammer use, but extended to 360°.

2. I opened equatorial azimuthal equidistant with this database, stretched twice horizontally. This produces extended Aitoff.

3. I opened equirectangular (standard parallel is 50.46) with this database, stretched twice horizontally. This produces extended equirectangular.

4. I blended these projections to create extended Winkel Tripel.
Post Reply