[postgis-users] Using LAT LONG coords with postgis
Michael O'Sullivan
mos at i3sp.com
Wed Jan 1 18:17:17 PST 2003
Hi,
I have a few questions on using lat/long data with postgis. I think I
have the basic gist of things and have a prototype up and running,
however I would appreciate any feedback on my assumptions. I am willing
to write up a getting started with LAT/LONG coordinates tutorial and
submit to postgis doc/FAQ if people think it would be worthwhile.
LAT/LONG coords are geopgrahic coords, and as such require a geographic
(as opposed to a projected) coordinate system when being used with
postgis. Projected coordinate systems are generally used to model a
sub section of the earth using cartesian coordinates. One of the more
comonly used projected coordinate systems is the Universal Transverse
Mercator mapping.
Given two points in lat/long the length_spheriod function can be used to
calculate the distance between them. Most coordinate systems seem to be
based on the GRS80 or WGS84 ellipsoids, which are almost the same -
having slightly different parameters. GPS uses WGS84.
What is the accuracy you can expect here, using GRS80 or WGS84? I assume
issues such as position on earth, distance between two points, and the
fact that altitude is not taken into account would all impact.
Also, are there any issues with using the lat/long coords with the &&
operator and BOX3D object to do bounded by queries? I am currently using
the BOX3D with a layer of lat/long points to select all points within a
given radius of another point and it seems to work fine.
thanks,
Michael
More information about the postgis-users
mailing list