[GRASS-user] Importing xyz raster with corner coordinates?

Moritz Lennert mlennert at club.worldonline.be
Mon Feb 23 06:15:05 PST 2015


On 23/02/15 14:48, Lauri Myllyvirta wrote:
> Hello,
>
> I need to import a set of raster data in ASCII xyz format, with the
> coordinates referring to the southwest corner of the grid cell rather
> than the center as is the convention. I can think of a number of clumsy
> ways to solve the problem by scripting, either involving importing the
> raster first with an incorrect region definition, or by batch editing
> the text files, but am wondering if there is an elegant way to do this.
> For example, adding a simple +(resolution / 2) offset to both the lat
> and lon coordinates would do. I already tested and simply using the
> correct region definition and hoping that the data falls into the
> correct grid cells does not work.

How about r.region (not g.region) with something like:

r.region YourMap n=n+[res*0.5] etc

?

Moritz


More information about the grass-user mailing list