[openstreetmap/openstreetmap-website] Avoid use of scientific notation in geocoder results (PR #4961)
Tom Hughes
notifications at github.com
Fri Jul 12 11:18:46 UTC 2024
@tomhughes commented on this pull request.
> @@ -223,6 +223,18 @@ def test_identify_latlon_sw_dms
end
end
+ ##
+ # Test identification of lat/lon pairs with values close to zero
+ def test_identify_latlon_close_to_zero
+ [
+ "0.0000123 -0.0000456",
+ "+0.0000123 -0.0000456",
+ "N 0° 0' 0.4428\", W 0° 0' 1.6416\""
+ ].each do |code|
+ latlon_check code, 0.0000123, -0.0000456
+ end
+ end
+
Ha that's effectively an old lurking bug - the first two regexps that are supposed to match the degrees only case but didn't allow the optional degree symbol while the rest of the regexps wrongly made everything after degrees optional so would over match.
All fixed now hopefuly...
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4961#discussion_r1675703997
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4961/review/2174492291 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240712/d9a89478/attachment.htm>
More information about the rails-dev
mailing list