0

I am trying to use the IDW interpolation tool in QGIS to change the pixel size of my starting geotiff of 0.1 decimal degrees to 0.05 decimal degrees. First I used "Raster pixels to points" on the initial geotiff to change the layer to a vector layer. Then I used IDW interpolation on the vector layer with the same extent and a distance coefficient of 3.5 and specified a 0.05 pixel size. But then when I executed the interpolation , the pixel size was a little bit smaller (0.04977375600000000233,-0.04972375700000000037) and there is one extra row and column in the dimensions.

Starting file:

Starting file

Vector layer after raster pixels to points:

enter image description here

End result after IDW Interpolation with pixel size 0.05 and distance coefficient of 3.5:

enter image description here

enter image description here

If I reduce the rows and columns by one I get a slightly closer to 0.05 pixel size result but still not the same:

enter image description here

enter image description here

Can someone explain why this tool is behaving like this? With this extent and pixel size it should be outputing exaclty a raster layer with a dimensions of 220 and 180 and a pixel size of 0.05 decimal degrees.

1 Answer 1

0

The source is not exactly 0.1 either... and the output is about 1/2 of it.

By a forcing a pixel size 10^-18 smaller than the original but keeping the same extent, an extra pixel is required.

As you did, keeping the same number of row/column is the way to go and the pixel size was properly computed.

If those decimals bother you, you could resample the original raster to 0.1, but the extent will change. Let's note that the displayed extent is likely being rounded.

Otherwise, let's just consider that two locations 10^-18 degrees away from each other can be considered as being equal (we are at the molecular scale)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.