Class RectangleIntersects
I Implementation of the Intersects spatial predicate optimized for the case where one Geometry is a rectangle.
Inherited Members
Namespace: NetTopologySuite.Operation.Predicate
Assembly: NetTopologySuite.dll
Syntax
public class RectangleIntersects
Remarks
This class works for all input geometries, including GeometryCollections.
As a further optimization, this class can be used in batch style to test many geometries against a single rectangle.Constructors
| Edit this page View SourceRectangleIntersects(Polygon)
Create a new intersects computer for a rectangle.
Declaration
public RectangleIntersects(Polygon rectangle)
Parameters
| Type | Name | Description |
|---|---|---|
| Polygon | rectangle | A rectangular polygon. |
Fields
| Edit this page View SourceMaximumScanSegmentCount
Crossover size at which brute-force intersection scanning is slower than indexed intersection detection. Must be determined empirically. Should err on the safe side by making value smaller rather than larger.
Declaration
public const int MaximumScanSegmentCount = 200
Field Value
| Type | Description |
|---|---|
| int |
Methods
| Edit this page View SourceIntersects(Geometry)
Tests whether the given Geometry intersects the query rectangle.
Declaration
public bool Intersects(Geometry geom)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | geom | The Geometry to test (may be of any type) |
Returns
| Type | Description |
|---|---|
| bool |
|
Intersects(Polygon, Geometry)
Tests whether a rectangle intersects a given geometry.
Declaration
public static bool Intersects(Polygon rectangle, Geometry b)
Parameters
| Type | Name | Description |
|---|---|---|
| Polygon | rectangle | A rectangular polygon |
| Geometry | b | A geometry of any kind |
Returns
| Type | Description |
|---|---|
| bool |
|