[postgis-users] Geographic Type Documentation Correction

Andy Anderson aanderson at amherst.edu
Wed Nov 12 08:33:11 PST 2014


Hi, I just noticed that on this page:

http://postgis.net/docs/using_postgis_dbmanagement.html#PostGIS_Geography

there are a number of references to “sphere” when they should instead say “spheroid”, and to “great circle arc” when they should instead say “geodesic”.

This is clear from the subsequent discussion, in particular in the FAQ section:

http://postgis.net/docs/using_postgis_dbmanagement.html#idp32988960

where it says


4.2.3.1.


Do you calculate on the sphere or the spheroid?



By default, all distance and area calculations are done on the spheroid. You should find that the results of calculations in local areas match up will with local planar results in good local projections. Over larger areas, the spheroidal calculations will be more accurate than any calculation done on a projected plane.

All the geography functions have the option of using a sphere calculation, by setting a final boolean parameter to 'FALSE'. This will somewhat speed up calculations, particularly for cases where the geometries are very simple.


So in

4.2. PostGIS Geography Type

the corrected documentation would change:

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.

to:

The basis for the PostGIS geographic type is a spheroid, a “squashed” sphere whose polar diameter is smaller than its equatorial diameter. The shortest path between two points on the sphere is a great circle arc, and on a spheroid it’s a similar arc called a geodesic. That means that calculations on geographies (areas, distances, lengths, intersections, etc) will provide more accurate measurements, but the calculations must take the actual spheroidal shape of the world into account, and the mathematics becomes very complicated indeed.

and in

4.2.3.3. What is the longest arc you can process?

the corrected documentation would change:

We use great circle arcs as the "interpolation line" between two points. That means any two points are actually joined up two ways, depending on which direction you travel along the great circle. All our code assumes that the points are joined by the *shorter* of the two paths along the great circle. As a consequence, shapes that have arcs of more than 180 degrees will not be correctly modelled.

to:

We use geodesics as the "interpolation line" between two points (these are great circle arcs on spheres). That means any two points are actually joined up two ways, depending on which direction you travel between them. All our code assumes that the points are joined by the *shorter* of the two paths. As a consequence, shapes that have arcs of more than 180 degrees will not be correctly modeled.

Cheers,

— Andy

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


More information about the postgis-users mailing list