[postgis-users] drawing a line tangent to earth ?

didier peeters dpeeter1 at ulb.ac.be
Mon Feb 5 07:08:32 PST 2018


Here’s the problem that puzzles me: 
I would like to determine if an object (a building,  an antenna, …) can be seen from a specific point ‘somewhere'.  I have to deal with distances ranging from a few meters to about 200 km or so.  I have the coordinates of the viewing point XYZ and the XYZ coordinates of the object to check as well as its height, and I should find what part of the object is viewable above the horizon, i.e. how many meters of it can be seen (considering that the earth is not flat … ) .   
I thought of assimilating the earth to a trigonometric circle but I fear that the precision would not be good enough for evaluating the height of an antenna above the radius of the planet.
I’m working with Postgresql/postgis and would prefer to remain in this environment but could add some extensions or other languages functions.  

Any suggestion welcome !


More information about the postgis-users mailing list