[postgis-devel] [PostGIS] #231: New distance-calculations proposal
PostGIS
trac at osgeo.org
Sun Oct 18 23:26:05 PDT 2009
#231: New distance-calculations proposal
--------------------------+-------------------------------------------------
Reporter: nicklas | Owner: robe
Type: enhancement | Status: assigned
Priority: medium | Milestone: postgis 1.5.0
Component: postgis | Version:
Resolution: | Keywords:
--------------------------+-------------------------------------------------
Comment (by nicklas):
I think the reason, sql server gets the same answer as postgis of today is
because they do the exactly same calculation.
It is described here:
http://www.faqs.org/faqs/graphics/algorithms-faq/
and can be found by searching for:
"Subject 1.02: How do I find the distance from a point to a line?"
So what postgis does today and apperently also sql server is to calculate
the distance directly from the point to the line. A little bit further
down in the text in the link it is described how to find the point on the
line to where the distance is calculated. The thing then is that the point
has the same "bad" precision as the original inputed vertexes wich dives a
slightly different answer. That is no problem because the extra precision
in the distance-answer makes no sense since the vertexes is inaccurate.
But then we know some more about the sql-server code :-). They have not
prepared it for shortestline function I guess.
I think it is a strength if the distance-calculation gives exactly the
same answer as the length of the shortest line and that I think should be
the case now.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/231#comment:21>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS
More information about the postgis-devel
mailing list