Table of Contents

Class GeometryLocation

Namespace
NetTopologySuite.Operation.Distance
Assembly
NetTopologySuite.dll

Represents the location of a point on a Geometry. Maintains both the actual point location (which may not be exact, if the point is not a vertex) as well as information about the component and segment index where the point occurs. Locations inside area Geometrys will not have an associated segment index, so in this case the segment index will have the sentinel value of InsideArea.

public class GeometryLocation
Inheritance
GeometryLocation
Inherited Members

Constructors

GeometryLocation(Geometry, Coordinate)

Constructs a GeometryLocation specifying a point inside an area point.

public GeometryLocation(Geometry component, Coordinate pt)

Parameters

component Geometry

The component of the geometry containing the point

pt Coordinate

The coordinate of the location

GeometryLocation(Geometry, int, Coordinate)

Constructs a GeometryLocation specifying a point on a point, as well as the segment that the point is on (or InsideArea if the point is not on a segment).

public GeometryLocation(Geometry component, int segIndex, Coordinate pt)

Parameters

component Geometry

The component of the geometry containing the point

segIndex int

The segment index of the location, or InsideArea

pt Coordinate

The coordinate of the location

Fields

InsideArea

A special value of segmentIndex used for locations inside area geometries. These locations are not located on a segment, and thus do not have an associated segment index.

public const int InsideArea = -1

Field Value

int

Properties

Coordinate

Returns the Coordinate of this location.

public Coordinate Coordinate { get; }

Property Value

Coordinate

GeometryComponent

Returns the geometry component on (or in) which this location occurs.

public Geometry GeometryComponent { get; }

Property Value

Geometry

IsInsideArea

Tests whether this location represents a point inside an area geometry.

public bool IsInsideArea { get; }

Property Value

bool

SegmentIndex

Returns the segment index for this location. If the location is inside an area, the index will have the value InsideArea.

public int SegmentIndex { get; }

Property Value

int

Methods

ToString()

public override string ToString()

Returns

string