[postgis-tickets] [PostGIS] #4992: Problem with ST_FrechetDistance in PostGIS/GEOS ?

PostGIS trac at osgeo.org
Thu Sep 16 13:48:32 PDT 2021


#4992: Problem with ST_FrechetDistance in PostGIS/GEOS ?
-----------------------+---------------------------
  Reporter:  ezimanyi  |      Owner:  pramsey
      Type:  defect    |     Status:  new
  Priority:  medium    |  Milestone:  PostGIS 3.1.5
 Component:  postgis   |    Version:  2.5.x
Resolution:            |   Keywords:
-----------------------+---------------------------

Comment (by mdavis):

 Perhaps you have a more "batteries include" implementation of Frechet
 Distance.

 The PostGIS algorithm (coming from GEOS) is a Discrete Frechet Distance
 implementation.  It works better if the geometry is densified via the
 optional third argument:

 {{{
 SELECT ST_FrechetDistance(
   'Linestring(1 1,2 2,3 1)',
   'Linestring(1 4,2 3,3 4,4 3)', .01);
  st_frechetdistance
 --------------------
  2.9800000000000004
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4992#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list