[Gdal-dev] geod: azimuth to degrees

Charlton Purvis cplist at earthlink.net
Fri Nov 3 10:45:39 EST 2006


Hi, all:

I have a painfully simple question to ask the group that will undoubtedly
expose my cartographic knowledge vacuum.  But be that as it may, I'm
stumped.  Fire some trig my way -- I can take it.  But going from an azimuth
to degrees is beyond my grasp today.

Let's take the geod man page example as our example:

geod +ellps=clrk66 <<EOF -I +units=us-mi
42d15'N 71d07'W 45d31'N 123d41'W
EOF 

which gives the results:

-66d31'50.141"   75d39'13.083"   2587.504

where the first two values are the azimuth from Boston to Portland, the back
azimuth from Portland to Boston followed by the distance.

Fantastic!

Now say that I'd like to draw a vector on top of Boston that points to
Portland.  (For my purpose, my points are located much closer together, so I
want to use geod to help me draw a vector that is scaled by distance / time
-- I'm drawing drifter buoys and tracks).

Don't I have enough info from geod to do that?  If so, how in the devil can
I get a single degree value to draw my little vector from -66d31'50.141"
75d39'13.083"?

Many thanks in advance.

Charlton





More information about the Gdal-dev mailing list