[postgis-tickets] [PostGIS] #4270: ST_3DIntersects says 'no' despite geometries intersecting

PostGIS trac at osgeo.org
Wed Jan 2 07:11:59 PST 2019


#4270: ST_3DIntersects says 'no' despite geometries intersecting
---------------------+---------------------------
  Reporter:  tilt    |      Owner:  colivier
      Type:  defect  |     Status:  new
  Priority:  medium  |  Milestone:  PostGIS 2.5.2
 Component:  sfcgal  |    Version:  2.5.x
Resolution:          |   Keywords:
---------------------+---------------------------

Comment (by nicklas):

 Sorry for the delay. It took me some time to get the time to understand
 all this again. It was many years ago.

 I have found the problem. It is when defining the plane.
 The plane of a polygon is stored aas a point on the polygon and a point
 perpendicular to that point from the plane.
 To make the calculations robust it calculates this perpendicular point
 from some samples. But what happens in some cases is that the average
 point calculation gets zero because some points gets on the upper side of
 the plane and others on the down side. This can happen when the line is
 going both concave and convex as your did. So the simple fix is to add
 fabs to the plane definition.

 But, just some weeks ago Algunenano changed the 3D calculation code quite
 a lot, in #4546 and then this problem is very much reduced by not
 calculating an averge point this way, and instead just add to the point.
 This means that the perpendular point no more defines a normal vector
 perpendular to the plane, but that doesn't matter.
 In theory it could still be possible to create a polygon that gets an
 undefined plane for the same reason as before, but the chance is minimal.

 So I leave this without any changes.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4270#comment:8>
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