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

Lauri Myllyvirta lauri.myllyvirta at greenpeace.org
Mon Feb 23 06:17:32 PST 2015


Perfect, thank you!

On Mon, Feb 23, 2015 at 3:15 PM, Moritz Lennert <
mlennert at club.worldonline.be> wrote:

> 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
>



-- 
Lauri Myllyvirta  (Mr.)
senior global campaigner, coal
Greenpeace
mobile +48 66 40 66 382 (Poland, primary)
mobile +86 157 1002 1563 (China)
skype laurimyllyvirta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20150223/31c3af53/attachment.html>


More information about the grass-user mailing list