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 
<[email protected]> 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 

points.

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.

Moritz
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to