Opened 11 years ago

Closed 11 years ago

#2431 closed defect (fixed)

Regression failure from 2.0.3-2.1.0 ST_Distance

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 2.1.0
Component: postgis Version: 2.0.x
Keywords: Cc:

Description

Going thru all the differences in garden tests 2.0.3 against 2.1.0 branch

In 2.0.3 this worked and gave an answer of 40.02 (I believed it just considered the 2D) - ST_3DDistance still works in 2.1 for this

SELECT ST_Distance('MULTILINESTRING Z ((-10 40 1.5,-9 41 1.5),(10 40 1.5,11 41 1.5),(30 40 1.5,31 41 1.5),(50 40 1.5,51 41 1.5),(-9 41 1.5,-8 42 2),(11 41 1.5,12 42 2),(31 41 1.5,32 42 2),(51 41 1.5,52 42 2),(-10 65 1.5,-9 66 1.5),(10 65 1.5,11 66 1.5),(30 65 1.5,31 66 1.5),(50 65 1.5,51 66 1.5),(-9 66 1.5,-8 67 2),(11 66 1.5,12 67 2),(31 66 1.5,32 67 2),(51 66 1.5,52 67 2))'::Geometry, 'PolyhedralSurface z( 
((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),  
((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)) )'::geometry)

running same query in 2.1.0 gives error:

ERROR: Unsupported geometry type: PolyhedralSurface

Using ST_3DDistance in both 2.0.3 and 2.1.0 yields 40.053

I believe we said ST_Distance will give a 2D answer but will work for all 3D geoms (except TINS)

Change History (6)

comment:1 by robe, 11 years ago

ST_DWithin is same issue and I believe ST_ClosestPoint, ST_ShortestLine

comment:2 by nicklas, 11 years ago

What has happened is that distance calculation before used the global function to tell if a geometry is a collection, which included polyhedralsurface. Then the polyhedralsurface was taken apart into polygons that can be handled.

In r11219, because of added curve support to the distance calculations Paul put a collection test only for the distance calculations, that doesn't include polyhedralsurface.

Is that intentional?

I haven't studied the details, but if the function that takes apart collections isn't changed I guess it is just to add polyhedralsurface in the list on collections and it should work as before.

comment:3 by robe, 11 years ago

I think we should add Polyhedaral surface back. I don't think the change was intentional and I don't see why we shouldn't be able to ask the foot print distance of a polyhedral surface when we used to be able to. That seems pretty useful to me.

comment:4 by nicklas, 11 years ago

Should be fixed with

2.1 r11807

trunk r11808

comment:5 by robe, 11 years ago

thanks a bunch nicklas. Really nice to have you back :)

comment:6 by robe, 11 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.