[QGIS-trac] Re: [Quantum GIS] #2444: Discrepancy between gdalinfo
and QGIS raster metadata
Quantum GIS
qgis at qgis.org
Mon Feb 15 11:07:32 EST 2010
#2444: Discrepancy between gdalinfo and QGIS raster metadata
-----------------------------------------------------+----------------------
Reporter: alobo | Owner: nobody
Type: bug | Status: new
Priority: major: does not work as expected | Milestone: Version 1.5.0
Component: Rasters | Version: HEAD
Resolution: | Keywords:
Platform_version: | Platform: Debian
Must_fix: No | Status_info: 1
-----------------------------------------------------+----------------------
Comment (by rbivand):
Replying to [comment:5 rbivand]:
> Replying to [comment:2 mmassing]:
> > To summarize this more concisely, I think this is a bug in R (which
fails to handle general
> > coordinate systems), and probably can be worked around by reprojecting
the problematic file to a north-up orientation.
>
>
> No, in no way. The R rgdal package interfaces GDAL, and the GDAL driver
sees the file in exactly the same way. If the origin is NW, but the
resolution increment is positive, as here, any application using the
information GDAL has will behave in the same way. No jumping through hoops
here, the problem must be in QGIS and/or the plugin writing the file with
inappropriate parameters. I'm not planning to make any changes in the
R/GDAL interface to suit a very odd case. If the data were correctly saved
and described, GDAL would see them correctly. Maybe the GDAL driver might
accommodate oddities, but at out end, we can't make adjustments for one
application.
In addition, it appears that QGIS is doing things in
src/core/raster/qgsrasterlayer.cpp that perhaps use geoTransform values in
interpretative ways, like switching Ymin and Ymax from those declared in
the file. It would be better to declare them right initially, wouldn't it?
I cannot locate the offending interpolation tool or plugin to examine its
source code. Could someone tell me where it is?
My understanding is that QGIS knows that the raster is saved the wrong way
up, but uses VRT to display it correctly. In my opinion it simply should
be stored the right way up, which would remove the need for jumping
through hoops. I can consider adding a warning to rgdal raster reading to
indicate that flip() should be used in the imported raster object, but
there are limits to what is sensible.
--
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2444#comment:6>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list