Page 1 of 2

1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 5:17 am UTC
by thunk
Image

Alt-text: This map preserves the shapes of Tissot's indicatrices pretty well, as long as you draw them in before running the resize.

Geographers like talking about space-time compression, but this is the first time I've heard cartographers apply that concept.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 5:19 am UTC
by ahammel
inb4 "well, it's better than Mercator"

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 5:25 am UTC
by Soupspoon
The poor United States looks particularly deflated. UK, however seems to be quite dominant (and as well formed as normally expected, give or take the frequently tricky edge of Wales, etc), even as Eire gets shoved over into Canada, so it's clearly not possible to state this as either refelective or parodaic of 2016's big shifts... ;)

(Not used Photoshop much, more a GIMP person. I assume there's something like that option available to me, too, somewhere under a sub-menu I have yet to totally explore. Or else I can just write my own Gimp-Perl handler.)

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 5:25 am UTC
by Pfhorrest
well, it's better than Mercator

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 5:28 am UTC
by zjxs
It's better than Mercator.

Interestingly Libya and Algeria are almost untouched, as is the KSA. Must be a lot of detail in that sand.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 6:21 am UTC
by xteuk
I don't get it, maybe because english is not my primary language.

Just what is used to resize each country ??

I'm not asking about the tool, it's photoshop, ok.
I'm guessing some kind of numeric quantity is "weighting" countries, but can't understand which...

(maybe just "none" ??)

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 8:46 am UTC
by FOARP
Hmmm . . either the algorithm favours stuff towards the centre, or the projection used maximised detail of stuff in the centre so the algorithm didn't want to mess with it. Either way, if you were towards the centre of the plot you got away relatively lightly.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 8:53 am UTC
by rhomboidal
Wow, Alfred Wegener's theorizing of continental drift is all the more amazing that he did it WITHOUT Photoshop.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 9:35 am UTC
by summerstay
What projection do you think he started with? And is there one that would be more appropriate to start with?

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 11:14 am UTC
by phlip
xteuk wrote:
I don't get it, maybe because english is not my primary language.

Just what is used to resize each country ??

I'm not asking about the tool, it's photoshop, ok.
I'm guessing some kind of numeric quantity is "weighting" countries, but can't understand which...

(maybe just "none" ??)

It's an algorithm that tries to detect what parts of an image are important detailed elements that should stay about the same size, and irrelevant background elements that can be shrunk away without losing much detail.

When applied to the world map, it identifies Africa as being important detail (because there's a lot of small countries and borders) while the oceans, and large countries like the USA and Canada are big empty spaces of a single colour, so they are flagged as less important, and they collapse when the image is shrunk down.

I realise that an academic description might not be the most useful for someone who English isn't their main language, but there's a good presentation of the process here, when the algorithm was presented at SIGGRAPH about a decade ago.

Soupspoon wrote:
(Not used Photoshop much, more a GIMP person. I assume there's something like that option available to me, too, somewhere under a sub-menu I have yet to totally explore. Or else I can just write my own Gimp-Perl handler.)

Layer -> Liquid Rescale

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 11:37 am UTC
by RCT Bob
Iceland is completely missing isn't it?

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 11:50 am UTC
by eran_rathan
RCT Bob wrote:Iceland is completely missing isn't it?

No, its just a smudge between Greenland and Norway.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 11:59 am UTC
by Copper Bezel
phlip wrote:Layer -> Liquid Rescale

That is where it appears, but I had to install the plugin explicitly.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 12:08 pm UTC
by walen
As a Spaniard, I like this map. It's better than Mercator.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 12:10 pm UTC
by phlip
Copper Bezel wrote:
phlip wrote:Layer -> Liquid Rescale

That is where it appears, but I had to install the plugin explicitly.

Ah, good to know. On Ubuntu at least, it's bundled (as a part of the "gimp-plugin-registry" package).

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 12:24 pm UTC
by cellocgw
So far it appears the coding nerds haven't woken up. I was hoping to see code snippets posted that would let Photoshop (or GIMP) do liquid rescaling based on all sorts of other map-ish parameters. Here's some suggestions: coastline (cue the Fractal Folk), number of nukes, or number of microbreweries.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 12:25 pm UTC
by somitomi
eran_rathan wrote:
RCT Bob wrote:Iceland is completely missing isn't it?

No, its just a smudge between Greenland and Norway.

Strange, it's not like Iceland is lacking in terms detailed elements, is it?
Spoiler:
Image
Gotta love imgaes with transparent backgrounds.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 12:55 pm UTC
by Flumble
Well, looking at the Netherlands, the map Randall started with wasn't terribly detailed. :wink:
Either that or it's a bit of a fuzzy short-path liquid resize and it chose to compress everything at the longitudes of the Atlantic, rather than crawl around Iceland.


cellocgw wrote:So far it appears the coding nerds haven't woken up. I was hoping to see code snippets posted that would let Photoshop (or GIMP) do liquid rescaling based on all sorts of other map-ish parameters. Here's some suggestions: coastline (cue the Fractal Folk), number of nukes, or number of microbreweries.

How would you go about applying liquid resize to coastline or basing it on any statistic?

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 1:34 pm UTC
by Copper Bezel
I guess he just means a cartogram maker. Naturally, that would require edge and area information that is not present in a graphic, in addition to ... everything else.

phlip wrote:
Copper Bezel wrote:
phlip wrote:Layer -> Liquid Rescale

That is where it appears, but I had to install the plugin explicitly.

Ah, good to know. On Ubuntu at least, it's bundled (as a part of the "gimp-plugin-registry" package).

Ah ... I'm on Ubuntu, but for whatever reason, I just didn't have the Gimp Plugin Registry package installed. (Remember that GIMP no longer comes preinstalled with Ubuntu, so we'd both have to have installed GIMP explicitly at some point, and I may have missed a step with recommended packages.) The site I liked just indicates that Ubuntu users should install gimp-plugin-registry; I did so, but somehow unconsciously left the page having confused it with the Fedora package that's only lqr.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 1:56 pm UTC
by moody7277
ahammel wrote:inb4 "well, it's better than Mercator"


Pfhorrest wrote:well, it's better than Mercator


These go along with my first thought, "At least Greenland is smaller than South America."

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 2:47 pm UTC
by jigawatt
Looks like a fisheye lens projection. Waughmp waughmp.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 2:56 pm UTC
by Sonic#
What would it look like if Japan were the center of the map? I asked that because a lot of the distortion depends on what is at the center of the image, and the Pacific had a lot of space to be shrunk through.

Image

Original (imgur)
Technique used: rescaled with Photoshop, Edit -> Content Aware Scale.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 3:18 pm UTC
by Soupspoon
Sonic# wrote:What would it look like if Japan were the center of the map? I asked that because a lot of the distortion depends on what is at the center of the image, and the Pacific had a lot of space to be shrunk through.

In form, that looks like a map created for the flyleaf of a book that's a bad Middle Earth/Earthsea/Game Of Thrones rip-off (if not actually a Earthsea/GoT map, given that they're obviously inspired by the former in this way), rendered into colour and in-universe political detail added as a limited-edition wall map for fans to hang in their student rooms, or to supplement the spin-off RPG's rule system... Also, maybe, Heliconia (Spring/Summer) or a form of Blue Mars used in a Space:1999 context...

(It just has the look of "we need: a straight between this land mass and the next, to establish power blocks that compete for dominamce but rarely actually invade each other; a chain of islands there to allow a progressive stepping stone towards/away from a particular cultural backwater involved in a quest/the unnoticed arising of a potentially powerful character; some large area of supposed wilderness without much obvious detail within which many different encounters can be engineered... But let's try and avoid wrapping across the boundaries of the map, except with an hospitable Terra Nullia that no-one would ever expect to have to use, except in some terribly necessary but dreadfully time-skipped flight from an 'edge land' one has inextricably become persona-non-grata in... " Because of the origninal projection/morphing bias towards certain forms of lines, it even looks to have the 'drawn by hands swept around, rotating at the wrist' look...)

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 3:32 pm UTC
by reval
Yes - I like Japan-in-the-center better. Even Iceland looks better this way.

The algorithm seems to be distracted by whatever is in the center. Does putting something small in the center work better in general?

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 4:09 pm UTC
by Heimhenge
Soupspoon wrote:The poor United States looks particularly deflated. UK, however seems to be quite dominant (and as well formed as normally expected, give or take the frequently tricky edge of Wales, etc), even as Eire gets shoved over into Canada, so it's clearly not possible to state this as either refelective or parodaic of 2016's big shifts... ;)

(Not used Photoshop much, more a GIMP person. I assume there's something like that option available to me, too, somewhere under a sub-menu I have yet to totally explore. Or else I can just write my own Gimp-Perl handler.)


Well it ain't in Corel PhotoPaint X5 either. But I did discover a cool new effect I hadn't seen before while searching the sub-menus for "liquid resize" (or its equivalent). Doesn't appear to be a plugin available to do it either. Pity ... I can see where that would be a useful effect.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 4:56 pm UTC
by Xom
Another coding challenge: Reimplement the algorithm to apply to a spherical surface.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 5:41 pm UTC
by gmalivuk
Flumble wrote:
cellocgw wrote:So far it appears the coding nerds haven't woken up. I was hoping to see code snippets posted that would let Photoshop (or GIMP) do liquid rescaling based on all sorts of other map-ish parameters. Here's some suggestions: coastline (cue the Fractal Folk), number of nukes, or number of microbreweries.

How would you go about applying liquid resize to coastline or basing it on any statistic?
By adjusting how "important" your software judges that country to be.

http://www.worldmapper.org/ has you covered for a lot of what you might want to do cartogram-style, though.

Here's the number of nukes one:
Image

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 5:45 pm UTC
by ps.02
Anyone know how Randall does these maps (here and in other comics, like those in Drain the Swamp)? They look hand-drawn, but if he's putting it through Photoshop (or, in the case of that What-If, maybe a Python program), does that mean he starts with a hand-drawn projection and then runs it through Photoshop, or perhaps mangles an actual digital projection in software, then redraws the result? (Sounds tedious.)

Or maybe Photoshop just also has a "hand-drawn" effect he applies to images rendered by software?

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 6:11 pm UTC
by Sableagle
Anybody else who looked up "tissot's indicatrix mercator" and was disappointed not to see the Butterfly map among the examples?

Sonic# wrote:What would it look like if Japan were the center of the map?
That ... did things to Scotland.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 6:15 pm UTC
by orthogon
This reminds me of the (novel) sequel to E.T. which I read decades ago. E.T.'s home planet is described as the "Green Planet" as it's covered in plant life, by contrast to Earth, the Blue Planet. Much later I wonder whether that was fair. Plant life obviously depends on the water cycle, but how much ocean is needed to support a given amount of vegetated land? Could a green planet be all land, with a fast water cycle (like Earth's rainforests), or do you need oceans to act as large sinks of available water?

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 6:21 pm UTC
by rmsgrey
orthogon wrote:This reminds me of the (novel) sequel to E.T. which I read decades ago. E.T.'s home planet is described as the "Green Planet" as it's covered in plant life, by contrast to Earth, the Blue Planet. Much later I wonder whether that was fair. Plant life obviously depends on the water cycle, but how much ocean is needed to support a given amount of vegetated land? Could a green planet be all land, with a fast water cycle (like Earth's rainforests), or do you need oceans to act as large sinks of available water?


Or is it all shallow water?

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 6:36 pm UTC
by xteuk
phlip wrote:It's an algorithm that tries to detect what parts of an image are important detailed elements that should stay about the same size, and irrelevant background elements that can be shrunk away without losing much detail.

When applied to the world map, it identifies Africa as being important detail (because there's a lot of small countries and borders) while the oceans, and large countries like the USA and Canada are big empty spaces of a single colour, so they are flagged as less important, and they collapse when the image is shrunk down.

I realise that an academic description might not be the most useful for someone who English isn't their main language, but there's a good presentation of the process here, when the algorithm was presented at SIGGRAPH about a decade ago.

Soupspoon wrote:
(Not used Photoshop much, more a GIMP person. I assume there's something like that option available to me, too, somewhere under a sub-menu I have yet to totally explore. Or else I can just write my own Gimp-Perl handler.)

Layer -> Liquid Rescale


Thank you ! It was clear and easy, now I understand :)

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 6:42 pm UTC
by DanD
orthogon wrote:This reminds me of the (novel) sequel to E.T. which I read decades ago. E.T.'s home planet is described as the "Green Planet" as it's covered in plant life, by contrast to Earth, the Blue Planet. Much later I wonder whether that was fair. Plant life obviously depends on the water cycle, but how much ocean is needed to support a given amount of vegetated land? Could a green planet be all land, with a fast water cycle (like Earth's rainforests), or do you need oceans to act as large sinks of available water?



Don't forget that oceans in the littoral zone are green. A planet with lots of shallow, narrow oceans would be primarily green. Not to mention shallow bodies of water with mangrove like growth patterns.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 6:44 pm UTC
by Soupspoon
@ps.02, I tend to think that anything technical is plotted by whatever-production-method-technically-plots-it and that used (perhaps by 'onion skinning') to hand-draw (via drawing input device) over the top on the to-be-published layer(s) to the personally desired level of freehand detail. But it's just a guess.

Sableagle wrote:That ... did things to Scotland.
It's the Great Glen (Inverness to Fort William) edit: No, rethinking it, it's Fort William connecting to the Tay (which is very odd - hence whyI mistook the next crenelation north for the Dornoch Firth, first glance, when that was probably Inverness all along) that seems to have been pinched, far more than the Clyde/Forth one that I would have expected. The Wash/Mersey gap gets pinched too (not the Humber, surprisingly) and Carlisle doesn't seem to have a counterpart Northumbrian east-coast press, but it gets very muddled, especially when you notice the almost amputative dislocation of the Cornish peninsula, indicating some sort of discontinuous transform. Also Cardigan Bay ends up with a no-shoreline transition, around Aber/Towyn, whilst the Thames estuary is given a strange remix.

One wonders how much the map would differ with the kanji writing removed (or somehow rendered irrelevent to the process that probably can't differentiate its detail from the coastline pixels).

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 7:36 pm UTC
by Flumble
gmalivuk wrote:
Flumble wrote:
cellocgw wrote:So far it appears the coding nerds haven't woken up. I was hoping to see code snippets posted that would let Photoshop (or GIMP) do liquid rescaling based on all sorts of other map-ish parameters. Here's some suggestions: coastline (cue the Fractal Folk), number of nukes, or number of microbreweries.

How would you go about applying liquid resize to coastline or basing it on any statistic?
By adjusting how "important" your software judges that country to be.

I'd argue that one key element of liquid resize is that it uses edge-detect to decide what's important and it wouldn't be liquid resize if you use your own metric. Then again, the SIGGRAPH demo (mentioned by phlip above) already showed a way to manually mark important bits, which is quite important to liquid resizing too.

Anyway, worldmapper (I assume) uses a resizing algorithm that works correctly rather than best effort.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 8:57 pm UTC
by Soupspoon
If it's anything like my own cartographic efforts, it works on polygons (I find that wikipedia .svg maps with the necessary boundaries as vector information are a useful source of the necessary raw data), identifies all border dependencies1 and tri/quad/etc zone meeting points2 that join them and sole-edge (uncomplicated coastline borders) and then after calculating the current areas of the polygons and the (relative) desired areas, performs an iterative bulging and concaving formula3 on the border-line, then looks again at the newly, slightly shifted areas and goes round again with more distortions until it's close to that desired.

Enclaves and exclaves complicate matters, as do territories (such as Scottish islands forming their own combined constituency) that are effectively exclaves of themselves across water-bodies, so a bit of intelligent partitioning of intermediate spaces into a 'deforms around the other bits' way is useful.


You can set off-territory (sea and ocean areas) is having maximal, minimal, neutral or disinterested 'pressure', according to desired implementation. The "world nukes" map obviously just shuffles most of the land-areas down, due to the data tending to be (near-)zero in most places, but might be considered to have given oceans "positive pressure", of maybe a token single nuke to allow the properly nuclear nations to inflate out. The Falklands (not defined as an exclave of the UK, if the colour has anything to do with it) and Antartica (probably deliberately left undistorted beyond original map projection) seem to be excluded from the algorithm for reasons of practicality.

But it's fun to mess with the data. You can even operate upon the data as if on a spherical surface but continue to render the thus-shifted information in an approximation of the planar projection of your choice. I prefer gnomonic. ;)


1 Identical stretches shared between two polygons, probably in reverse to each other, with a bit of manual checking/rejigging to ensure two 'identical' but differently defined borders (not covered by footnote 2) are proberly harmonised.
2 Or departure points at coastlines/estuaries/inland lakes of sufficient size, which often adds some complexity that I deal with by creating a 'virtual territory' to fill in the water space and buffer it against untoward degrees of liminal distortion.
3 I start with the (non-coastal) multi-meeting points and ask that to move on a vector that's a fraction of the current 'imbalance' of the three+ areas that meet at that point, from which I then adjust the border-sides that meet there (with 'collision detection', especially concentrated near each end gpoint to ensure no over-intersection of adjacent boundaries) to reflect the current:desired area differential.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 9:06 pm UTC
by SuicideJunkie
gmalivuk wrote:Here's the number of nukes one:

Holy Molpy!
When did Antarctica get all those nukes?!?

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Wed Jan 11, 2017 9:32 pm UTC
by Soupspoon
SuicideJunkie wrote:
gmalivuk wrote:Here's the number of nukes one:

Holy Molpy!
When did Antarctica get all those nukes?!?

Why do you think nobody's actually invaded them, just opened a lot of embassies and consulates that are otherwise used for 'research'.

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Thu Jan 12, 2017 12:43 am UTC
by Soupspoon
BTW: Earth is already continuing to reshape and shuffle its landmasses, as we all know, but this one will be interesting to watch, if anyone gets a chance...

(Mark it in your diaries..?)

Re: 1784: "Bad Map Projection: Liquid Resize"

Posted: Thu Jan 12, 2017 1:35 am UTC
by hotaru
not sure if I did it right, but this is what I ended up with when starting from a projection that isn't complete shit.
20.deg.borders-p7p4-lg-lqr.jpg