The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Geo::Coordinates::ETRSTM35FIN - converts Finnish ETRS-TM35FIN coordinate system from/to WGS84 coordinate system

SYNOPSIS

  use Geo::Coordinates::ETRSTM35FIN;

  my $gce = new Geo::Coordinates::ETRSTM35FIN;
  
  # ETRS-TM35FIN coordinates to WGS84 coordinates
  my ( $lat, $lon ) = $gce->ETRSTM35FINxy_to_WGS84lalo('6717563', '2545107');

  # WGS84 coordinates to ETRS-TM35FIN coordinates
  my ( $x, $y ) = $gce->WGS84lalo_to_ETRSTM35FINxy('60.22543759', '24.85437044');
  
  # Is the given location in the defined ETRS-TM35FIN boundaries?
  if ($gce->is_defined_ETRSTM35FINxy($x, $y)) {
     print "You gave valid ETRS-TM35FIN coordinates";
  }

DESCRIPTION

This module converts WGS84 coordinate system to/from the Finnish ETRS-TM35FIN coordinate system. The coordinate system covers Finland and surroundings. The coordinate system and the transformation functions are defined in the Finnish JHS-Public Administration Recommendation number 154.

METHODS

ETRSTM35FINxy_to_WGS84lalo(x, y)
    Transforms ETRS-TM35FIN coordinates (x = northing, y = easting) to WGS84
    coordinates.
    
    Returns WGS84 latitude and longitude in a two-value array (latitude,
    longitude). If the given ETRS coordinates are out of defined bounds
    (see is_defined_ETRSTM35FIN) the return values are undefined.
WGS84lalo_to_ETRSTM35FINxy(lat, lon)
    Transforms WGS84 coordinates to ETRS-TM35FIN coordinates.
    
    Returns transformed coordinates in a two-value array (x = northing,
    y = easting). If the given WGS84 values are out of the defined bounds
    (see is_defined_WGS84lalo) the return values are undefined.
is_defined_ETRSTM35FINxy(x, y)
    Checks whether given ETRS-TM35FIN coordinates (x = northing, y = easting)
    are in the area where the ETRS-TM35FIN coordinate system is defined. The
    boundaries are defined in L<http://spatialreference.org/ref/epsg/3067/>.
    
    Returns true if the coordinates are in the defined area, otherwise false.
is_defined_WGS84lalo(lat, lon)
    Checks whether given WGS84 coordinates are in the area where the
    ETRS-TM35FIN coordinate system is defined. The boundaries are defined
    in L<http://spatialreference.org/ref/epsg/3067/>.

    Returns true if the coordinates are in the defined area, otherwise false.

BUGS

Please report to author.

SEE ALSO

Official ETRS-TM35FIN definition http://www.jhs-suositukset.fi/web/guest/jhs/projects/jhs154 (in Finnish). The conversion functions are in appendix 1.

Good explanation about the Finnish coordinate system and its history http://www.kolumbus.fi/eino.uikkanen/geodocsgb/ficoords.htm.

On-line transformations between different coordinate systems http://kansalaisen.karttapaikka.fi/koordinaatit/koordinaatit.html?lang=en.

Former Finnish coordinate system conversion routines Geo::Coordinates:KKJ.

AUTHOR

Perl port and CPAN package Matti Lattu, <matti@lattu.biz>

The conversion formulae have been acquired from a Python module from Olli Lammi http://olammi.iki.fi/sw/fetch_map/.

ACKNOWLEDGEMENTS

The Perl realization follows closely Geo::Coordinates::KKJ by Josep Roca.

Thanks for GIS specialist PhD Tuuli Toivonen (University of Helsinki) for her essential support.

LICENSE AND COPYRIGHT

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.

Copyright (C) 2010-2011 Olli Lammi and Matti Lattu