Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Geo-ShapeFile CPAN distribution.

Report information
The Basics
Id: 46068
Status: resolved
Priority: 0/
Queue: Geo-ShapeFile

People
Owner: SLAFFAN [...] cpan.org
Requestors: LGODDARD [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.52
Fixed in: 2.54



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;
Weird, apparently nobody has ever used the height/width functions, or at least nobody has noticed they are backwards before. I'm in the process of rewriting Geo::ShapeFile to make the API a little easier to deal with and to add support for writing shapefiles as well as reading them. I can release a 2.53 version if you really need it, otherwise I'd rather just include the fixes in 3.00. On Thu May 14 06:24:11 2009, LGODDARD wrote: Show quoted text
> 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;
-- www.jasonkohles.com
Subject: Re: [rt.cpan.org #46068] Width and height of shapefile misreported?
Date: Sun, 31 May 2009 18:08:55 +0100
To: bug-Geo-ShapeFile [...] rt.cpan.org
From: Lee Goddard <200812 [...] leegoddard.net>
I'd wait, if I were you. Thanks for the mod! Lee
Hello Lee, This has been fixed in the github repo for this module. https://github.com/shawnlaffan/Geo-ShapeFile/issues/5 The 2.53 release will be on CPAN soon. Regards, Shawn. On Sun May 31 13:09:28 2009, 200812@leegoddard.net wrote: Show quoted text
> I'd wait, if I were you. > > Thanks for the mod! > > Lee
Subject: Re: [rt.cpan.org #46068] Width and height of shapefile misreported?
Date: Sun, 09 Feb 2014 17:52:19 +0100
To: bug-Geo-ShapeFile [...] rt.cpan.org
From: Lee Goddard <leegee [...] gmail.com>
That's strange, because I used the module last week for the first time since I reported the bug, years ago! Thanks — it was helpful. On 09/02/2014 09:54, Shawn Laffan via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=46068 > > > Hello Lee, > > This has been fixed in the github repo for this module. https://github.com/shawnlaffan/Geo-ShapeFile/issues/5 > > The 2.53 release will be on CPAN soon. > > Regards, > Shawn. > > > On Sun May 31 13:09:28 2009, 200812@leegoddard.net wrote:
>> I'd wait, if I were you. >> >> Thanks for the mod! >> >> Lee
> > >
No worries Lee, Regards, Shawn. On Sun Feb 09 11:52:33 2014, lee@leegoddard.net wrote: Show quoted text
> That's strange, because I used the module last week for the first time > since I reported the bug, years ago! > > Thanks — it was helpful. > > On 09/02/2014 09:54, Shawn Laffan via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=46068 > > > > > Hello Lee, > > > > This has been fixed in the github repo for this module. > > https://github.com/shawnlaffan/Geo-ShapeFile/issues/5 > > > > The 2.53 release will be on CPAN soon. > > > > Regards, > > Shawn. > > > > > > On Sun May 31 13:09:28 2009, 200812@leegoddard.net wrote:
> >> I'd wait, if I were you. > >> > >> Thanks for the mod! > >> > >> Lee
> > > > > >
Fixed in 2.54. On Sun Feb 09 15:11:29 2014, SLAFFAN wrote: Show quoted text
> No worries Lee, > > Regards, > Shawn. > > On Sun Feb 09 11:52:33 2014, lee@leegoddard.net wrote:
> > That's strange, because I used the module last week for the first time > > since I reported the bug, years ago! > > > > Thanks — it was helpful. > > > > On 09/02/2014 09:54, Shawn Laffan via RT wrote:
> > > <URL: https://rt.cpan.org/Ticket/Display.html?id=46068 > > > > > > > Hello Lee, > > > > > > This has been fixed in the github repo for this module. > > > https://github.com/shawnlaffan/Geo-ShapeFile/issues/5 > > > > > > The 2.53 release will be on CPAN soon. > > > > > > Regards, > > > Shawn. > > > > > > > > > On Sun May 31 13:09:28 2009, 200812@leegoddard.net wrote:
> > >> I'd wait, if I were you. > > >> > > >> Thanks for the mod! > > >> > > >> Lee
> > > > > > > > >
> >