2

I've generated a raster DEM in ACADCIVIL in TIFF format: name.tif & name.tif.aux.xml. ArcGIS reads the data correctly but QGIS sets the whole data to the same value = minimum height Looks that QGIS 3.4 doesn't support this format. Same happens on 2.18

gdalinfo output:

Driver: GTiff/GeoTIFF
Files: Surface1.tif
       Surface1.tif.aux.xml
Size is 405, 528
Coordinate System is:
LOCAL_CS["POSGAR_07_F5",
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (5512262.832999999634922,6109047.309000000357628)
Pixel Size = (1.000000000000000,-1.000000000000000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_SOFTWARE=Autodesk Civil3D 2008
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( 5512262.833, 6109047.309) 
Lower Left  ( 5512262.833, 6108519.309) 
Upper Right ( 5512667.833, 6109047.309) 
Lower Right ( 5512667.833, 6108519.309) 
Center      ( 5512465.333, 6108783.309) 
Band 1 Block=405x100 Type=Float32, ColorInterp=Gray
  Min=38.088 Max=39.473 
  Minimum=38.088, Maximum=39.473, Mean=38.565, StdDev=0.301
  NoData Value=3.4028234663852886e+38
  Offset: 38.082,   Scale:0
  Metadata:
    STATISTICS_COVARIANCES=9.08270199017587E-02
    STATISTICS_MAXIMUM=39.473079681396
    STATISTICS_MEAN=38.564526756118
    STATISTICS_MINIMUM=38.088008880615
    STATISTICS_STDDEV=0.30137388124225
    STATISTICS_VALID_PERCENT=52.86

I've changed scale to 1 --> same result File Properties --> Info Band

Number Band No-Data Min Max 1 Band 1 3.40282e+38 n/a n/a

  • Run gdalinfo for your DEM file and add the report into your question. – user30184 Jan 20 at 22:41
  • QGIS reads all GDAL raster formats, GeoTIFF file format included. It seems to me rather a problem of installation of GDAL. A screenshot of the QGIS About window, and the Information tab of the layer Properties could also be useful. – Gabriel De Luca Jan 20 at 22:52
  • Offset and Scale parameters can be the problem? – Gabriel De Luca Jan 21 at 0:04
  • Offset is a fixed value added to all the cell values, it should be 0. Scale is a multiplying factor for all cell values, it should be 1. gdal_translate -a_offset 0 -a_scale 1 Surface1.tif somefilename.tif don't solve the issue? – Gabriel De Luca Jan 21 at 0:37
  • Even if I a edit the surface1.tif.aux.xml the data isn't considered, so this file isn't read at all, it's just readable user info. After executing your command everything works as expected. So we have to blame Autodesk on this. I'll keep your command to fix future DEMs generated by ACAD. Thanks a lot buddy – Werner Horsch Jan 21 at 0:55
1

Everything looks fine in the GeoTIFF file info, except the Offset and Scale values.

Offset is a fixed value added to all the cell values, it should be 0.
Scale is a multiplying factor for all cell values, it should be 1.

Therefore, you need to make a translate:

gdal_translate -a_offset 0 -a_scale 1 Surface1.tif somefilename.tif

QGIS can now correctly represent the generated file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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