Opened 20 years ago

Last modified 20 years ago

#554 closed defect (later)

Units not carried over after a warp transform

Reported by: brian.marchand@… Owned by: warmerdam
Priority: high Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc:

Description

Certain elevation data sets such as SDTS files have z units in feet. This is 
correctly captured by the GetUnitType method of the GDALRasterBand class. 
However, after the transform the new GDALRasterBand objects do not have units 
set. Unless I’m doing something wrong, the units should be carried over or at 
least a SetUnitType method should be added.

Change History (1)

comment:1 by warmerdam, 20 years ago

Your quite right.  

There have been some recent changes to the GDAL VRT driver and it will now
capture units from source datasets.  That means a gdal_translate to VRT format
will retain the units (though gdalwarp still loses them in this case), but no
other format currently preserves the units type.  In fact, I think that SDTS
and VRT are the only formats with an implementation of raster units.  So even
if I were to add a SetUnitsType() method on the GDALRasterBand base class it
generally wouldn't help in any meaningful way.

I am going to leave mark this bug to be reviewed at a later date as there is
little I can practically do about the issue now.

 

Note: See TracTickets for help on using tickets.