6

I have some 10 m digital elevation model rasters in UTM, and I need to generate 30 m resolution slope rasters in Albers.

Which should I do first: reproject the rasters, or calculate slope?

In case it matters, I am planning to use gdalwarp and gdaldem to do this.

5
  • 1
    i would reproject first
    – ziggy
    Commented Dec 22, 2016 at 18:52
  • What is the rationale? Commented Dec 22, 2016 at 20:08
  • 2
    as a general rule you should always have the correct datums and coordinates systems for your layers before you proceed with any type of geoprocessing
    – ziggy
    Commented Dec 23, 2016 at 4:22
  • 3
    I posted a discussion of this issue at gis.stackexchange.com/a/40464/664. Although it focuses on global projections, the points it makes apply to computing slopes for any raster data. If you are working in a small region and use a conformal projection designed for that region (which includes the UTM coordinate system when used appropriately), then you will be perfectly fine computing the slopes without further ado. Otherwise you need to be more careful and follow the procedures I outlined.
    – whuber
    Commented Dec 23, 2016 at 23:03
  • For "completeness" you could do both and then measure the difference between them. You could then propagate these statistics into your overall error estimation. It may not be practical to do this every time you wish to reproject a DEM and I understand you're looking for the "most widely applicable" method, but in your specific case it may tell you if it makes a significant difference or not
    – GeoMonkey
    Commented Sep 16, 2020 at 23:18

2 Answers 2

2

I am providing a word of caution for the other answer here by way of demonstration. I was given a DEM to perform some analysis on, and this DEM had a custom projection in feet. The next figure shows the difference in the computed slope without reprojection (left) and with reprojection (right).

enter image description here

You can see striping artifacts on the reprojected DEM's slope which don't appear in the original. I used a bilinear resampling scheme; perhaps cubic or higher order would reduce these effects. The scale bar is the same for both images too, showing that slopes are greatly overpredicted for the projected DEM. Note that you may have to provide a z-factor (or scaling factor) for computing slope if using WGS84.

I have also seen similar behavior with the National Elevation Dataset (10 m US DEM). I don't have a figure to show for slopes, but in that case I was trying to hydrologically process the DEM. Here's a before-after example for the drainage network (thresholded at some value):

enter image description here

It is likely these effects could be reduced by choosing better resampling schemes or projections, but it's important to be aware of them.

My approach has generally tended toward keeping the DEM in its original CRS and grid, performing needed analyses, then reprojecting the final result to the desired CRS. Sometimes this isn't possible, and it can definitely add more work, but I feel more confident that I'm avoiding the introduction of resampling/reprojection artifacts.

1

Reproject should be the first operation.

This will convert the data, and probably resize the pixels, so that any geometric operations that you would then do, would have values in reference to that Coordinate System.

If you ran Slope First, those value would be in the context of the source Coordinate System, and would not match with the values in the target Coordinate System.

3
  • 1
    As stated in such an unqualified manner, this answer looks incorrect. It is likely that UTM already is one of the best possible coordinate systems for computing slopes, assuming this raster does not lie outside its UTM zone. If the reprojection is into some other projection--especially a nonconformal one--then anybody following your advice will be getting worse results than otherwise.
    – whuber
    Commented Dec 23, 2016 at 23:07
  • @whuber, I'm interested in hearing more of your thoughts on this. One thing I was wondering about in posing my question is what relevant data might be lost through the resampling or interpolation necessary for reprojection. Is this considered to be an issue at all? I'd be interested in an answer that addresses both this issue and the conformal/nonconformal issue you mention here. You're more than welcome to provide an answer. Commented Dec 28, 2016 at 20:04
  • 2
    Resampling can be an issue. A thorough answer would take a long time to formulate. Maybe it would suffice here to remark that one should aim to minimize reprojections, but that usually a reprojection into a coordinate system that is suitable for one's analysis should be preferred. For instance, if your data were originally in a noticeably non-conformal projection (which you nevertheless needed to employ for other analyses), it would be wise to reproject to a conformal system, compute slopes, and project the results back. In your present case, it looks like no reprojection is needed.
    – whuber
    Commented Dec 28, 2016 at 20:11

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.