[openstreetmap/openstreetmap-website] Avoid use of scientific notation in geocoder results (PR #4961)
Anton Khorev
notifications at github.com
Fri Jul 12 10:40:42 UTC 2024
@AntonKhorev requested changes 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
+
This one is going to fail with `TypeError: can't convert nil into BigDecimal`
```suggestion
##
# Test identification of integer lat/lon pairs using N/E with degrees
def test_identify_latlon_ne_d_int_deg
[
"N50° E14°"
].each do |code|
latlon_check code, 50, 14
end
end
```
[Used to work correctly](https://www.openstreetmap.org/search?query=N50%C2%B0%20E14%C2%B0)
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4961#pullrequestreview-2174425331
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4961/review/2174425331 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240712/cc4e6dcd/attachment.htm>
More information about the rails-dev
mailing list