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
GeometryThe component of the geometry containing the point
pt
CoordinateThe 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
GeometryThe component of the geometry containing the point
segIndex
intThe segment index of the location, or InsideArea
pt
CoordinateThe 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
Properties
Coordinate
Returns the Coordinate of this location.
public Coordinate Coordinate { get; }
Property Value
GeometryComponent
Returns the geometry component on (or in) which this location occurs.
public Geometry GeometryComponent { get; }
Property Value
IsInsideArea
Tests whether this location represents a point inside an area geometry.
public bool IsInsideArea { get; }
Property Value
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
Methods
ToString()
public override string ToString()