[postgis-users] points from st_distance

Martin Davis mbdavis at refractions.net
Thu Feb 12 08:50:30 PST 2009

> On the topic itself, this is doable, but note that distance does not
> calculate the shortest distance points (sometimes they are between
> vertices, note) it just calculates the segmentA/segmentB distances and
> finds the minimum.
This is how the JTS algorithm works as well.  It is possible to identify 
the points which determine the shortest distance, and it's not too hard 
to do.  I added this to JTS once I realized that this is quite useful 
for visualizing the distance.

Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

More information about the postgis-users mailing list