[GRASS-user] square buffeer

Jonathan Aguero-Valverde jua130 at psu.edu
Mon Jun 16 11:10:06 EDT 2008


Martin,
I think using vectors and some scripting will be the way to go here.

A simple script should be something like this:
1. create a new polygon vector with v.edit
2. for each point in your points vector get the x and y coords  (v.to.db or 
maybe v.report)
3. calculate the vertices of your polygon based on the x and y coords.
4. Add new feature with v.edit
5. add vertices to feature with v.edit.
6. repeat for each point in points vector layer.

You can also use postgres/postgis functions and create the layer in postgis, 
you won’t need a script but you have to learn some about postgis.

Hope this helps.

Jonathan Aguero-Valverde
PhD. Candidate
The Thomas D. Larson
Pennsylvania Transportation Institute
The Pennsylvania State University

----- Original Message ----- 
From: "Martin Wegmann" <wegmann at biozentrum.uni-wuerzburg.de>
To: <grass-user at lists.osgeo.org>
Sent: Monday, June 16, 2008 10:18 AM
Subject: [GRASS-user] square buffeer


> 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 at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
> 



More information about the grass-user mailing list