[postgis] distance(geometry,geometry) function
Frank Warmerdam
warmerdam at pobox.com
Tue Jul 24 10:22:54 PDT 2001
Dave Blasby wrote:
>> I assume you mean euclidean distance. A lot of us keep our locations in
>> geodetic coordinates. It would be nice if geometries could reference a
>> particular datum so these things would be handled transparently.
>> (Postgis is nonetheless a very exciting development.)
>
>
>
> Yes, these are euclidean distances. The calculations in geodetic
> coordinates are complex.
>
> We have a function that, given a spheroid and 2 geodetic points, will
> calculate the distance between them. In order to do distance() in
> generality, I need to be able to;
>
> 1. Given a spheroid and the points A, B, and C. A-B define a line in
> geodetic space (a great circle). Find the minimum distance (also a
> great circle) between the line AB and C.
>
> 2. Given a spheroid and the points A, B and U, V. A-B and U-V define
> lines in geodetic space. Tell me if they intersect or the minimum
> distance between then.
>
> 3. Given a spherioid, the point A, and the polygon P tell me if point A
> is inside the polygon P.
>
> Then I'd need to dust off my spherical geometry and make sure my
> euclidean assumptions will hold on an ellipsoid.
>
Dave,
PROJ.4 does include a geodetic great circle distance calculation program.
I wonder if it would be best putting off such advanced services untill
you can build an entire
projections library into PostGIS. I would certainly promote PROJ.4 as
an option. However,
I would assume this (building in full OGC projection support) would be a
ways down the road
for PostGIS.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think! http://promo2.yahoo.com/sbin/Yahoo!_BusinessNewsletter/survey.cgi
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the postgis-users
mailing list