Subject: | Width and height of shapefile misreported? |
Here's someoutput followed by some code. The shapefile was the WWF
Ecoregions of the World,
http://worldwildlife.org/science/ecoregions/terrestrial.cfm
KML.populate_db INFO: x = -180 to 180
| at
../lib/BBC/Earth/WWF/Maps/KML.pm line 259
KML.populate_db INFO: y = -90 to 83.6235961914063
| at
../lib/BBC/Earth/WWF/Maps/KML.pm line 260
KML.populate_db INFO: Bounds top left/right:
Point(X=-180,Y=-90) ... Point(X=180,Y=-90) | at
../lib/BBC/Earth/WWF/Maps/KML.pm line 261
KML.populate_db INFO: Bounds bot left/rightL
Point(X=-180,Y=83.6235961914063) ... Point(X=180,Y=83.6235961914063) |
at ../lib/BBC/Earth/WWF/Maps/KML.pm line 262
KML.populate_db INFO: Module Wi x Hi: 173.623596191406 x 360
| at
../lib/BBC/Earth/WWF/Maps/KML.pm line 263
KML.populate_db INFO: Real wi x hi: 362 x 175.623596191406
| at
../lib/BBC/Earth/WWF/Maps/KML.pm line 264
my $shapefile = Geo::ShapeFile->new( $args->{dir}. $args->{base_name} );
my $shapefile_wi = abs($shapefile->x_min) + abs($shapefile->x_max) + 2;
my $shapefile_hi = abs($shapefile->y_min) + abs($shapefile->y_max) + 2;
INFO "x = ", $shapefile->x_min(), " to ", $shapefile->x_max();
INFO "y = ", $shapefile->y_min(), " to ", $shapefile-> y_max();
INFO "Bounds top left/right: ", $shapefile->upper_left_corner(), " ...
", $shapefile-> upper_right_corner();
INFO "Bounds bot left/rightL ", $shapefile->lower_left_corner(), " ...
", $shapefile-> lower_right_corner();
INFO "Module Wi x Hi: ", $shapefile->width," x ",$shapefile->height;
INFO "Real wi x hi: ", $shapefile_wi, " x ", $shapefile_hi;