Tests whether this geometry is within the specified geometry.
The within
predicate has the following equivalent definitions:
- Every point of this geometry is a point of the other geometry, and the interiors of the two geometries have at least one point in common.
- The DE-9IM Intersection Matrix for the two geometries matches
[T*F**F***]
g.contains(this)
(within
is the converse of contains
)
An implication of the definition is that "The boundary of a Geometry is not within the Geometry". In other words, if a geometry A is a subset of the points in the boundary of a geomtry B,
A.within(B) = false
@param g the
Geometry
with which to compare this
Geometry
@return
true
if this
Geometry
is within
other
@see Geometry#contains