Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

Boundary
Buffer
Contains
ConvexHull
Crosses
Difference
Disjoint
Distance
Equals
GetGeometryType
Intersection
Intersects
Overlaps
SymetricDifference
Touches
Union
Within
virtual bool MgGeometry::Within | ( | MgGeometry * | other | ) | `[virtual]`
Given 2 geometries a and b, a.Within(b) is true if and only if the intersection of a and b is a and the intersection of the interior of a and the interior of b is not empty. Remarks: If the entire point-set of a geometry intersects the boundary of another geometry, the former is not within the latter. ## Illustration The end point of d and the end point of e intersect. a, b, i, j, k, and m are MultiPoints. The concentric circles represent intersecting points. The polygon n1n2n3n4 is within the polygon p1p2p3p4 and vice versa. The LineString q1q2 is within the LineString r1r2 and vice versa. The MultiPoint j is within the MultiPoint k and vice versa. The Point f is within the point g and vice versa. .NET Syntax
`virtual bool Within(MgGeometry other);`
Java Syntax
`virtual boolean Within(MgGeometry other);`
PHP Syntax
`virtual bool Within(MgGeometry other);`
  Parameters:
  | other | (MgGeometry) The MgGeometry to test against this one.
Returns: True if this geometry is spatially within the other geometry, false otherwise.

Comments or suggestions? Send us feedback.