[postgis-users] [postgis-devel] Sphere or Spheroid
Paul Ramsey
pramsey at cleverelephant.ca
Fri Oct 30 18:41:51 PDT 2009
On Fri, Oct 30, 2009 at 5:48 PM, <pcreso at pcreso.com> wrote:
> Which spheroid is used by default? (I commonly use 3 different ones)
WGS84
> Does the geography datatype require a SRID (or spheroid?) to be specified, and reject a null one? (I'm not familiar with the geography implementation details)
Unlike geometry, if you don't specify an SRID, you'll get 4326 set by
default. The default user is assumed to be modern. The implementation
will be SRID-based not magic-text-string based, as the current
_spheroid functions in geometry are.
> If there is no default spheroid available does ST_Distance() then fail unless it is explicitly told to use spherical?
The default behaviour is what we're on about, but there's no reason to
prefer sphere over spheroid on the basis of a missing SRID, since the
values of WGS84 are well-known.
> As I see it, the issue is less about providing the right (or best) answer by default, & more about protecting users from their ignorance.
And most users of geography will in fact be entirely ignorant of
issues of spheroid.
> I'm a bit cautious about making assumptions about which spheroid should be applied by default for users who do not fully understand the issues.
I'm the opposite. Most folks will be using lat/lons they got from
who-knows-where. A WGS84 assumption is the best thing we can provide.
> As long as the issue is well covered in the documentation, and both spherical & spheroidal versions are available, I don't have a strong preference either way.
It'll be documented.
P.
More information about the postgis-users
mailing list