[GRASS-user] minimun (summed) cost under a polygon

eklein at usb.ve eklein at usb.ve
Tue Aug 3 09:09:39 EDT 2010


Hi,

I'm trying to find the location of a polygon over a cost-surface layer  
(raster) that represents the minimum possible cost when you add the  
pixels (cost) under it. The cost-surface has an irregular shape and  
the size of the polygon (in this case a square) is about 1/1000 of the  
size the cost layer. My approach (with a bash script) is to find  
iteratively a random location for the polygon, rotate it at fixed  
steps around it center (v.transform), calculate the sum of the cost  
under it at each rotation (v.rast.stats), and keep the location that  
produces the minimum sum of the cost. I could repeat the process, for  
example 1.000.000 times, and keep the location that produces the  
absolute minimum. I guess that the procedure should provide the right  
answer (a location), but, is there any other way to do that in a more  
efficient/elegant way? I'm also worry to be trapped around a local  
minima.

Saludos, EKS

--
Eduardo Klein
Lab Sensores Remotos y
Centro de Biodiversidad Marina
Universidad Simón Bolívar
Caracas, Venezuela
ph (58) (212) 906-3111 ext 6700
fax (58) (212( 906-3111 ext 6701




More information about the grass-user mailing list