| От | John R Pierce |
|---|---|
| Тема | Re: earthdistance compass bearing |
| Дата | |
| Msg-id | 51C0A690.1050208@hogranch.com обсуждение исходный текст |
| Ответ на | earthdistance compass bearing (Jeff Herrin <jeff@openhotel.com>) |
| Список | pgsql-general |
On 6/18/2013 10:42 AM, Jeff Herrin wrote: > I'm trying to get a compass bearing (N,S,NW,etc) using earthdistance. > I can successfully get the distance between 2 points using either the > point or cube method, but I've been struggling with getting the > bearing. Any tips? calculating the angle between two points on the surface of a sphere is non-trivial. You'll probably need to use PostGIS for that, and the ST_Azimuth() function, which returns angle in radians betweeen two points (multiple by 180/PI to get degrees) -- john r pierce 37N 122W somewhere on the middle of the left coast
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера