Jump to content
TNG Community

LImit GEOCODE significant digits to 6


MadRanger

Recommended Posts

When I GEOCODE a new place name, the latitude generally returns 7-digits, while the longitude field too often auto-fills to 13-digits past the decimal. This is the result for Winnemucca, Humboldt, Nevada, USA when simply geocoding one place at a time

Single geocode.JPG

Below is  the result of bulk geocoding which appears to limit the length to 7-digits for both LAT and LON. Still, that is more than necessary (see Jay's accuracy implications farther below):

Bulk Geocode.JPG

In 2015 I asked for assistance on this topic and was offered a couple of options. In his reply, Jay offered that the the practical implication of the digits gives these measures of precision by decimal length:

  • 6= 10 centimeters =Your footprint, if you were standing on the toes of one foot.
  • 7= 1.0 centimeter =A watermelon seed.
  • 8= 1.0 millimeter =The width of paperclip wire.
  • 9= 0.1 millimeter =The width of a strand of hair.

Two suggestions that I did receive fixed the problem after the fact; I was hoping that the solution would be proactive - e.g., limit the data field to 6 decimal digits. Currently I address the excess digits every so often if I don't catch the excess immediately, while wishing I did not have to do so.

I recommend that a standard be set for those fields. Perhaps a start is to simply set the field length to 6 past the decimal: xxx.dddddd.

Regis

www.CarrFamilyTree.com

TNG v11

Edited by MadRanger
Inserted images
Link to comment
Share on other sites

jayat1familytree

Regis,

Like you I am also still "trimming" my places database table down to 6 decimals every 6 months or so. 

I would also suggest you post your request in the NEW Ideas Suggestions Forum category 

as that probably where Darrin looks when debating what code he can or can not add or modify.

Thanks for the reminder, hopefully this "squeaky wheel" will get fixed sooner rather than later

Jay

 

Link to comment
Share on other sites

Paul Barrett

It's a great point.   I see the exact same problem with my geocoded photo library where images taken at the back of the garden and on my driveway are separated,but are, for all practical purposes, 'my house.'  Other photo enthusiasts insist the precision that drives me nuts is essential 

So we might want to think about making this a configurable setting for the admin to set for the installation?  Checkboxes against these explanations (copied from above and supplemented) would be an excellent solution:

  • 3 = 100 metres? = The length of a sprint track?
  • 4 = 10 metres? = The length of a bus?
  • 5= 1 metre? = The length of your arm?
  • 6= 10 centimeters =Your footprint, if you were standing on the toes of one foot.
  • 7= 1.0 centimeter =A watermelon seed.
  • 8= 1.0 millimeter =The width of paperclip wire.
  • 9= 0.1 millimeter = The width of a strand of hair.
Link to comment
Share on other sites

  • 7 years later...

For my/the record, the Admin Places Geocode MOD by Robin Richmond has an option to limit the decimal digits that I found through serendipity.

image.png

Mod Options

  1. The number of decimal digits that latitude and longitude values will be rounded to.
    • This settings is a non-negative integer (where 0 means "do not round"), with a default of 5 decimal digits, which is accurate to about 10 meters.
    • This setting is used by several other mods that handle geocoodinates. See Related Mods

These mod options are custom TNG settings, defined and edited in a Mod Settings Block in the form at Admin>>Setup>>General Settings, in a new subform named Mod Settings Blocks. The Mod Settings Blocks mod is a prerequisite for the installation of this mod.

 

Edited by MadRanger
Added MOD Settings Blocks snippet
Link to comment
Share on other sites

  • 2 weeks later...

Would you want to just put a rounding function on the fields, like rounding to 6 decimals?

GOGGS

Link to comment
Share on other sites

  • 10 months later...

Goggs,

Rounding of the numbers would be a fair solution.

The Admin Places Geocode MOD by Robin seems to had been dropped for TNG v15.

Does anyone have a means to truncate the length of the Geocode decimal .

Regis

Link to comment
Share on other sites

For what it's worth, I ran into the excess digits problem many times working with Microsoft products - SQL Server, Excel, etc. What platform are you running TNG on, and are you using Google for the automatic geocoding?

When I geocoded Winnemucca, Humboldt, Nevada, USA, I got 

Lat 40.9728274

Lon -117.7357354

Anyway, if you want to know where to add a rounding formula, I can help with that...

 

GOGGS

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...