#3578 closed defect (fixed)
BMP: Correct use of resolution information?
Reported by: | clundgren | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | GDAL_Raster | Version: | 1.7.2 |
Severity: | normal | Keywords: | BMP |
Cc: | gaopeng |
Description
A change was made to the BMP driver in r16706 to use the resolution information in the header as part of the geotransform.
I'll defer to your wisdom, but I thought I'd raise the point that this seems a bit odd to me. Isn't this information intended as display information rather than location information? Perhaps this would be better as metadata instead (similar to TIFFTAG_XRESOLUTION, for example)?
Also, if you do think it makes the most sense for this information to be represented through the geotransform, shouldn't the value be (1 / iXPelsPerMeter), since the geotransform should be capturing meters per pixel, not pixels per meter?
Change History (6)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Cc: | added |
---|---|
Keywords: | BMP added |
Status: | new → assigned |
Gao,
The referenced change (r17065) came from you guys. Can you comment on why it seems like an appropriate change?
comment:3 by , 9 years ago
The code that is referred in this ticket is still there in http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/bmp/bmpdataset.cpp.
As far as I understand that metadata in BMP format has nothing to do with geotransform nor the real world units/pixel an thus r17065 should be reverted.
http://www.digicamsoft.com/bmp/bmp.html
biXPelsPerMeter Specifies the horizontal resolution, in pixels per meter, of the target device for the bitmap. An application can use this value to select a bitmap from a resource group that best matches the characteristics of the current device.
On the other hand, who cares about BMP anyway when it comes to geospatial imagery?
comment:4 by , 9 years ago
This may be also a reason for the odd corner coordinates in this gis.stackexchange question http://gis.stackexchange.com/questions/127479/set-coordinate-origin-to-the-top-left-corner?noredirect=1#comment182794_127479
comment:5 by , 9 years ago
Milestone: | → 2.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Whoops, mentioned the wrong revision in the initial report. That should be r17065.