4 ms·
Single precision floats loose precision as coordinates get larger, hence "floating" point precision. Point cloud data often consists of outdoor/aerial scans cov
by mschuetz 8y ago
Single precision floats loose precision as coordinates get larger, hence "floating" point precision. Point cloud data often consists of outdoor/aerial scans covering multiple kilometers and floats cannot accurately represent large coordinate values like that. Translating to origin and/or rescaling only works to a limited extent and isn't a very robust solution.
Integers on the other hand can be used to represent coordinates in a fixed precision. E.g. if you want to store coordinates in milimeter precision, you multiply your double precision meter coordinates by 1000, and then cast the resulting coordinate to 32 bit integers.
> If it's precision you're worried about,you're going to lose the precision as soon as you convert it from an int to a float to use.
Yes, that is why you convert ints to doubles for processing and only use floats for tasks where limited accuracy is okay, e.g. rendering.
- maccard 8y ago> Single precision floats loose precision as coordinates get larger, hence "floating" point precision. I've plenty of experience with floating point numbers. > Translating to origin and/or rescaling only works to a limited extent and isn't a very robust solution. Curious as to why you think this isn't the solution? double precision just kicks the can farther down the line, whereas a fixed point offset origin gives you the "best" of both (albeit with slightly more code) > Yes, that is why you convert ints to doubles for processing and only use floats for tasks where limited accuracy is okay, e.g. rendering. Right, so you store as 32 bit values, and do the processing in double precision, but convert to single precision for rendering (from double precision)? So you were never going to store them as float on disk.
- olliej 8y agoPresumably they don’t think that’s the problem because doubles already exceed the precision of the integer types they’re using. I do get this decision - point cloud data for scanned geography tends to be uniformly separated over a large area, a 32 bit float very rapidly starts to accrue significant error if the geometry is large. Presumably he olde fixed point arithmetic would be more precise (for this specific purpose) than a 32bit float (which has thrown away significant amounts of precision for the exponent). But again, 64bit float has 53bits of precision, which is larger than int32 that is in their data format. It’s also probably enough precision for more or less anything outside of extreme ends of science :)