Bug report #19464

QGIS Incorrectly Interpreting Binary Terrain Horizontal Units

Added by Patrick Doudy over 5 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Metadata
Affected QGIS version:3.2 Regression?:No
Operating System:Mac OSX High Sierra 10.13.4 Easy fix?:No
Pull Request or Patch supplied:No Resolution:up/downstream
Crashes QGIS or corrupts data:No Copied to github as #:27292

Description

I'm working with Binary Terrain 1.3 Format files, which are marked in horizontal units of meters. When I import these files as new raster layers, QGIS reports the units as "degrees". This is visible when I look at the layer information and when I try to use the ruler tool.

Hex of the header of the BT file in question (padding excluded):

6269 6e74 6572 7231 2e33 fa00 0000 fa00
0000 0400 0100 0100 0000 b618 ae47 1f05
343e 2041 ae47 e1fa 2740 2041 f628 0000
e5ca 5341 f608 0080 23cb 5341

The two bytes at offset 22 have the value "1" which labels the horizontal units as meters according to the format specification: http://vterrain.org/Implementation/Formats/BT.html

Layer information reported by Q:

Original
test1_CHM
Name
test1_CHM
Source
/Users/patdoudy/lidar/c/las_tiles/chmtesting/CanopyHeightModels/test1_CHM.bt
Provider
gdal
CRS
EPSG:4326 - WGS 84 - Geographic
Extent
532250.0100042724516243,5188500.0000097658485174 : 532499.9899999999906868,5188750.0000021364539862
Unit
  • degrees ***
    Width
    250
    Height
    250
    Data type
    Float32 - Thirty two bit floating point
    GDAL Driver Description
    BT
    GDAL Driver Metadata
    VTP .bt (Binary Terrain) 1.3 Format
    Dataset Description
    /Users/patdoudy/lidar/c/las_tiles/chmtesting/CanopyHeightModels/test1_CHM.bt
    Compression

Band 1
STATISTICS_MAXIMUM=46.9140625
STATISTICS_MEAN=13.063336785307
STATISTICS_MINIMUM=0
STATISTICS_STDDEV=12.229488608039
More information

Dimensions
X: 250 Y: 250 Bands: 1
Origin
532250,5.18875e+6
Pixel Size
0.99992,-1

test1_CHM.bt - BT file labeled with horizontal units of meters (244 KB) Patrick Doudy, 2018-07-22 08:51 PM

Screen Shot 2018-07-22 at 12.44.27 PM.png - Image of QGIS reporting units as degrees (100 KB) Patrick Doudy, 2018-07-22 08:52 PM

History

#1 Updated by Nyall Dawson over 5 years ago

  • Status changed from Open to Feedback

This is likely a bug in the underlying gdal library. Try running gdalinfo on the file and see if you get the expected results.

#2 Updated by Giovanni Manghi over 5 years ago

  • Resolution set to up/downstream
  • Status changed from Feedback to Closed

Closing for lack of feedback.

Also available in: Atom PDF