[postgis-users] ST_HausdorffDistance Questions

Stephen Woodbridge woodbri at swoodbridge.com
Tue Feb 7 19:16:16 PST 2012

Hi all,

I was reading over the documentation on the ST_HausdorffDistance() 
function and I'm not clear on a couple of points.

It sounds like the densifyFrac which implies that it is adding 
additional point in the line. but the first Note say: The current 
implementation supports only vertices as the discrete locations. This 
could be extended to allow an arbitrary density of points to be used.

Which sounds like a contradiction to the densifyFrac actually doing 

I have a lot of cases where my lines are closely parallel, but the two 
sets of lines are are not noded any thing like the other. For example:


where the x and o are the ends of segments in the different set of lines.

It would be nice it it handled these cases better. For example, take it 
could have an option to compare just the parts that overlap. Maybe there 
is a better way to deal with these cases.

The use case I have is to match up two separate road networks and they 
are not digitized the same way. ST_HausdorffDistance seems to be an 
excellent starting point for doing this.



More information about the postgis-users mailing list