diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-02-20 14:50:47 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2015-02-20 16:39:56 +0000 |
commit | c79b9b54210cc5483bed03783417fbeb6ed422cb (patch) | |
tree | 587cb3eba33f205a0bbe1f5ba3b6bc34bb59c6ed /perllib/Utils.pm | |
parent | 2e6b053a4b40876b200ccaa5e800168b097a7046 (diff) |
[UK] Output NI grid references to NI councils.
Diffstat (limited to 'perllib/Utils.pm')
-rw-r--r-- | perllib/Utils.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perllib/Utils.pm b/perllib/Utils.pm index 87e0bd7c9..243b98800 100644 --- a/perllib/Utils.pm +++ b/perllib/Utils.pm @@ -25,12 +25,13 @@ Takes the WGS84 latitude and longitude and returns OSGB36 easting and northing. =cut sub convert_latlon_to_en { - my ( $latitude, $longitude ) = @_; + my ( $latitude, $longitude, $coordsyst ) = @_; + $coordsyst ||= 'G'; local $SIG{__WARN__} = sub { die $_[0] }; my ( $easting, $northing ) = mySociety::Locale::in_gb_locale { - mySociety::GeoUtil::wgs84_to_national_grid( $latitude, $longitude, 'G' ); + mySociety::GeoUtil::wgs84_to_national_grid( $latitude, $longitude, $coordsyst ); }; return ( $easting, $northing ); |