[GRASS-dev] Re: [GRASS-user] flip raster

Glynn Clements glynn at gclements.plus.com
Wed Dec 3 20:09:35 EST 2008


[CC'd to grass-dev.]

beakins wrote:

> One question that I have: "Is there another file format for the ETOPO1 grids
> that would be of more use to the GRASS community than netcdf?" We could host
> something such as geotiffs of the grids, which we can create easily, but I'm
> not a GRASS user so don't know what grid/raster file format would be easiest
> to import into GRASS. I've also never used QGIS.
> 
> Any ideas or suggestions would be much appreciated.

GRASS' preferred raster format is anything which GDAL supports, and
for which GetGeoTransform() succeeds, with the adfTransform[] array
satisfying the constraints:

	adfTransform[1] > 0
	adfTransform[2] == 0
	adfTransform[4] == 0
	adfTransform[5] < 0

[Currently, r.in.gdal/r.external don't bother to check
adfTransform[1]; if it's negative, GRASS may import it okay, but then
refuse to read it.]

IOW, north-to-south, west-to-east, no rotation or shear. If the data
uses a different orientation, GDAL needs to be able to transform it
itself. It isn't a major problem if the georeferencing data isn't
readily available, but a different orientation is (at present).

Ultimately, we could make some changes to support flipped (but not
rotated) rasters, but the format would ideally need to be such that
there isn't a penalty for reading data north-to-south, i.e. any
south-to-north data would need to be in a format which supports
non-sequential access (seeking).

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list