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

Martin Landa landa.martin at gmail.com
Thu Oct 18 09:08:56 EDT 2007


Hi,

2007/10/18, Carlos Guâno Grohmann <carlos.grohmann at gmail.com>:
> OK, I am trying to get these thing working with db.execute.
>
> although these work:
> > echo "UPDATE Lineam_isobase SET dx=end_x-start_x" | db.execute
> > echo "UPDATE Lineam_isobase SET dy=end_y-start_y" | db.execute
>
> 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)
>        '

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

Martin

-- 
Martin Landa <landa.martin at gmail.com> * http://gama.fsv.cvut.cz/~landa *




More information about the grass-user mailing list