Table of Contents

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 CoordinateSequence

The sequence containing the facet point.

index int

the 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 CoordinateSequence

The sequence containing facet points.

start int

The index of the start point

end int

The 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 Geometry

The geometry containing the facets.

pts CoordinateSequence

The sequence containing the facet points.

start int

The index of the start point.

end int

The index of the end point.

Properties

Count

Gets the number of coordinates in this facet sequence

public int Count { get; }

Property Value

int

Envelope

Gets the envelope of this facet sequence

public Envelope Envelope { get; }

Property Value

Envelope

IsPoint

Tests if this facet sequence consists of only one point

public bool IsPoint { get; }

Property Value

bool

Methods

Distance(FacetSequence)

Computes the distance between this and another FacetSequence.

public double Distance(FacetSequence facetSeq)

Parameters

facetSeq FacetSequence

The 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 int

The 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()

Returns

string