Contours: Creating individual layers from DEM and cleaning them up.

3645
4
Jump to solution
07-15-2015 11:34 AM
bwanamukubwa
New Contributor II

Hello,

I'm trying to fabricate a model from wood of contour lines to look something like this: https://i.ytimg.com/vi/7w3yRp3Xqp8/hqdefault.jpg

I'd like to create individual files that have contour lines for each elevation such that i can use a laser cutter to make the individual layers to assemble the model.

My workflow so far is as follows in QGIS:

- Add raster layer from DEM

- Raster > Extraction > Contour to add the contours

- Vector > Data Mgmt Tools > Split Vector Layer

This gives me multiple files each one showing the contours per elevation.

My first issue is that the contours are jagged as shown in the picture attached and the second issue is i'd like to get rid of the really small contours to keep it simple.

So is there a way to 'smooth' the lines and set a 'tolerance' for minimum contour width or length for example?

Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
IanMurray
Frequent Contributor

Few thoughts on the matter from Stack Exchange.

QGIS contours smoothing and cleaning - Geographic Information Systems Stack Exchange

Also QGIS help for simplifying vectors.

17.29. Vector simplification and smoothing

I don't use QGIS at all, but I would agree with one of the posters there about resampling your raster down a little, it can help smooth out the data a fair bit and make it more aesthetically pleasing.  To remove small contours, you could calculate the length of each contour then determine what your threshold length is and remove those under the threshold.  What resolution DEM are you working with and what contour intervals are you trying to generate?

View solution in original post

4 Replies
IanMurray
Frequent Contributor

Few thoughts on the matter from Stack Exchange.

QGIS contours smoothing and cleaning - Geographic Information Systems Stack Exchange

Also QGIS help for simplifying vectors.

17.29. Vector simplification and smoothing

I don't use QGIS at all, but I would agree with one of the posters there about resampling your raster down a little, it can help smooth out the data a fair bit and make it more aesthetically pleasing.  To remove small contours, you could calculate the length of each contour then determine what your threshold length is and remove those under the threshold.  What resolution DEM are you working with and what contour intervals are you trying to generate?

bwanamukubwa
New Contributor II

Capture.JPGThank you very much @Ian Murray, I really appreciate it. I used Focal Statistics in ArcMap to resample to 100x100 and then exported that as a .tif. I brought the new .tif into qgis and now it looks a lot more like what i was going for.

So thanks again!

IanMurray
Frequent Contributor

You are quite welcome, if you don't mind if this answered your question could you mark it as answered?

Mark a reply as the Correct Answer

0 Kudos
bwanamukubwa
New Contributor II

yes, thanks.

0 Kudos