[postgis-tickets] [PostGIS] #4278: ST_3DIntersects / ST_3DDistance solid aware in LWGEOM

PostGIS trac at osgeo.org
Sun Dec 23 00:06:06 PST 2018


#4278: ST_3DIntersects / ST_3DDistance solid aware in LWGEOM
---------------------+---------------------------
 Reporter:  komzpa   |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 3.0.0
Component:  postgis  |    Version:  2.4.x
 Keywords:           |
---------------------+---------------------------
 From https://github.com/postgis/postgis/pull/351#issuecomment-449620811


 To implement solid-aware ST_Distance and ST_Intersects we seem to need to
 add a not super large bit of logic:
 {{{
 distance = mindist_as_it_is(geom1, geom2);
 if (box1 &&& box2 and distance > 0)
 { /* check if we are completely inside */
 geom1, box1, geom2, box2 = swap_so_that_box1_is_inside_box2();
 if (not ST_IsSold(geom2))
     return distance;
 pt1 = take_any_point_in(geom1);
 if (raycast_count_hits_to_infinity_from_point(pt1, geom2) is odd)
     return 0
 else
     return distance;
 }
 }}}
 This way we can avoid the semantic change altogether.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4278>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list