[Proj] (no subject) Now: How to propagate a line by bearing & distance

Brent Wood pcreso at pcreso.com
Mon Dec 16 17:26:50 PST 2013


Quick question- 


having had a very similar discussion on the Postgis list regarding ST_Project()

does geod propagate a straight line at constant bearing, or a great circle arc, to locate the new point?

looking at these examples (the first gives a slightly different return azimuth to Frank's example for some reason):

echo "33 -117 15 10000" | geod +ellps=WGS84
33d5'12.363"N    116d58'20.1"W    -164d59'5.527"


echo "33 -117 90 10000" | geod +ellps=WGS84
32d59'59.835"N    116d53'34.398"W    -89d56'29.986"


echo "33 -117 90 1000000" | geod +ellps=WGS84
32d32'41.22"N    106d19'31.529"W    -84d12'35.763"


given the changes in return azimuth & latitude I'm assuming the azimuth given on the command line is not the constant bearing to the point, but the start bearing of a great circle arc crossing that point.



Thanks

  Brent Wood




________________________________
 From: Frank Warmerdam <warmerdam at pobox.com>
To: PROJ.4 and general Projections Discussions <proj at lists.maptools.org> 
Sent: Tuesday, December 17, 2013 11:16 AM
Subject: Re: [Proj] (no subject)
 


Siva, 

I believe you want to use the "geod" program distributed with PROJ.4.  The man page, possibly a bit out of date is at:

  http://trac.osgeo.org/proj/wiki/man_geod

Example use:
$ geod +ellps=WGS84

Input:
33 -117 15 10000

Output:
33d5'13.53"N116d58'20.2"W-164d59'5.581"

So if you gave it an initial location of 33N 117W, an azimuth(bearing) of 15 degrees and a distance 10000m you would arrive at the output location given with the third value being the azimuth back to the original point. 

You should be able to construct what you want from this.

There is also a corresponding C API.

Best regards,
Frank





On Sun, Dec 15, 2013 at 10:56 PM, SIVA RAMA KRISHNA <s.r.kriishna at gmail.com> wrote:

Hello,
>
>
>Thanks in advance
>
>
>I have a lat, lon coordinate with a known projection system I assume it a initial point. I want to generate a next Position with the an 
>
>angle with  (horizontal/vertical)  and bearing length  in lat,lon  coordinates and complete it with angles and bearing lengths to form a
>
>
>polygon
>
>
>
>Any Help in the above context is highly appreciated
>
>_______________________________________________
>Proj mailing list
>Proj at lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/proj
>


-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer

_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20131216/70485f6e/attachment.html>


More information about the Proj mailing list