[GRASSLIST:609] Re: How do I create a thematic map from a shapefile?

Allan Hollander adh at ice.ucdavis.edu
Thu Apr 6 16:06:49 EDT 2006


What I would do is to add a column or columns to the dbf file with 
v.db.addcol to contain the additional fields (e.g. 'v.db.addcol basin 
columns="meanprecip real"'). I then write a little script (awk works well 
here) to generate a batch file to be executed by db.execute. This file 
might look like:

UPDATE basin SET meanprecip=49.7 WHERE id=1;
UPDATE basin SET meanprecip=24.8 WHERE id=2;

and so on. Once I run db.execute with this batch file, I now have an 
attribute column in the dbf file with the values of interest.

Best wishes,

Allan Hollander



On Thu, 6 Apr 2006, Thomas Adams wrote:

> List:
> 
> Say I have imported into GRASS 6.1cvs a shapefile consisting of basin 
> boundaries. There are NO attributes in the dbf file. What is the process 
> by which I thematically map attributes from an ascii file that consists 
> of identifiers (that match the IDs of the individual basins) and a value 
> (e.g., mean rainfall)? I know this is elementary, but I just can not see 
> how to do this in GRASS 6. I have looked through all the examples and 
> documentation I can find with no luck.
> 
> Regards,
> Tom
> 
> 

-- 




More information about the grass-user mailing list