2

I am trying to create contours from a DEM in QGIS 3.4. I used the GDAL raster extraction contour tool. The contours are drawn correctly, but they are mirrored along the north line of the DEM (see image). Is there a setting that I missed when generating the contours? Both the CRS of the DEM and the CRS of the project are UTM NAD83 Zone 10 North. enter image description here

Here is the output log:

Processing algorithm… Algorithm 'Contour' starting… Input parameters: { 'BAND' : 1, 'CREATE_3D' : False, 'FIELD_NAME' : 'ELEV', 'IGNORE_NODATA' : False, 'INPUT' : 'C:/Users/talldrin/Documents/Northstar/18-057 Cal Park Lakes/Support Docs/Lidar/Merged_DEM.ovr', 'INTERVAL' : 1, 'NODATA' : None, 'OFFSET' : 0, 'OPTIONS' : '', 'OUTPUT' : 'C:/Users/talldrin/AppData/Local/Temp/processing_a23c4b552e994e69b31a00e2657e2022/378e907d22c44a6f9c1389afc43c00ec/OUTPUT.shp' }

GDAL command: gdal_contour -b 1 -a ELEV -i 1.0 -f "ESRI Shapefile" "C:/Users/talldrin/Documents/Northstar/18-057 Cal Park Lakes/Support Docs/Lidar/Merged_DEM.ovr" C:/Users/talldrin/AppData/Local/Temp/processing_a23c4b552e994e69b31a00e2657e2022/378e907d22c44a6f9c1389afc43c00ec/OUTPUT.shp GDAL command output: 0...10...20...30...40...50...60...70...80...90...100 - done.

Execution completed in 1.35 seconds Results: {'OUTPUT': }

Loading resulting layers Algorithm 'Contour' finished

2
  • 1
    Welcome to GIS.StackExchange @Tim Alldrin! Can you edit your post to include the output log of the Raster Information tool? Mar 9, 2019 at 0:58
  • what format is your original DEM in? Some formats handle the y axis differently resulting in flips/mirrors like this. See this question for a related example
    – Steven Kay
    Mar 9, 2019 at 8:30

1 Answer 1

3

Ok, so I figured it out. The DEM I was using was generated using ArcMap. When I brought it in to QGIS I had to assign the spatial reference and calculate the extent. For some reason the extent that it calculated had the NW corner of the DEM at 0,0 which resulted in the southern end of the DEM having negative coordinates. So I re-exported the DEM from ArcMap and brought it in to QGIS and reassigned the Spatial Reference and extent. This time the calculated extent was the same as the original DEM in ArcMap so all values were positive. After that the Contour tool ran fine. Thanks for your help!

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.