I would like to create 20 meter contours for a large region, roughly 120,000 square kilometers. DEM data is available as TIFF or CSV throughout this region at 0.75 arc second resolution.

What tools should I use to create a coverage of 20 meter contours throughout this region? I am concerned that large file sizes will present a problem.

I have tried using the contour tool (Raster>Extraction>Contour). As well as the Contour Plugin which uses DEM point data as an input. I am running into trouble with large file sizes.

  • Welcome to gis.stackexchange! Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and - if applicable - code so far. For more info, you can check our faq.
    – underdark
    Dec 2, 2017 at 22:50
  • 1
    Thank you. I often find that evidence of past research only serves to limit the brevity of the question and/or beg a certain answer to it. I will edit my question to include what I have tried.
    – eyerah
    Dec 5, 2017 at 23:35

2 Answers 2


That should work using QGIS' contour tool (Raster -> Extraction -> Contour), with contours being interpolated where necessary.
This tutorial should cover the workflow in case you're new to this.

You could try and split your contours into multiple extracts, e.g. 5 layers with 100m intervals, consecutively starting every 20m (0 - 80m), if loading a single file is too slow (or reaches file size limits, depending on your output format). If the data is provided in a grid of connected files, don't merge them and extract the contours per file. This might cause jumps between contours at the layers' edges but lets you choose which layers to display

However, the amount of created features will indeed be massive and creating/using these layers within any GIS might be a large pain in the. Depending on your application, it might be worth considering to use a database like PostgreSQL/PostGIS to be able to query only those features necessary to work with (by bounding box or sth. similar).

I wrongly assumed the Contour tools' GUI would offer an offset option (wasn't it there in some versions?). QGIS uses the mighty GDAL under the hood for raster calculations, and here, the gdal_contour module in particular.
At the bottom of the GUI window you see the exact command that is executed. You can edit the command via the edit button: adding -off <offset_in_m_from_0> to the commands options will do the trick.

Alternatively you can run that command directly from your OS terminal/console (GDAL is shipped with your QGIS installation, look for the gdal_contour.exe and open your terminal there to be able to use it)

  • Thank you. Your answer (multiple shapefiles with 100 m intervals, but staggered starting contours) is a good solution to the problem of generating 20K contours over a large coverage. I am somewhat familiar with the contour tool you suggested, but I am not sure how to set the starting point for contours in this tool (e.g., 0-80 meters as you suggested above. The main window for the tool only seems to allow me to set the interval. I've decided on a solution to my problem. I will include it as an answer below.
    – eyerah
    Dec 5, 2017 at 23:59
  • 1
    @eyerah strange, I could have sworn there has been an offset option in the tools' GUI. for the sake of completeness I'll update my answer later to make that work.
    – geozelot
    Dec 6, 2017 at 9:48
  • 1
    @eyerah answer is updated, maybe comes in handy. with some little scripting you could easily batch extract your contours with arbitrary offsets.
    – geozelot
    Dec 7, 2017 at 9:43

Perhaps generating seamless 20K contours over such a large area is not necessary if the contours are only going to be used for static mapping of features at scales ~20k.

If this is the case, then the solution is to find a cartographically meaningful sub-unit and to clip the input DEM into smaller pieces. IF you are producing maps of fish bearing streams, for example, you might clip your DEM (and therefore contours) into the shape of smaller watersheds.

The steps for this answer then would be:

  1. Find a cartographically meaningful sub-unit to clip your contours to.
  2. Use shapefiles of these feature to clip your DEM into manageable units.
  3. Use these smaller DEM files as input into the Contour Tool (Raster>Extraction>Contour).

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.