id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
755	Bug in 3d-distance functions	nicklas	nicklas	"This gives right answer: POINT(0 5 3)

{{{
select st_asewkt(st_3dclosestpoint(
'POLYGON((0 0 0,0 0 5,0 10 5,0 10 0, 0 0 0))'::geometry, 
'POINT(5 5 3)'::geometry))
}}}

But this gives wrong answer POINT(5 0 5) instead of POINT(5 0 3)
{{{
select st_asewkt(st_3dclosestpoint(
'POLYGON((0 0 0,0 0 5,10 0 5,10 0 0, 0 0 0))'::geometry, 
'POINT(5 5 3)'::geometry))
}}}

It finds the closest distance when checking against the boudary instead of against the surface. And as shown above it is not consistent.

I will take a look soon.

/Nicklas



"	defect	closed	medium	PostGIS 2.0.0	postgis	trunk	fixed		
