[GRASS-user] azimuth of lines with v.to.db?

Hamish hamish_nospam at yahoo.com
Thu Oct 18 18:02:36 EDT 2007


Carlos wrote:
> > this doesn't:
> >
> > > echo "UPDATE Lineam_isobase SET ang_rad=atan2(dx,dy)" | db.execute
> > DBMI-DBF driver error:
> > SQL parser error:
> > in statement:
> > UPDATE Lineam_isobase SET ang_rad=atan2(dx,dy)
> >
> > Error in db_execute_immediate()
> >
> > ERROR: Error while executing: 'UPDATE Lineam_isobase SET
> >        ang_rad=atan2(dx,dy)

Martin wrote:
> Use instead of DBF e.g. pg driver, atan2() is not supported by DBF driver.

could you get the values of dx,dy to the shell with (v.)db.select then use awk
to do the math and send the result to db.execute?

Other DBs (SQLite, MySQL, Postgres,..) should support it directly.


Hamish


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the grass-user mailing list