[GRASS-user] how to update one attribute of a small vector map?

Micha Silver micha at arava.co.il
Mon May 18 11:24:03 EDT 2009


Offenthaler Ivo wrote:
> What would you suggest as the most convenient way to update a small (60 points) vector map? E.g. a map's attribute "pollution_level" for a given point-ID (attribute "sitecode") has to be updated, based on some plain text output (columns "sitecode" and "pollution level") of another software?
>   
In a command shell, you might find something like this will do it:

while read sc pl
    do
    echo "UPDATE <vect_point_map> SET pollution_level=$pl WHERE 
sitecode=$sc" | db.execute
done < plain_text_file

This assumes that the plain_text_file is just two columns, sitecode and 
pollution_level. You can loop thru the new values any way that's 
convenient. The line:
echo "UPDATE .... WHERE ..." | db.execute
is what does the work.
-- 
Micha
> Many thanks in advance! Ivo
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
>
> This mail was received via Mail-SeCure System.
>
>
>   



More information about the grass-user mailing list