Ignore:
Timestamp:
Mar 26, 2007, 10:32:49 AM (14 years ago)
Author:
Nick Burch
Message:

Include 2+6 NGRs in the dump

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/perllib/NPEMap/GeoConverter.pm

    r461 r510  
    1717require Exporter;
    1818@ISA    = qw(Exporter);
    19 @EXPORT = qw(eastingNorthingToLatLong);
     19@EXPORT = qw(eastingNorthingToLatLong eastingNorthingToNGR);
    2020
    2121sub eastingNorthingToLatLong {
     
    3737}
    3838
     39sub eastingNorthingToNGR {
     40        my ($e,$n) = @_;
     41
     42        # Turn e+n into 2+6 NGR
     43        my $point = Geography::NationalGrid::GB->new( Easting=>$e, Northing=>$n );
     44        return $point->gridReference(100);
     45}
     46
    3947############################################################################
    4048
Note: See TracChangeset for help on using the changeset viewer.