I have a postgreSQL database that contains latitude, longitude, and elevation for a region of interest. The same data is available in a geoTIFF, if that would make things easier.
Given two Latitude/Longitude pairs, I need to find the highest elevation along the straight line path connecting the two points. Using Python as a programing language, how would I do this?
Please keep in mind that while I am reasonably fluent in Python and PostgreSQL I am completely unfamiliar with any specialized tools or terms for solving this issue. I've heard of PostGIS, for example, but know nothing about it or how to use it, if it would help here.
Edit: At the moment, I've managed to figure out a query to find the elevation closest to a given point (since it is unlikely that any given lat/lng pair will match exactly with the data in the database), and of course if there was some query I could do to get all the data points that lie along the path, I could easily get the maximum elevation of those points.
It's finding the point that lie along the path that is baffling me.
EDIT 2: After some additional searching, it would appear that the PostGIS function LINESTRING may be of use, when combined with something else to select all points "along" that line. Still looking for what to combine with it, however.