[GRASS-user] points in polygon query

Maciej Sieczka tutey at o2.pl
Mon May 21 14:41:02 EDT 2007


Hamish wrote:
> Stefano Costa wrote:

> re speed-

>> echo "UPDATE $output SET count = $count WHERE cat = $i" | db.execute

> instead of running db.execute at every iteration in your loop, >> append
> the SQL command to a g.tempfile (end each line with a ';'), then once
> the for loops are done, run db.execute once with the input=$tempfile.
> 
> then the script will be much much faster I think.

Last time I checked that it was circa 20 (twenty) times faster for me.
Sorry no exact benchmarks.

Maciek




More information about the grass-user mailing list