First a note about previous data processing. My original data (from a LIDAR scan) is a text .asc file with the internal structure looking like this:


I can't import the data directly to QGIS as it doesn't recognize the format. So I used CloudCompare to convert the point cloud data to a DEM tiff image, available here: uncompressed smarna.tiff (69 MB) or compressed smarna.7z (10 MB).

When I import the generated tiff image in QGIS it correctly renders the shaded elevation profile, and can even render as contours using "Symbology -> Band Rendering -> Contours" in the layer properties.

However, when I try to generate a contour layer with "Raster -> Extract -> Contour", the resulting contours layer is empty. This is the log output of the contour tool:

QGIS version: 3.22.2-Białowieża
QGIS code revision: 1601ec46d0
Qt version: 5.15.2
Python version: 3.9.5
GDAL version: 3.4.0
GEOS version: 3.10.0-CAPI-1.16.0
PROJ version: Rel. 8.2.0, November 1st, 2021
PDAL version: 2.3.0 (git-version: 9f35b7)
Algorithm started at: 2022-01-13T09:34:50
Algorithm 'Contour' starting…
Input parameters:
{ 'BAND' : 1, 'CREATE_3D' : False, 'EXTRA' : '', 'FIELD_NAME' : 'ELEV', 'IGNORE_NODATA' : False, 'INPUT' : 'C:/Users/shrx/Documents/smarna.tif', 'INTERVAL' : 10, 'NODATA' : None, 'OFFSET' : 0, 'OUTPUT' : 'TEMPORARY_OUTPUT' }

GDAL command:
gdal_contour -b 1 -a ELEV -i 10.0 -f "GPKG" C:/Users/shrx/Documents/smarna.tif C:/Users/shrx/AppData/Local/Temp/processing_cTjhKy/c4de41f5a33347bb9197b9f6886eec54/OUTPUT.gpkg
GDAL command output:
0...10...20...30...40...50...60...70...80...90...100 - done.
Process completed successfully
Execution completed in 1.47 seconds
{'OUTPUT': 'C:/Users/shrx/AppData/Local/Temp/processing_cTjhKy/c4de41f5a33347bb9197b9f6886eec54/OUTPUT.gpkg'}

Loading resulting layers
Algorithm 'Contour' finished

The layer information shows that the generated contour file for 10 m elevation interval is ~5 MB large and has 1439 "features", however no contour lines are visible in QGIS.

Here is the generated contour file: uncompressed OUTPUT.gpkg (5 MB) or compressed OUTPUT.7z (1 kB).

  • @BERA EPSG:3912 - MGI 1901 / Slovene National Grid.
    – shrx
    Jan 13, 2022 at 8:58
  • @BERA can I convert the DEM file to a different CRS? Which one should I try?
    – shrx
    Jan 13, 2022 at 9:26

1 Answer 1


I downloaded your contour geopackage. Open it with QGIS, right click the layer -> Layer CRS -> Set Layer CRS -> Search for "3912" -> OK

Your contour lines should be where you want them

enter image description here

  • 2
    Thank you, it looks that the issue is that the generated layer does not have a CRS set. When I set the CRS of the generated contour layer to EPSG:3912 the contours show up as well.
    – shrx
    Jan 13, 2022 at 10:02

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.