Class FacetSequence
- Namespace
- NetTopologySuite.Operation.Distance
- Assembly
- NetTopologySuite.dll
Represents a sequence of facets (points or line segments) of a Geometry specified by a subsequence of a CoordinateSequence.
public class FacetSequence
- Inheritance
-
FacetSequence
- Inherited Members
Constructors
FacetSequence(CoordinateSequence, int)
Creates a new sequence for a single point from a CoordinateSequence.
public FacetSequence(CoordinateSequence pts, int index)
Parameters
pts
CoordinateSequenceThe sequence containing the facet point.
index
intthe index of the point
FacetSequence(CoordinateSequence, int, int)
Creates a new sequence of facets based on a CoordinateSequence.
public FacetSequence(CoordinateSequence pts, int start, int end)
Parameters
pts
CoordinateSequenceThe sequence containing facet points.
start
intThe index of the start point
end
intThe index of the end point + 1
FacetSequence(Geometry, CoordinateSequence, int, int)
Creates a new sequence of facets based on a CoordinateSequence contained in the given Geometry.
public FacetSequence(Geometry geom, CoordinateSequence pts, int start, int end)
Parameters
geom
GeometryThe geometry containing the facets.
pts
CoordinateSequenceThe sequence containing the facet points.
start
intThe index of the start point.
end
intThe index of the end point.
Properties
Count
Gets the number of coordinates in this facet sequence
public int Count { get; }
Property Value
Envelope
Gets the envelope of this facet sequence
public Envelope Envelope { get; }
Property Value
IsPoint
Tests if this facet sequence consists of only one point
public bool IsPoint { get; }
Property Value
Methods
Distance(FacetSequence)
Computes the distance between this and another FacetSequence.
public double Distance(FacetSequence facetSeq)
Parameters
facetSeq
FacetSequenceThe sequence to compute the distance to.
Returns
- double
The minimum distance between the sequences.
GetCoordinate(int)
Gets the coordinate at the given index
public Coordinate GetCoordinate(int index)
Parameters
index
intThe index
Returns
- Coordinate
The coordinate at the given index
NearestLocations(FacetSequence)
Computes the locations of the nearest points between this sequence and another sequence. The locations are presented in the same order as the input sequences.
public GeometryLocation[] NearestLocations(FacetSequence facetSeq)
Parameters
facetSeq
FacetSequence
Returns
- GeometryLocation[]
A pair of GeometryLocations for the nearest points.
ToString()
public override string ToString()