[GRASS-user] grass cell registration format

Hamish hamish_b at yahoo.com
Wed May 13 03:35:28 EDT 2009


Seb wrote:
> What type of registration do GRASS raster cells use? 

cell, not grid.
see  http://grass.osgeo.org/grass64/manuals/html64_user/rasterintro.html

> I'm trying to import several hundred rasters from GMT into GRASS,

old GMT binary grid or new NetCDF GMT binary grid?

> and the only way I managed to do it was by piping grd2xyz output
> through r.in.xyz,

did r.in.gdal not work? that should take care of the grid->cell
registration region adjustments for you. (hopefully)
does it segfault too?

> as the Wiki recommendation to use r.in.bin failed with segmentation
> fault (I think this is due to the GDAL packages in Debian sid,
> which cannot read the GMT grids because gdalinfo shows that same
> segfault).

weird, r.in.bin specifically does not use GDAL at all. did you convert
to an old style GMT grid before trying 'r.in.bin -h'?

was an earlier version of gdalinfo able to read it?
can gmt's grdinfo say anything about it?


> One of my concerns with the pipe I described is that grd2xyz's
> output corresponds to grid line registration, and I'm not sure this
> matches what GRASS uses.
> All of this happens in a lat/lon location.  Any tips would be
> appreciated. Thanks.

maybe the new XYZ import wiki page Markus just created can help?
it explains how to expand the region by half a cell outward to deal with
the different registration method. (see also the r.region module)
  http://grass.osgeo.org/wiki/Import_XYZ


but r.in.gdal should be the easy automatic way...


Hamish



      



More information about the grass-user mailing list