hello,
because doing it by hand or with already existing GRASS commands ist too
tedious, Elshad Shirinov programmed a small module for me which fullfills
this purpose.
The problem was, that coordinates which has been taken from a corner or center
of a sampling plot represent in fact a 50x50m or 50x200m plot/transect.
This module (r.buffer.rect) creates an area around the coordinate with defined
x and y side length and with defined position of the input coordinate.
e.g.: you sampled a 50x50m plot but you took the coordinate (x) of the
bottom-right corner, hence you need the actual area of your plot (1), that is
what r.buffer.rect does:
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 x
hope this module will help other people as well, Martin
P.S.: I will add it to the GRASS add-on Wiki in the near future, when we
setup the *.html manual page.
Usage:
r.buffer.rect input=string output=string keyval=value x=value y=value
alignment=string [title="phrase"] [--overwrite] [--verbose] [--quiet]
Flags:
--o Allow output files to overwrite existing files
--v Verbose module output
--q Quiet module output
Parameters:
input Name of existing raster file
output Name for the output raster file
keyval Value of relevant pixels in the input raster
x Width of the area
y Height of the area
alignment Alignment of the pixel relative to the rectangle
options: center,top-left,top-right,bottom-left,bottom-right
title Title of the output raster file
On Montag, 16. Juni 2008 16:18:49 Martin Wegmann wrote:
Hello,
I am looking for a way to create a square buffer for a point vector so that
each point is in the end the centroid of a square with defined side length.
I though about r.mapcalc statements to grow north-south and west-east and
then somehow create an area from this square. But I have no idea how to do
it without a lot of hand-work.
Any idea how to achieve that? Or hints where to find relevant documents.
Martin
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
(attachments)
main.c (6.12 KB)
Makefile (176 Bytes)
buffer.c (985 Bytes)
local_proto.h (355 Bytes)