Hi, Jidanni, I fixed the following issues and released Geography-NationalGrid-TW 0.06
0.06 Sun Jun 28 13:46:01 PDT 2009 - add "use Exportor" to fix "Can't locate package Exporter" warnings - add two "use ..." in the example of manpage to complete it - correct wrong statement in manpage. Default to 'TWD97', not 'TWD67' - add my email per jidanni's request I forgot to mention in the change note that I updated the wording and reference link as well. Two issues left: - the values returned easting() and and northing() are truncated in the base class Geography::NationalGrid, not in the TW module. - the unquoted hash keys are omittable, but not the best practices. Thanks, -- Yen-Ming Lee <le...@leeym.com> 2009/6/28 <jida...@jidanni.org>: > Package: libgeography-nationalgrid-perl > Version: 1.6-8 > X-debbugs-cc: le...@leeym.com > > Many of the man pages say > > SYNOPSIS > You should create the object using the Geography::NationalGrid > factory class, but you still need to know the object interface, > given below. > > Nobody knows what that means. Please provide examples that work on their > own. Geography experts are not necessarily perl experts. > > Here I have managed to made an example from the man pages work on its > own, by adding the two "use" lines: > > $ cat ff > use Geography::NationalGrid; > use Geography::NationalGrid::TW; > # default TWD97 > my $point1 = new Geography::NationalGrid::TW( > 'Easting' => 302721.36, > 'Northing' => 2768851.3995, > ); > printf("Point 1 is %f X and %f Y\n", $point1->easting, > $point1->northing); > printf("Point 1 is %f N and %f E\n", $point1->latitude, > $point1->longitude); > # transform to TWD67 > $point1->transform('TWD67'); > > $ perl ff > Point 1 is 302721.000000 X and 2768851.000000 Y > Point 1 is 25.026834 N and 121.522413 E > > Works great, until we add -w: > > perl -w ff > Can't locate package Exporter for @Geography::NationalGrid::TW::ISA at ff > line 2. > Can't locate package Exporter for @Geography::NationalGrid::TW::ISA at > /usr/share/perl5/Geography/NationalGrid/TW.pm line 68. > Can't locate package Exporter for @Geography::NationalGrid::TW::ISA at > /usr/share/perl5/Geography/NationalGrid/TW.pm line 99. > Can't locate package Exporter for @Geography::NationalGrid::TW::ISA at > /usr/share/perl5/Geography/NationalGrid.pm line 41. > > Please fix the program and man pages for all the countries. I get errors > for other countries too. > > Also regarding the TW man page, > > # default TWD97 > Say if you mean input or output. > Also don't you say "Default is 'TWD67'" below? > > my $point1 = new Geography::NationalGrid::TW( > 'Easting' => 302721.36, > 'Northing' => 2768851.3995, > ); > printf("Point 1 is %f X and %f Y\n", $point1->easting, > $point1->northing); > printf("Point 1 is %f N and %f E\n", $point1->latitude, > $point1->longitude); > # transform to TWD67 > $point1->transform('TWD67'); > > DESCRIPTION > Once created, the object allows you to retrieve information about the > point that the object represents. For > example you can create an object using easting / northing and the > retrieve the latitude / longitude. > > OPTIONS > These are the options accepted in the constructor. You MUST provide > either Latitude and Longitude, or Easting and > Northing. > > Projection > Default is 'TWD67', the "TAIWAN DATUM 97". Other projections > recognized are 'TWD67', 'TWD97', but only > 'TWD97' is tested. > > "the "TAIWAN DATUM 97": don't you mean "the "TAIWAN DATUM 67"? > > Other projections recognized are 'TWD67': but didn't you already mention it, > so how is it "Other"? > > but only 'TWD97' is tested: The default is not tested, only the "other" > is tested? > > Please answer/correct the above on the man page, not just for me. > > P.S., Lee, please mention your address le...@leeym.com on the man page. > P.S., Lee, why not round, instead of truncate? > > easting > How many metres east of the origin the point is. The precision of > this value depends on how it was derived, > but is truncated to an integer number of metres. > > northing > How many metres north of the origin the point is. The precision of > this value depends on how it was derived, > but is truncated to an integer number of metres. > > in fact, why not just not "hurt" it at all. That way the example, > Point 1 is 302721.000000 X and 2768851.000000 Y > would not have the 00000s, but instead the original input. Just like you > don't "hurt" long/lat. Yes, after transforming it is inaccurate, but no > need to make things worse --- even before transforming too. > > > P.S., TW man page: > - Use the formula proposed by John Hsieh which supposed to > + Uses the formula proposed by John Hsieh which is supposed to > - Jidanni's Taiwan datum - http://jidanni.org/geo/taiwan_datums/ > + http://wiki.osgeo.org/wiki/Taiwan_datums > > Also no need for quote marks at: > 'Easting' => 302721.36, > 'Northing' => 2768851.3995, > > > -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org