Class BasicPreparedGeometry
A base class for IPreparedGeometry subclasses.
Implements
Inherited Members
Namespace: NetTopologySuite.Geometries.Prepared
Assembly: NetTopologySuite.dll
Syntax
public class BasicPreparedGeometry : IPreparedGeometry
Remarks
Contains default implementations for methods, which simply delegate to the equivalent Geometry methods.
This class may be used as a "no-op" class for Geometry types which do not have a corresponding IPreparedGeometry implementation.
Constructors
| Edit this page View SourceBasicPreparedGeometry(Geometry)
Declaration
public BasicPreparedGeometry(Geometry geom)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | geom |
Properties
| Edit this page View SourceGeometry
Gets the original Geometry which has been prepared.
Declaration
public Geometry Geometry { get; }
Property Value
| Type | Description |
|---|---|
| Geometry |
RepresentativePoints
Gets the list of representative points for this geometry. One vertex is included for every component of the geometry (i.e. including one for every ring of polygonal geometries).
Do not modify the returned list!Declaration
public IList<Coordinate> RepresentativePoints { get; }
Property Value
| Type | Description |
|---|---|
| IList<Coordinate> |
Methods
| Edit this page View SourceContains(Geometry)
Tests whether the base Geometry contains a given geometry.
Declaration
public virtual bool Contains(Geometry g)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | The Geometry to test |
Returns
| Type | Description |
|---|---|
| bool | true if this Geometry contains the given Geometry |
Remarks
Default implementation.
ContainsProperly(Geometry)
Tests whether the base Geometry properly contains a given geometry.
TheContainsProperly predicate has the following equivalent definitions:
In other words, if the test geometry has any interaction with the boundary of the target
geometry the result of ContainsProperly is false.
This is different semantics to the Contains(Geometry) predicate,
in which test geometries can intersect the target's boundary and still be contained.
a priori to be simply the original test geometry.
Declaration
public virtual bool ContainsProperly(Geometry g)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | The geometry to test |
Returns
| Type | Description |
|---|---|
| bool | true if this geometry properly contains the given geometry |
Remarks
Default implementation.
See Also
| Edit this page View SourceCoveredBy(Geometry)
Tests whether the base Geometry is covered by a given geometry.
Declaration
public virtual bool CoveredBy(Geometry g)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | The geometry to test |
Returns
| Type | Description |
|---|---|
| bool | true if this geometry is covered by the given geometry |
Remarks
Default implementation.
Covers(Geometry)
Tests whether the base Geometry covers a given geometry.
Declaration
public virtual bool Covers(Geometry g)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | The geometry to test |
Returns
| Type | Description |
|---|---|
| bool | true if this geometry covers the given geometry |
Remarks
Default implementation.
Crosses(Geometry)
Tests whether the base Geometry crosses a given geometry.
Declaration
public virtual bool Crosses(Geometry g)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | The geometry to test |
Returns
| Type | Description |
|---|---|
| bool | true if this geometry crosses the given geometry |
Remarks
Default implementation.
Disjoint(Geometry)
Tests whether the base Geometry is disjoint from given geometry.
Declaration
public bool Disjoint(Geometry g)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | The geometry to test |
Returns
| Type | Description |
|---|---|
| bool | true if this geometry is disjoint from the given geometry |
Remarks
Standard implementation for all geometries.
EnvelopeCovers(Geometry)
Determines whether the envelope of this geometry covers the Geometry g.
Declaration
protected bool EnvelopeCovers(Geometry g)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | A geometry |
Returns
| Type | Description |
|---|---|
| bool | true if g is contained in this envelope |
EnvelopesIntersect(Geometry)
Determines whether a Geometry g interacts with this geometry by testing the geometry envelopes.
Declaration
protected bool EnvelopesIntersect(Geometry g)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | A geometry |
Returns
| Type | Description |
|---|---|
| bool | true if the envelopes intersect |
Intersects(Geometry)
Tests whether the base Geometry intersects a given geometry.
Declaration
public virtual bool Intersects(Geometry g)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | The geometry to test |
Returns
| Type | Description |
|---|---|
| bool | true if this geometry intersects the given geometry |
Remarks
Default implementation.
IsAnyTargetComponentInTest(Geometry)
Tests whether any representative of the target geometry intersects the test geometry. This is useful in A/A, A/L, A/P, L/P, and P/P cases.
Declaration
public bool IsAnyTargetComponentInTest(Geometry testGeom)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | testGeom | The test geometry |
Returns
| Type | Description |
|---|---|
| bool | true if any component intersects the areal test geometry |
Overlaps(Geometry)
Tests whether the base Geometry overlaps a given geometry.
Declaration
public virtual bool Overlaps(Geometry g)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | The geometry to test |
Returns
| Type | Description |
|---|---|
| bool | true if this geometry overlaps the given geometry |
Remarks
Default implementation.
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
| Edit this page View SourceTouches(Geometry)
Tests whether the base Geometry touches a given geometry.
Declaration
public virtual bool Touches(Geometry g)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | The geometry to test |
Returns
| Type | Description |
|---|---|
| bool | true if this geometry touches the given geometry |
Remarks
Default implementation.
Within(Geometry)
Tests whether the base Geometry is within a given geometry.
Declaration
public virtual bool Within(Geometry g)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | The geometry to test |
Returns
| Type | Description |
|---|---|
| bool | true if this geometry is within the given geometry |
Remarks
Default implementation.