Subject: | fudge factor not really required |
the script introduces a fudge, see the code below, when converting from Lat/Long to GridRef.
However I dont think this sentiment is correct in the UK as National Grid References are by convention to the lower left corner.
my $fudge = $self->{'DefaultResolution'} / 2; # because the point is within
the _square_ based at the E,N coordinate
($self->{'Easting'}, $self->{'Northing'}) = ($E + $fudge, $N + $fudge);
(line 244,245 of the Geography\NationalGrid.pm)
changing it to
($self->{'Easting'}, $self->{'Northing'}) = ($E + 0.5, $N + 0.5);
seemed to do the trick! (0.5 is actually to account for rounding errors
because the module later uses int() to round the easting/northings)
The fact that it did this 'fudge' one way but not the other is slightly
worrying, meaning that the coordinates by this module arent reversible.
However its debateable if this 'feature' is an issue for your application.