summaryrefslogtreecommitdiff
path: root/boost/geometry/algorithms/detail/relate/point_geometry.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/algorithms/detail/relate/point_geometry.hpp')
-rw-r--r--boost/geometry/algorithms/detail/relate/point_geometry.hpp38
1 files changed, 18 insertions, 20 deletions
diff --git a/boost/geometry/algorithms/detail/relate/point_geometry.hpp b/boost/geometry/algorithms/detail/relate/point_geometry.hpp
index a0c6c0d49b..e78a404b21 100644
--- a/boost/geometry/algorithms/detail/relate/point_geometry.hpp
+++ b/boost/geometry/algorithms/detail/relate/point_geometry.hpp
@@ -60,29 +60,27 @@ struct point_geometry
if ( BOOST_GEOMETRY_CONDITION(result.interrupt) )
return;
- // the point is on the boundary
- if ( pig == 0 )
+ typedef detail::relate::topology_check<Geometry> tc_t;
+ if ( relate::may_update<exterior, interior, tc_t::interior, Transpose>(result)
+ || relate::may_update<exterior, boundary, tc_t::boundary, Transpose>(result) )
{
- // NOTE: even for MLs, if there is at least one boundary point,
- // somewhere there must be another one
-
- // check if there are other boundaries outside
- typedef detail::relate::topology_check<Geometry> tc_t;
- //tc_t tc(geometry, point);
- //if ( tc.has_interior )
- relate::set<exterior, interior, tc_t::interior, Transpose>(result);
- //if ( tc.has_boundary )
- relate::set<exterior, boundary, tc_t::boundary, Transpose>(result);
- }
- else
- {
- // check if there is a boundary in Geometry
- typedef detail::relate::topology_check<Geometry> tc_t;
- tc_t tc(geometry);
- if ( tc.has_interior )
+ // the point is on the boundary
+ if ( pig == 0 )
+ {
+ // NOTE: even for MLs, if there is at least one boundary point,
+ // somewhere there must be another one
relate::set<exterior, interior, tc_t::interior, Transpose>(result);
- if ( tc.has_boundary )
relate::set<exterior, boundary, tc_t::boundary, Transpose>(result);
+ }
+ else
+ {
+ // check if there is a boundary in Geometry
+ tc_t tc(geometry);
+ if ( tc.has_interior() )
+ relate::set<exterior, interior, tc_t::interior, Transpose>(result);
+ if ( tc.has_boundary() )
+ relate::set<exterior, boundary, tc_t::boundary, Transpose>(result);
+ }
}
}
};