1784: "Bad Map Projection: Liquid Resize"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

User avatar
thunk
Posts: 425
Joined: Sat Apr 23, 2016 3:29 am UTC
Location: Arguably Exiled

1784: "Bad Map Projection: Liquid Resize"

Postby thunk » Wed Jan 11, 2017 5:17 am UTC

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.
Free markets, free movement, free plops
Blitz on, my friends Quantized, GnomeAnne, and iskinner!
troo dat

User avatar
ahammel
My Little Cabbage
Posts: 2135
Joined: Mon Jan 30, 2012 12:46 am UTC
Location: Vancouver BC
Contact:

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

Postby ahammel » Wed Jan 11, 2017 5:19 am UTC

inb4 "well, it's better than Mercator"
He/Him/His/Alex
God damn these electric sex pants!

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2164
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

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

Postby Soupspoon » Wed Jan 11, 2017 5:25 am UTC

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.)
Last edited by Soupspoon on Wed Jan 11, 2017 5:28 am UTC, edited 1 time in total.

User avatar
Pfhorrest
Posts: 3615
Joined: Fri Oct 30, 2009 6:11 am UTC
Contact:

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

Postby Pfhorrest » Wed Jan 11, 2017 5:25 am UTC

well, it's better than Mercator
Forrest Cameranesi, Geek of All Trades
"I am Sam. Sam I am. I do not like trolls, flames, or spam."
The Codex Quaerendae (my philosophy) - The Chronicles of Quelouva (my fiction)

User avatar
zjxs
Posts: 45
Joined: Tue Sep 29, 2009 6:04 am UTC
Location: Te Ao

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

Postby zjxs » Wed Jan 11, 2017 5:28 am UTC

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.

xteuk
Posts: 2
Joined: Wed Jan 11, 2017 6:15 am UTC

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

Postby xteuk » Wed Jan 11, 2017 6:21 am UTC

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" ??)

FOARP
Posts: 60
Joined: Wed Jun 08, 2011 7:36 am UTC

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

Postby FOARP » Wed Jan 11, 2017 8:46 am UTC

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.

User avatar
rhomboidal
Posts: 751
Joined: Wed Jun 15, 2011 5:25 pm UTC
Contact:

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

Postby rhomboidal » Wed Jan 11, 2017 8:53 am UTC

Wow, Alfred Wegener's theorizing of continental drift is all the more amazing that he did it WITHOUT Photoshop.

summerstay
Posts: 2
Joined: Fri Nov 21, 2014 9:19 am UTC

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

Postby summerstay » Wed Jan 11, 2017 9:35 am UTC

What projection do you think he started with? And is there one that would be more appropriate to start with?

User avatar
phlip
Restorer of Worlds
Posts: 7538
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

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

Postby phlip » Wed Jan 11, 2017 11:14 am UTC

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

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

RCT Bob
Posts: 73
Joined: Sun Aug 02, 2015 2:05 pm UTC
Location: Netherlands

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

Postby RCT Bob » Wed Jan 11, 2017 11:37 am UTC

Iceland is completely missing isn't it?

User avatar
eran_rathan
Mostly Wrong
Posts: 1672
Joined: Fri Apr 09, 2010 2:36 pm UTC
Location: everywhere, including space.

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

Postby eran_rathan » Wed Jan 11, 2017 11:50 am UTC

RCT Bob wrote:Iceland is completely missing isn't it?

No, its just a smudge between Greenland and Norway.
"Trying to build a proper foundation for knowledge is blippery."
"Squirrels are crazy enough to be test pilots."
"Google tells me you are not unique. You are, however, wrong."
straight outta here.

User avatar
Copper Bezel
Posts: 2416
Joined: Wed Oct 12, 2011 6:35 am UTC
Location: Web exclusive!

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

Postby Copper Bezel » Wed Jan 11, 2017 11:59 am UTC

phlip wrote:Layer -> Liquid Rescale

That is where it appears, but I had to install the plugin explicitly.
So much depends upon a red wheel barrow (>= XXII) but it is not going to be installed.

she / her / her

walen
Posts: 1
Joined: Wed Jan 11, 2017 12:05 pm UTC

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

Postby walen » Wed Jan 11, 2017 12:08 pm UTC

As a Spaniard, I like this map. It's better than Mercator.

User avatar
phlip
Restorer of Worlds
Posts: 7538
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

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

Postby phlip » Wed Jan 11, 2017 12:10 pm UTC

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).

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

User avatar
cellocgw
Posts: 1715
Joined: Sat Jun 21, 2008 7:40 pm UTC

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

Postby cellocgw » Wed Jan 11, 2017 12:24 pm UTC

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.
https://app.box.com/witthoftresume
Former OTTer
Vote cellocgw for President 2020. #ScienceintheWhiteHouse http://cellocgw.wordpress.com
"The Planck length is 3.81779e-33 picas." -- keithl
" Earth weighs almost exactly π milliJupiters" -- what-if #146, note 7

User avatar
somitomi
Posts: 380
Joined: Fri Nov 06, 2015 11:21 pm UTC
Location: can be found in Hungary
Contact:

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

Postby somitomi » Wed Jan 11, 2017 12:25 pm UTC

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.
write something... that says something... about something
they/them/theirs = he/him/his ❖ If you want to use something else out of dadaist spite, I won't mind. ✆ Hello? Yes, this is Forum Games!

User avatar
Flumble
Yes Man
Posts: 1877
Joined: Sun Aug 05, 2012 9:35 pm UTC

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

Postby Flumble » Wed Jan 11, 2017 12:55 pm UTC

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?

User avatar
Copper Bezel
Posts: 2416
Joined: Wed Oct 12, 2011 6:35 am UTC
Location: Web exclusive!

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

Postby Copper Bezel » Wed Jan 11, 2017 1:34 pm UTC

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.
So much depends upon a red wheel barrow (>= XXII) but it is not going to be installed.

she / her / her

User avatar
moody7277
Posts: 512
Joined: Thu Aug 14, 2008 7:06 pm UTC
Location: Extreme south Texas

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

Postby moody7277 » Wed Jan 11, 2017 1:56 pm UTC

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."
The story of my life in xkcdmafia:

Tigerlion wrote:Well, I imagine as the game progresses, various people will be getting moody.

jigawatt
Posts: 33
Joined: Fri Jul 01, 2011 9:35 pm UTC

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

Postby jigawatt » Wed Jan 11, 2017 2:47 pm UTC

Looks like a fisheye lens projection. Waughmp waughmp.

User avatar
Sonic#
Posts: 33
Joined: Tue Oct 24, 2006 12:44 am UTC
Location: Tennessee
Contact:

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

Postby Sonic# » Wed Jan 11, 2017 2:56 pm UTC

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.
"Stars, I have seen them fall,
But when they drop and die
No star is lost at all
From all the star-sown sky.
The toil of all that be
Helps not the primal fault;
It rains into the sea
And still the sea is salt."
~A.E. Housman

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2164
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

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

Postby Soupspoon » Wed Jan 11, 2017 3:18 pm UTC

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...)

reval
Posts: 72
Joined: Fri Sep 23, 2016 2:56 pm UTC

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

Postby reval » Wed Jan 11, 2017 3:32 pm UTC

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?

User avatar
Heimhenge
Posts: 146
Joined: Thu May 01, 2014 11:35 pm UTC

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

Postby Heimhenge » Wed Jan 11, 2017 4:09 pm UTC

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.

Xom
Posts: 1
Joined: Wed Jan 11, 2017 4:51 pm UTC

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

Postby Xom » Wed Jan 11, 2017 4:56 pm UTC

Another coding challenge: Reimplement the algorithm to apply to a spherical surface.

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 25617
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

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

Postby gmalivuk » Wed Jan 11, 2017 5:41 pm UTC

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
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

ps.02
Posts: 378
Joined: Fri Apr 05, 2013 8:02 pm UTC

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

Postby ps.02 » Wed Jan 11, 2017 5:45 pm UTC

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?

User avatar
Sableagle
Ormurinn's Alt
Posts: 1090
Joined: Sat Jun 13, 2015 4:26 pm UTC
Location: The wrong side of the mirror
Contact:

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

Postby Sableagle » Wed Jan 11, 2017 6:11 pm UTC

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.
Oh, Willie McBride, it was all done in vain.

User avatar
orthogon
Posts: 2566
Joined: Thu May 17, 2012 7:52 am UTC
Location: The Airy 1830 ellipsoid

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

Postby orthogon » Wed Jan 11, 2017 6:15 pm UTC

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?
xtifr wrote:... and orthogon merely sounds undecided.

rmsgrey
Posts: 3008
Joined: Wed Nov 16, 2011 6:35 pm UTC

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

Postby rmsgrey » Wed Jan 11, 2017 6:21 pm UTC

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?

xteuk
Posts: 2
Joined: Wed Jan 11, 2017 6:15 am UTC

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

Postby xteuk » Wed Jan 11, 2017 6:36 pm UTC

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 :)

DanD
Posts: 252
Joined: Tue Oct 05, 2010 12:42 am UTC

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

Postby DanD » Wed Jan 11, 2017 6:42 pm UTC

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.

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2164
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

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

Postby Soupspoon » Wed Jan 11, 2017 6:44 pm UTC

@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).

User avatar
Flumble
Yes Man
Posts: 1877
Joined: Sun Aug 05, 2012 9:35 pm UTC

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

Postby Flumble » Wed Jan 11, 2017 7:36 pm UTC

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.

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2164
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

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

Postby Soupspoon » Wed Jan 11, 2017 8:57 pm UTC

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.

SuicideJunkie
Posts: 127
Joined: Sun Feb 22, 2015 2:40 pm UTC

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

Postby SuicideJunkie » Wed Jan 11, 2017 9:06 pm UTC

gmalivuk wrote:Here's the number of nukes one:

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

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2164
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

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

Postby Soupspoon » Wed Jan 11, 2017 9:32 pm UTC

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'.

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2164
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

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

Postby Soupspoon » Thu Jan 12, 2017 12:43 am UTC

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..?)

User avatar
hotaru
Posts: 1017
Joined: Fri Apr 13, 2007 6:54 pm UTC

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

Postby hotaru » Thu Jan 12, 2017 1:35 am UTC

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

Code: Select all

factorial product enumFromTo 1
isPrime n 
factorial (1) `mod== 1


Return to “Individual XKCD Comic Threads”

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 42 guests