[postgis-users] geographic calculations

Dennis Gearon gearond at fireserve.net
Tue Sep 21 16:22:59 PDT 2004


I am new to PostGis, so please excuse my ignorance.

I am looking to expand a postgres installations so that I can do a 
couple queries like (data identies changed to protect project):

SELECT
    *
FROM
    customer_data
WHERE
    geographic_distance_function( POINT( coords for a great bar ), 
POINT( coords from customers for bushes to sleep in)) < calculated 
staggering_distance;

---or----

SELECT
    geographic_distance_function(
        POINT( coords for a great bar ),
        POINT( customer_data.coords from customers for bushes to pee 
in)) AS Distance,
    geographic_azimuth_function(
        POINT( coords for a great bar ),
        POINT( customer_data.coords from customers for bushes to sleep 
in)) AS Bearing_From_Bar
FROM
    customer_data
WHERE
        causes_allergic_skin_rash=FALSE
ORDER BY
    Distance;



Can PostGis do this accurately on the various geographical coordinate 
systems like WGSxx, NADxx, etc.?

Anyone know a good library, shared object or code, that can be used with 
Postgres on Linux, AIX, and Sun?



More information about the postgis-users mailing list