0

The reprojection of a raster containing slope data from CRS:4326 to CRS:25830 resulted in a change in raster values. When I add the reprojected raster over the original one and use the identify features tool I can see that in some locations the values went from 0.25 to 3.

5
  • It would be much easier to say something if there was a small test dataset. But warping leads to rotation, scaling etc. and therefore the original pixels are almost always resampled into the target. The default resampling algorithm is "nearest neighbor" and it should not create new values but pick an existing one. If in the original any of the adjacent pixels has value 3 I think what you see is normal, the nearest pixel in the warped domain just was not the one that you thought. Resampling methods like average or cubic are almost guaranteed to change the pixel values.
    – user30184
    Jun 22 at 10:13
  • Thank you for elaborating on this, but I really do not understand what happens. I downloaded a slope map from the spanish government in ASC format, the only thing I did then is assign the missing CRS (UTM 30N). When I export the slope map without changing anything to a gtiff and open both files they match up perfectly. Also the range of values is exactly the same, but when I inspect the map with identify features tool, the values are totally different?
    – N_LLC
    Jun 22 at 10:22
  • How did you "assign the missing CRS"? You wrote "eprojection of a raster containing slope data from CRS:4326 to CRS:25830" so did you warp (pixels get reprojected) or did you assign 25830 into 4326 source data (pixels are not reprojected but the data has now wrong CRS metadata? Edit your question so that others can know what you did and do the same without asking more questions for clarification.
    – user30184
    Jun 22 at 10:29
  • I did the reprojection with warp (reproject). Then with the identify features tool they did not match up. Something else I tried is, assign crs and then export and they still do not have matching values.
    – N_LLC
    Jun 22 at 11:11
  • Warping is generally not reversible process at pixel level. In your example you (logically) warp once 4326->25830 and then 25830->4326. Even with NN resampling the result may well be the value of some pixel that is a neighbor of the original.
    – user30184
    Jun 22 at 11:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.