|
Geography::NationalGrid::TW - Module to convert Taiwan Datum to/from Latitude and Longitude |
Geography::NationalGrid::TW - Module to convert Taiwan Datum (TWD67/TM2, TWD97/TM2) to/from Latitude and Longitude
You should _create_ the object using the Geography::NationalGrid factory class, but you still need to know the object interface, given below.
# 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');
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.
These are the options accepted in the constructor. You MUST provide either Latitude and Longitude, or Easting and Northing.
Userdata = { Name => 'Dublin Observatory' }> but add whatever you want. Access using the data() method.
Most of these methods take no arguments. Some are inherited from Geography::NationalGrid
The routines used in this code may not give you completely accurate results for various mathematical and theoretical reasons. In tests the results appeared to be correct, but it may be that under certain conditions the output could be highly inaccurate. It is likely that output accuracy decreases further from the datum, and behaviour is probably divergent outside the intended area of the grid.
This module has been coded in good faith but it may still get things wrong. Hence, it is recommended that this module is used for preliminary calculations only, and that it is NOT used under any circumstance where its lack of accuracy could cause any harm, loss or other problems of any kind. Beware!
Jidanni's Taiwan datum - http://jidanni.org/geo/taiwan_datums/
John Hsieh - http://gis.thl.ncku.edu.tw/coordtrans/coordtrans.aspx
Copyright (c) 2006 Yen-Ming Lee. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|
Geography::NationalGrid::TW - Module to convert Taiwan Datum to/from Latitude and Longitude |