On Wed, Jul 17, 2013 at 12:32 AM, Greg Troxel <span dir="ltr"><<a href="mailto:gdt@ir.bbn.com" target="_blank">gdt@ir.bbn.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Also, for distances of more than a few km, you should take earth<br>
curvature into account. I am unclear on how that's handled in postgis.<br>
Perhaps if you convert each point to X,Y,Z then straightforward 3D<br>
calculations will be right. But using a projected coordinate system<br>
such as UTM and elevations will be off.<br>
</blockquote></div><br><div>I did struggle to find examples of things out there that would help me calculate the line of sight.</div><div><br></div><div>I wrote this blog to help anyone else who needs something similar.</div>
<div><br></div><div><a href="http://davidrowley.blogspot.co.nz/2013/08/calculating-line-of-sight-with-postgis.html">http://davidrowley.blogspot.co.nz/2013/08/calculating-line-of-sight-with-postgis.html</a></div><div><br></div>
<div>If anyone can see something where I could have implemented something using a core PostGIS function but I did something manually, please let me know.</div><div><br></div><div>Also I did use PostGIS 2.1 here as I'm still testing. 2.1 will be release before I'm ready to go live. So it's not an issue.</div>
<div><br>Regards</div><div><br></div><div>David</div>