Am 17.05.2011 um 16:14 schrieb Moritz Lennert:

On 16/05/11 16:32, Johannes Radinger wrote:
Hallo,

I've got a point file and populated (v.what.rast) it with values from a flow direction raster (flow direction from r.watershed).

I want to use these values to rotate the symbol in ps.map but therefore I've to recalulcate the values in the direction-column of the point file (x*45+90 or so).

How can that be done? I thought about v.reclass but don't really know how?!

Another option would be to access the sqlite database and perform the calculation there (I am working in a python script) like: database = sqlite3.connect(os.path.join(gisdbase, location, mapset, 'sqlite.db'))
db = database.cursor()
db.execute .... but what is the correct command for calculation within a database??

Probably it is easier than I think... :)

If you want to modify an existing column:

v.db.update col=YourExistingColumn value=YourCalculation

If you want to create a new column:

v.db.addcolumn col="YourNewCol double precision"
v.db.update col=YourNewCol value=YourCalculation

Thank you that was what I was looking for...

/j

Moritz
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to