1

I am currently working with performing a large-scale landscape analysis in R and I am running into the following problem.

I have this large elevation raster that I made by using the mosaic function in the raster package. I use raster files from the ASTER database. Each tile represents a one-degree by one-degree portion of the earth with an estimated raster resolution of 30m^2. I include the code that I used to mosaic them below, but I do not believe that it is the problem since I have successfully used the same code before.

Mosaic <- do.call(mosaic,c(list of rasters, tolerance = 1, fun=mean)

Once that is run, I get the following elevation tif. I have included a picture of it and a link to download the file for the purpose of providing materials that aid reproducibility.

Image of Elevation Raster

Link: https://drive.google.com/file/d/1yU_YDIqmCU-WqBUNftYiPPLpAzEMrQ8B/view?usp=sharing

Now, once I have the large raster file, I need to measure the topographic ruggedness of the raster and I use the terrain function in the raster package to do so. I use the Terrain Ruggedness Index as my method for measuring ruggedness

TRI <- terrain(Mosaic, opt="TRI")

This yields me the following raster.

TRI Raster

As you can see in this example, there are faint streaks in the map which I cannot explain. Due to the full extent of my study, I need to aggregate this raster to a coarser resolution. Therefore I use the aggregate function in the raster package as well.

TRI_Agg <- aggregate(TRI,fact = 255, fun = mean)

This yields the following raster. TRI Aggregate

Here you can see that the streaks are much more pronounced and fairly consistent throughout the whole map. I tried doing this with other study areas and the problem persisted (i.e this would happen with raster tiles all around the world). I can't explain why those streaks are occurring. I have attempted different ways of going about this which include doing a neighborhood analysis (to fill in missing values if any) and processing the tiles before mosaicking them together. None of these have worked.

4
  • 2
    You are observing some bias related to the photogrammetry processing. This not uncommon, particularly in deriving variance-like metrics. This is just the reality of uncertainty in spatial data. I would highly recommend resampling the source data and then derive metrics as, you are introducing even more error by resampling derivatives. You may want to check local distributions before using a mean. These are fairly locally skewed processes and the median would better represent the central tendency and improve results. Commented Jul 19, 2020 at 22:34
  • 1
    I am no expert in r but have been working with DEM models for a long time. Have a close look at your function documentation, one of them will be using a resampling method. By default many techniques are the fast method: nearest, max or min. As your data is striping as @JeffreyEvans says, changing your default resample method to something like bilinear, cubic etc.. can help smooth out the stripes. There is a very good answer gis.stackexchange.com/questions/10931/… that explains quite effectively the difference. Commented Jul 19, 2020 at 23:42
  • Jeffrey, I tried using the median as a function in the raster calculation and it did not seem to change anything for some reason. My question is, you mentioned that those processes are locally skewed. Would there be a reason for those streaks to appear on a global scale? Commented Jul 21, 2020 at 20:30
  • Michael, sorry for the delay in these responses. I just got back from the field and now can dedicate time to this. So I looked in the documentation and I found no indication of a default sampling method. The author of the package included the focal window analysis formula in his documentation (see below). Would you recommended resampling the raster with another time of sampling method? 'TRI <- focal(x, w=f, fun=function(x, ...) sum(abs(x[-5]-x[5]))/8, pad=TRUE, padValue=NA)' Commented Jul 21, 2020 at 20:38

0

Your Answer

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

Browse other questions tagged or ask your own question.