Using PostGIS, I have a table of data with geographic points defined as
last_known_coordinates GEOGRAPHY(POINT,4326). I want to find all of these within a geographic bounding box with given top left and bottom right geographic coordinates, and be sure that the calculations are geographic, not geometric, e.g. that the results account for the curvature of the earth.
The query I'm using contains the fragment:
last_known_coordinates && ST_MakeEnvelope(?, ?, ?, ?, 4326)::geography
As you can tell I'm a bit new to this, and I know what I want, but not necessarily how to do it correctly. Other answers hint that this is correct, but I'd like to know for sure: Will this point data and SQL fragment take into account the curvature of the Earth in the bounding box?