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

Carlos "Guâno" Grohmann carlos.grohmann at gmail.com
Thu Oct 18 07:17:22 EDT 2007


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?

cheers

Carlos


On 10/18/07, Maciej Sieczka <tutey at o2.pl> wrote:
> Carlos "Guâno" Grohmann wrote:
> > This is almost what I need. I need the results to be in range 0-360,
> > from North. So I can get a rose diagram, with petals weighted
> > according to azimuth frequency or to azimuth lenght, like the
> > attachment.
>
> I've just remember PROJ.4's geod [1]. Example:
>
> $ echo "50N 19E 51N 20E" | geod -I +ellps=WGS84 +units=m
> 32d8'43.417"    -147d4'58.6"    131935.963
>
> The 1st 2 numbers are azimuth from the 1st to 2nd point and
> back, respectively, 3rd is the distance between them.
>
> [1]http://proj.maptools.org/man_geod.html
>
> Maciek
>


-- 
+-----------------------------------------------------------+
              Carlos Henrique Grohmann - Guano
  Visiting Researcher at Kingston University London - UK
  Geologist M.Sc  - Doctorate Student at IGc-USP - Brazil
Linux User #89721  - carlos dot grohmann at gmail dot com
+-----------------------------------------------------------+
_________________
"Good morning, doctors. I have taken the liberty of removing Windows
95 from my hard drive."
--The winning entry in a "What were HAL's first words" contest judged
by 2001: A SPACE ODYSSEY creator Arthur C. Clarke

Can't stop the signal.




More information about the grass-user mailing list