Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#755 closed defect (fixed)

Bug in 3d-distance functions

Reported by: nicklas Owned by: nicklas
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:

Description

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

Change History (4)

comment:1 by nicklas, 13 years ago

Owner: changed from pramsey to nicklas
Status: newassigned

comment:2 by nicklas, 13 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r6580

comment:3 by Mike Taves, 13 years ago

with r6580, you changed a function on line 1072 from fabs() to abs() .. you might want to put this back to fabs()

comment:4 by nicklas, 13 years ago

Thanks mwtoews, fixed in r6583

/Nicklas

Note: See TracTickets for help on using tickets.