[postgis-users] curve between geo points

Jim Walseth jwalseth at tableau.com
Thu May 25 14:10:30 PDT 2017

Thank you Fran├žois this is just the information I was seeking.

From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Fran├žois B
Sent: Tuesday, May 23, 2017 10:12 AM
To: postgis-users at lists.osgeo.org
Subject: Re: [postgis-users] curve between geo points

It depends on the type of your column. If it's standard "geometry", then it's a straight line in the 2D space defined by your coordinate system. If it's "geography", then it's a curve, aka geodesic or great circle.

From the manual:

4.2. PostGIS Geography Type

The basis for the PostGIS geometry type is a plane. The shortest path between two points on the plane is a straight line. That means calculations on geometries (areas, distances, lengths, intersections, etc) can be calculated using cartesian mathematics and straight line vectors.

The basis for the PostGIS geographic type is a sphere. The shortest path between two points on the sphere is a great circle arc. That means that calculations on geographies (areas, distances, lengths, intersections, etc) must be calculated on the sphere, using more complicated mathematics. For more accurate measurements, the calculations must take the actual spheroidal shape of the world into account, and the mathematics becomes very complicated indeed.

Note that many data formats (outside of PostGIS, e.g. Shapefile), do not explicitly define this interpretation. See this Stack Exchange question:

Are long lines in shapefiles to be considered geodesics or straight lines in the 2D latlong space?

I'd like to know how PostGIS interprets the curve between two points on the earth, in the context of spatial analysis. Ex, the NW and NE corners of the State of Colorado - is it a 'straight line' in some projection, or a geodetic curve or the intersection of a normal plane with the surface (as in MS Sequel). Possibly, the function called implies this (2D VS. 3D).

Redirecting to online documentation or discussion would be welcome.

Best regards,

Jim Walseth

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20170525/6ed774c1/attachment.html>

More information about the postgis-users mailing list