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

Milton Cezar Ribeiro miltinho.astronauta at gmail.com
Mon May 18 12:23:11 EDT 2009


Hi there,

Sorry to expand a little bit this thread. I have a vector map with 10
thousands of records, and for each record I have a set of about 10
attributes. Now I would like to generate a raster map from one attribute of
vector map. But on vector I have CHAR values like: "Low", "Medium" and
"High", and I would like that my raster map get values 1, 2 and 3,
respectivelly.

Any help are welcome.
milton
brazil=toronto
2009/5/18 Micha Silver <micha at arava.co.il>

> 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.
>>
>>
>>
>>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20090518/835eec30/attachment.html


More information about the grass-user mailing list