Live data from Hacker News

The lat/lon floating point delusion

datafix.com.au

41–50 of 154 posts

Re: The lat/lon floating point delusion

#41

On the flip side - who cares? It's just a question of shunting data around - ok someone could add a format specifier somewhere and it would be neater. But there's no particular harm in it either.

From a graphic design/UX perspective, it looks subjectively worse for no benefit. As a developer, I would happily do the 5 minutes of work to determine how many digits were appropriate and display only those digits to minimize the visual noise.

Re: The lat/lon floating point delusion

#42
post #36
post #2

Did the author think about the implementation? If we assign semantic meaning to the number of decimal points, now we also need to store the number of significant digits side by side with the actual number. We shouldn't round off internally because we might use it in as an intermediate result in a calculation.

I would consider storing (as part of the database) or defining (as part of the display code) the number of significant digits for coordinates part of good GIS design.

It would be nice to see a cloud of possibility around the map marker, similar to how your own "I am here" dot has when your phone doesn't have a good fix.

Re: The lat/lon floating point delusion

#43
post #39

It doesn't matter how precise the value is, as long as it's precise enough for your use-case and as long as machines are handling it. If the value is displayed in a UI and it's rounded off to a reasonable decimal there, I don't see the point why you would get so worked up about it. I'm sure my thermostat internal temperature representation is way more precise than the 0.5 degrees precision it's showing on the display…

As the article discusses, much (though not all) of the issue he has is with the display value in UIs or published data.

Re: The lat/lon floating point delusion

#44
post #21

Does anyone here know what's the actual precision that we can get by the available equipment?

Survey-grade GPS (using CORS and WAAS correction) using RTK will give you accuracy to ~10 cm within a few seconds. You can get that down to several millimetres if you can tolerate post-processing several hours worth of static data.

Re: The lat/lon floating point delusion

#45

Yes, why don't people spend their time doing the extra work to figure out the exact number of meaningful digits in their measurements when the defaults work just fine for their non-scientific, non-metrological purposes? A mystery for the ages.

Significant-digits seem like schoolroom drudgery until, one day, there is enlightenment.

Re: The lat/lon floating point delusion

#46
post #29
post #14

The author also ignores the fact that the distance associated with a degree of longitude changes dramatically as you go from the equator (69m/111km) to the poles (0) - roughly as a cosine. So the number of decimal places of longitude should shrink as you get further from the equator. https://www.thoughtco.com/degree-of-latitude-and-longitude-d... "At 40 degrees north or south, the distance between a degree of longitu…

Err, no, that fact is in the article.

Went back and re-read, still not seeing it there.

It is described in the linked wikipedia article, though: https://en.wikipedia.org/wiki/Decimal_degrees, so it isn't completely ignored by the author.

Re: The lat/lon floating point delusion

#47
post #21

Does anyone here know what's the actual precision that we can get by the available equipment?

Survey-grade GPS (using CORS and WAAS correction) using RTK will give you accuracy to ~10 cm within a few seconds. You can get that down to several millimetres if you can tolerate post-processing several hours worth of static data.

Is accuracy at that level actually possible with GPS? Precision seems likely, but it is substantially more difficult to provide absolute accuracy at that level.

Re: The lat/lon floating point delusion

#48
> Popping those long coordinates into Google Earth, it looks like the georeferencing puts the point somewhere on ILI's back wall

Perhaps the Google Earth image is "wrong". Stitching aerial and satellite images together and aligning every pixel to the exact geo-location isn't as simple as it sounds -- especially given that the ground shifts over time.

Re: The lat/lon floating point delusion

#49
post #48

> Popping those long coordinates into Google Earth, it looks like the georeferencing puts the point somewhere on ILI's back wall Perhaps the Google Earth image is "wrong". Stitching aerial and satellite images together and aligning every pixel to the exact geo-location isn't as simple as it sounds -- especially given that the ground shifts over time.

And that the aerial images have perspective and optical distortion to deconvolve.

Re: The lat/lon floating point delusion

#50

Yes, why don't people spend their time doing the extra work to figure out the exact number of meaningful digits in their measurements when the defaults work just fine for their non-scientific, non-metrological purposes? A mystery for the ages.

Me, I tend to just assume others have had the same talk in year 8 or whatever about accuracy vs. precision.
Post reply on HN