On 01/03/2012 10:44 PM, Bulent Arikan wrote:
Thank you! This seems to be an interesting solution to the problem especially because it involves changing the driver from DBF to SQLITE. I ended up using 'v.rast.stats', which adds columns for extended statistics and uploads values all at once. The only thing is: data are recorded as part of the same layer (i.e., Layer 1). So, I cheated! Yes, v.rast.stats is definitely the way to go if you want raster univariate statistics pushed into a polygon vector.
I do as follows: eval `g.gisenv` (This creates the environment variables for GISDBASE, etc.) Now: db.connect driv=sqlite database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db Next: g.copy vect=old,new to create a new copy of the original vector. The original will still have its attrib table as dbf. THe new copy will have an sqlite based attribute table. Now you can do: v.db.addcol <new_vector> col="..., ..." . BTW, I think that v.rast.stats will automatically create the needed columns . Cheers, Micha
|
_______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user