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

Moritz Lennert mlennert at club.worldonline.be
Thu Oct 18 09:14:37 EDT 2007


On 18/10/07 14:41, Moritz Lennert wrote:
> On 18/10/07 13:17, Carlos "Guâno" Grohmann wrote:
>> 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)
>>        '
>>
>> thoughts?
> 
> Which database backend are you using ?

Sorry, just saw that the information is above (DBMI-DBF): don't think 
that the dbf driver supports atan2(). Try with postgresql.

Moritz




More information about the grass-user mailing list