[GRASS-user] XYZ Data (UTM32N) workflow to DEM and reprojection to Gauß Krüger 3

Hi list,

I'm trying to calculate a DEM out of my XYZ data. After the calculation I
need to transform the projection to EPSG: 31467. Does GRASS offer a good
workflow for this?

Danny

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/XYZ-Data-UTM32N-workflow-to-DEM-and-reprojection-to-Gau-Kruger-3-tp4974346.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On 14/05/12 10:42, Danny Luque Ramirez wrote:

Hi list,

I'm trying to calculate a DEM out of my XYZ data. After the calculation I
need to transform the projection to EPSG: 31467. Does GRASS offer a good
workflow for this?

Yes.

If you are unfamiliar with GRASS, you might want to start here:

http://grass.osgeo.org/intro/firsttime.php
http://grass.osgeo.org/grass64/manuals/html64_user/helptext.html
http://grass.osgeo.org/wiki/GRASS_Help#First_Day_Documentation (although I can't connect to the wiki currently)

More detailed info for your question here:

http://grass.fbk.eu/grass64/manuals/html64_user/rasterintro.html
http://grass.fbk.eu/grass64/manuals/html64_user/projectionintro.html

Two modules you might be specifically interested in:

import (depending on the exact format of your data): r.in.gdal, r.in.xyz, r.in.bin
reprojection: r.proj

In brief, you have to:

- create two locations, one with the original projection of your data and one in the 31467 projection

- import your data into the first location

- enter into the second location and reproject using r.proj

Moritz

Hi Moritz,

thx for the quick answer :slight_smile:

What about the calculation of a DEM from XYZ data? I didn't find a tool to
perfom this within GRASS.

cheers

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/XYZ-Data-UTM32N-workflow-to-DEM-and-reprojection-to-Gau-Kruger-3-tp4974346p4974424.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Hi Moritz,

thx for the quick answer :)

What about the calculation of a DEM from XYZ data? I didn't find a tool to
perfom this within GRASS.

v.surf.rst
http://grass.osgeo.org/grass64/manuals/html64_user/v.surf.rst.html

···
-- 
Micha Silver
052-3665918

On 14/05/12 15:28, Micha Silver wrote:

  On 14/05/2012 15:52, Danny Luque Ramirez wrote:

Hi Moritz,

thx for the quick answer :slight_smile:

What about the calculation of a DEM from XYZ data? I didn't find a tool to
perfom this within GRASS.

This depends a bit on the original form of you XYZ data: is it gridded, or just "randomly" located points ?

v.surf.rst
http://grass.osgeo.org/grass64/manuals/html64_user/v.surf.rst.html

Micha's solutions relies on importing your XYZ data as vector points, for example using v.in.ascii. The you can use any interpolation method, such as v.surf.rst, v.surf.idw, etc), to interpolate the data into a raster DEM.

r.in.xyz already does a form of interpolation as well, but not in such a sophisticated way: it takes XYZ ascii data and allows you to create a raster map with for each pixel a statistic based on the points that fall into that pixel. In your case the mean, the median or trimmed mean might be appropriate.

In both cases you have to carefully set your region (g.region) in order to get the raster you want in terms of pixel size and region extension.

Moritz

Hi,

just to add to what others have already said; it is better to
reproject to your target projection _before_ doing the
rasterization step, that way you avoid the generational loss
from r.proj. Try to import them directly as points into your
target location.

So methods could be:

xyz.txt -> v.in.ascii -> v.proj -> v.surf.rst
(for many millions of input points use the v.in.ascii -zbt flags)

or

xyz.txt -> m.proj (or cs2cs) -> r.in.xyz -> r.surf.nnbathy (addon)

r.in.xyz is very good at creating DEM cells at points with known
data, but it does not do any interpolation, you need the
r.surf.nnbathy module (or another r.surf.* or v.surf.* module)
to fill in the gaps.

good luck,
Hamish