[postgis-devel] max_distance(geom,geom)
strk at refractions.net
strk at refractions.net
Thu Aug 26 07:59:59 PDT 2004
Porting the max_distance(geom1, geom2) to LWGEOM,
I've found a bug in it or I missed the meaning of the function.
The function, as currently implemented in postgis, returns
the maximum value of the *minimum* distance between all points
from the linestring geom1 and the linestring geom2.
For example
max_distance('LINESTRING(0 0, 5 0)', 'LINESTRING(0 0, 10 0)')
gives '0' as a result, while IMO it should return '10' !
Now. What do you think I should do ?
1) keep the function as it is
2) mark the function as obsoleted
3) fix the function to return distance between most distant points
3+) recurse into composing subgeoms... (will be expensive).
Solution '1' is already there.
--strk;
More information about the postgis-devel
mailing list