<p dir="auto">This <span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #4950.">fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2391374224" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/4950" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/4950/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/4950">#4950</a> by modifying the geocoder to avoid printing results in scientific notation.</p>
<p dir="auto">The main fix is simply to avoid converting the user entered string to numeric format and back but for DMS style inputs we need to convert them to numeric form so we can do calculations so we use bigdecimal rather than float as it can force fixed precision format when converting to a string.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/4961'>https://github.com/openstreetmap/openstreetmap-website/pull/4961</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4961/commits/d225f2b98e5ddd67b53393e934e7968c544a07cb" class="commit-link">d225f2b</a>  Preserve lat and lon values as entered for reverse searches</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4961/commits/aa438ba1ad0de8f65b9e0ed9ec38c1cd8f5a7e76" class="commit-link">aa438ba</a>  Use named captures to simplify latlon parsing</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4961/commits/4e4f757e42ae5f665e76c18402df0091d05b946b" class="commit-link">4e4f757</a>  Use bigdecimal to avoid scientfic notation in DMS decoding</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4961/files">3 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4961/files#diff-29beaabe278fd17493296745cecb67919f0906b47b8246ab770f5517615d9ef7">.rubocop_todo.yml</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4961/files#diff-bf845b955a0aeb626484399330d9c39183e734c9a56a3900e71fa48b0da47f81">app/controllers/geocoder_controller.rb</a>
    (79)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4961/files#diff-1453e8dc6e5e9eca02ad81af68bc85fdaab1cd0d9a02e7927a1a46d06bc204ca">test/controllers/geocoder_controller_test.rb</a>
    (8)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4961.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/4961.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4961.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/4961.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4961">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPRCSJRCBJOZHR6YFLZLFDZRAVCNFSM6AAAAABKPMSZMCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4TIMBXGE3TMNQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLOXUSYUTBLISM7TBMDZLFDZRA5CNFSM6AAAAABKPMSZMCWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHI5MVC2Y.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4961</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4961",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4961",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>