| Geo-Coordinates-Convert documentation | view source | Contained in the Geo-Coordinates-Convert distribution. |
Geo::Coordinates::Convert - Perl extension for converting geographic coordinates from decimal degrees to Lambert II and vice versa
use Geo::Coordinates::Convert; set_Mean_Longitude( $my_mean_longitude ); # decimal degrees ($long_LII, $lat_LII) = geo2lII( $long_degrees, $lat_degrees, [$mean_longitude] ); ($long_degrees, $lat_degrees) = lII2geo( $long_LII, $lat_LII );
Geo::Coordinates::Convert provides you a function converting classical geographics coordinates (e.g. 50.25° E, 12.3° S) to Lambert II coordinates (x meters, y meters) you can draw easily on a flat map using translation and scaling factors. Geo::Coordinates::Convert provides also the reverse function converting Lambert II coordinates to classical geographics coordinates.
Conventions:
longitudes from -180° west to +180° east
latitudes from -90° south to +90° north (excluding -90° and +90°)
- add a third parameter "mean_lambert_longitude" to the "lII2geo" function. - extend to Lambert I, Lambert II extended, Lambert III and so on.
I'm not sure these subs works fine for all longitudes (despite the sub set_Mean_Longitude), nor other latitudes, especially northern ones or equatorial ones. I don't know the place to find the parameters $N, $C, $XS, $YS for other countries than France.
version 0.01 2002/09/20 first release.
Jean-Pierre Vidal, <jeanpierre.vidal@free.fr>
Copyright (C) 2002 Jean-Pierre Vidal, jeanpierre.vidal@free.fr
This package is free software and is provided "as is" without express or implied warranty. It may be used, modified, and redistributed under the same terms as Perl itself.
| Geo-Coordinates-Convert documentation | view source | Contained in the Geo-Coordinates-Convert distribution. |