The size of the pixels in the geo TIFF is slightly different from the size set during rasterization

Feel free to ask any question here
Post Reply
Rabbit-SK
Posts: 1
Joined: Fri Apr 22, 2022 9:54 am

The size of the pixels in the geo TIFF is slightly different from the size set during rasterization

Post by Rabbit-SK »

Hi everybody!

How can I achieve a pixel size of exactly 0.1 meter?

Cloud Copmare - Rasterize:
Image

QGIS - Layer Properties:
Note that the pixel size is not 0,1 but 0,1000000000000000056.
Image

Thanks for the recommendations.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: The size of the pixels in the geo TIFF is slightly different from the size set during rasterization

Post by daniel »

I don't think you will get any better, since it's the standard way of representing a floating point value for a computer (see https://en.wikipedia.org/wiki/IEEE_754).

Whatever the number you try to represent, even with 64bits or 128bits if you could, there will always be a small approximation due to the limited number of possibilities. Here it's probably a 'double' (64bits) representation, and therefore you get a small 'epsilon' approximation, smaller than 1e-16 which is consistent with the standard.
Daniel, CloudCompare admin
Post Reply