[GRASS-user] Help with creating bathymetric maps
Hamish
hamish_b at yahoo.com
Fri May 15 03:16:35 EDT 2009
Hi Alyre,
> I am trying to create a bathymetric map of a small pond. I have imported
> the depths and digitized the outline of the shore (0 depth contour). I
> believe in GRASS both would by default be in vector format and I need to
> transform them into raster and merge both files.
> I have successfully converted the shoreline into raster form but it
> appears as a solid area as if the whole polygon that enclosed the pond
> was transformed and not the outline.
what tool did you use. what parameters?
> What I need is to convert the outline of the polygon to a series of
> raster points and be able to define the spacing. The spacing of the 0
> contour points appears to me to be important as it will influence the
> interpolation of the contours when the transect depths are added.
depends on the technique used. e.g. v.surf.rst the quadtree resolution
is dependent on the the data density, but for r.surf.contour all cells
are equal.
> In addition I am not sure how to assign the additional attribute of
> depth (which would be zero) in the transformation process or how to
> add it afterwards.
v.to.rast use=['z' or attribute column containing z]
> From what I understand in GRASS, points are actually vectors
yes, i.e. they live in x,y,z space not in a grid array (which then floats
in x,y[,z] space somehwhere).
> but to do contours everything has to be in raster format.
well, the raster has to be the intermediary step anyway.
> So I assume I will have to convert the depths (x,y,z) into raster
> format as well then merge the two raster files (shore outline of
> zero depth with depth transects).
Right, with v.to.rast. Then merge the depth points with the contours
using r.patch (give the depth points precedence), and run r.surf.contour
to make the raster surface, then r.contour to make new interpolated
vector contours.
Be careful though, r.surf.contour is a very old module and it has some
long standing issues. One important one is that it still treats 0 as the
NULL value (holdover from GRASS 4) so will wipe out your shoreline data.
The other is that it only works in whole integer numbers. See the help
page for the workaround to both these problems (multiply by 100000 before
running it, set shoreline to 1 or -1, then after it's done divide by
100000 again. Hopefully one day this will be fixed...)
> I assume GRASS is widely used to do bathymetric maps,
well I can't speak for anyone else, but I've use it for that for years,
> a bit like elevation contours but with negative values.
exactly like elevation contours but with negative values.
> If anyone knows of a tutorial or step by step guidance at a
> beginner's level that would be most helpful.
have you looked at the GRASS book? I don't think it has any bathymetric
examples but the topographic ones should directly translate and be
written in a way understandable to a newcomer.
> The bathymetric map is only a support element of a large fish
> distribution study but is turning out to be much more difficult
> to achieve than expected.
keep trying, it's all possible!
to give exact answers to specific problems we need to know the details
of course.
a mini-tutorial would certainly be a nice addition for the wiki site.
if you get it all working would you like to contribute that?
you might also check out the r.surf.nnbathy addon module from the Wiki
addons site. Or you can use the nnbathy tool directly from your vector
points to make a raster grid*. See: http://code.google.com/p/nn-c/
It's specifically designed for interpolating bathymetric data.
[*] which you can then make contour lines from.
Hamish
More information about the grass-user
mailing list