Jump to content

User:Bjwebb/World

From Wikipedia, the free encyclopedia

The Upsidedown Map

[edit]

What's wrong with this map? Nothing! Theres no real reason why we shouldn't use a map this way around.

Creation

[edit]

Flipped the image upsidedown in an image editor, then used a php script to flip the captions:

#!/usr/bin/php	
<?php
while ($line = fgets(STDIN)) {
	$stdin .= $line;
}
$pos = 0;
while($xstart = strpos($stdin, "|x=", $pos)) {
    $xstart += 3;
    $xend = strpos($stdin, "|", $xstart);
    $ystart = $xend + 3;
    $yend = strpos($stdin, "|", $ystart);
    $x = 1 - substr($stdin, $xstart, $xend-$xstart);
    $y = 0.5 - substr($stdin, $ystart, $yend-$ystart);
    $data .= substr($stdin, $pos, $xstart-$pos) . $x . "|y="  . $y;
    $pos = $yend;
}
$data .= substr($stdin, $pos, -1);
fwrite(STDOUT, $data);

exit(0);
?>