Hmm ... shouldn't path_distance be MIN distance not MAX distance?

Started by Tom Laneover 25 years ago2 messageshackersgeneral
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us
hackersgeneral

I just noticed that path_distance() in geo_ops.c (the "<->" operator
for path datatype) claims to be computing the minimum distance between
any two line segments of the two paths, but actually it's computing the
maximum such distance.

Isn't this broken?

regards, tom lane

#2Thomas Lockhart
lockhart@alumni.caltech.edu
In reply to: Tom Lane (#1)
hackersgeneral
Re: [HACKERS] Hmm ... shouldn't path_distance be MIN distance not MAX distance?

I just noticed that path_distance() in geo_ops.c (the "<->" operator
for path datatype) claims to be computing the minimum distance between
any two line segments of the two paths, but actually it's computing the
maximum such distance.
Isn't this broken?

Sure sounds like it :(

- Thomas