[GRASS-dev] v.perturb

Alessandro Samuel Rosa alessandrosamuel at yahoo.com.br
Thu Aug 28 05:55:19 PDT 2014

My objective is to perform a spatial simulated annealing schedule. It works as follows:

1) generate a set of n points randomly positioned in the study area (v.random);
2) query values from raster maps (r.what);
3) calculate an statistic;
4) randomly perturb one randomly selected point;
   - the point has to fall withing the study area;
5) go through 2-4 till the statistic meets a given criterion.

Ideally, v.perturb would do step 4: allow for perturbing a single point and check if it still falls inside the study area. If the point falls outside the study area, then it should be forced to the closest position within the study area.

Alessandro Samuel-Rosa 
Graduate School in Agronomy - Soil Science 
Federal Rural University of Rio de Janeiro 
Seropédica, Rio de Janeiro, Brazil 
Guest Researcher at ISRIC - World Soil Information 
Wageningen, the Netherlands 
Homepage: soil-scientist.net   Skype: alessandrosamuel

Em Quinta-feira, 28 de Agosto de 2014 13:49, Moritz Lennert <mlennert at club.worldonline.be> escreveu:

On 27/08/14 00:12, Alessandro Samuel Rosa wrote:
> Dear GRASS GIS developers,
> I am planning to use v.perturb to run a spatial simulated annealing
> exercise. Two drawbacks with v.perturb exist. First, "output vector
> points are not guaranteed to be contained within the current geographic
> region". Second, all vector points are perturbed together.
> Is it very difficult to solve this issues?

What exactly are your objectives ?

You can use v.extract with the random= option or v.kcv+v.extract to 
create a sample of points you can then perturb instead of perturbing all 


To make sure your points still fall into the region, you can use 
v.in.region to create a polygon representing the region, then v.select 
within your sample those that fall into the polygon.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140828/119f47a3/attachment.html>

More information about the grass-dev mailing list