I'm attempting a simple slope analysis in QGIS2 using the plugin at Raster -> Terrain Analysis -> Slope. The slope output layer has a very strange histogram, basically spikes at 0 and at 89.9098 with one big valley in the middle:
Here's the initial DEM:
And the resulting slope layer (note that Contrast Enhancement is already at 'stretch to minmax'):
The place I got the DEM is the NED. I tried the gridfloat format, and the arcgrid format, and the IMG format. I downloaded from nationalmap and also from atlas.ca.gov - all seem to have the same resulting histogram.
The procedure I used to make the slope layer was Raster -> Terrain Analysis -> Slope, GeoTIFF, Z factor = 1.0 (what does that do anyway?)
Seems like simple pilot error; however: I found this tutorial online (for QGIS 1.something) that comes with a sample DEM, and it worked just fine using the same procedure. So, it's not a fundamental QGIS2 bug.
So, it must be slightly more complex pilot error: there must be a conversion step or something I'm missing?
Answer
Interesting. I just did the same thing, with the same results. It turns out that QGIS assumes that the vertical units are the same as the CRS units.
My test image was unprojected Lat/Lon and I'm assuming yours is too? I reprojected the image to UTM (so units would be meters) and the slope calculation worked just fine.
To try this yourself, right-click on your DEM, go to Save As, and under CRS, set it to a meters-based projection (UTM should work fine.) Then try the slope calculation on your newly saved DEM.
EDIT: This will obviously only work if your data is actually in meters. If it's feet, choose a projection with feet as units.
No comments:
Post a Comment