--- stich.pl 2007/10/15 22:27:03 6 +++ stich.pl 2007/10/15 22:34:20 7 @@ -12,6 +12,9 @@ my $path = shift @ARGV || die "usage: $0 path_to_dump_dir\n"; +# Mireo 1, Google 0 +my $flip_vertical = 0; + my ( $range, $usage ); my @files; @@ -102,7 +105,12 @@ # this is specific to globe position, I guess ... this is europe my $x = ( $file_pos->{$tile_file}->{x} - $range->{min}->{x} ) / $step->{x}; - my $y = ( $range->{max}->{y} - $file_pos->{$tile_file}->{y} ) / $step->{y}; + my $y; + if ( $flip_vertical ) { + $y = ( $range->{max}->{y} - $file_pos->{$tile_file}->{y} ) / $step->{y}; + } else { + $y = ( $file_pos->{$tile_file}->{y} - $range->{min}->{y} ) / $step->{y}; + } printf("%3dx%-3d %s\n", $x, $y, $tile_file);