/[maps]/stich.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /stich.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4 by dpavlin, Mon Oct 15 21:57:50 2007 UTC revision 7 by dpavlin, Mon Oct 15 22:34:20 2007 UTC
# Line 12  use Imager; Line 12  use Imager;
12    
13  my $path = shift @ARGV || die "usage: $0 path_to_dump_dir\n";  my $path = shift @ARGV || die "usage: $0 path_to_dump_dir\n";
14    
15    # Mireo 1, Google 0
16    my $flip_vertical = 0;
17    
18  my ( $range, $usage );  my ( $range, $usage );
19    
20  my @files;  my @files;
# Line 102  foreach my $tile_file ( @files ) { Line 105  foreach my $tile_file ( @files ) {
105    
106          # this is specific to globe position, I guess ... this is europe          # this is specific to globe position, I guess ... this is europe
107          my $x = ( $file_pos->{$tile_file}->{x} - $range->{min}->{x} ) / $step->{x};          my $x = ( $file_pos->{$tile_file}->{x} - $range->{min}->{x} ) / $step->{x};
108          my $y = ( $range->{max}->{y} - $file_pos->{$tile_file}->{y} ) / $step->{y};          my $y;
109            if ( $flip_vertical ) {
110                    $y = ( $range->{max}->{y} - $file_pos->{$tile_file}->{y} ) / $step->{y};
111            } else {
112                    $y = ( $file_pos->{$tile_file}->{y} - $range->{min}->{y} ) / $step->{y};
113            }
114    
115          printf("%3dx%-3d %s\n", $x, $y, $tile_file);          printf("%3dx%-3d %s\n", $x, $y, $tile_file);
116    

Legend:
Removed from v.4  
changed lines
  Added in v.7

  ViewVC Help
Powered by ViewVC 1.1.26