Class GeometryLocation
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.
Inherited Members
Namespace: NetTopologySuite.Operation.Distance
Assembly: NetTopologySuite.dll
Syntax
public class GeometryLocation
Constructors
| Improve this Doc View SourceGeometryLocation(Geometry, Coordinate)
Constructs a GeometryLocation specifying a point inside an area point.
Declaration
public GeometryLocation(Geometry component, Coordinate pt)
Parameters
Type | Name | Description |
---|---|---|
Geometry | component | The component of the geometry containing the point |
Coordinate | pt | The coordinate of the location |
GeometryLocation(Geometry, Int32, 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).
Declaration
public GeometryLocation(Geometry component, int segIndex, Coordinate pt)
Parameters
Type | Name | Description |
---|---|---|
Geometry | component | The component of the geometry containing the point |
Int32 | segIndex | The segment index of the location, or InsideArea |
Coordinate | pt | The coordinate of the location |
Fields
| Improve this Doc View SourceInsideArea
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.
Declaration
public const int InsideArea = -1
Field Value
Type | Description |
---|---|
Int32 |
Properties
| Improve this Doc View SourceCoordinate
Returns the Coordinate of this location.
Declaration
public Coordinate Coordinate { get; }
Property Value
Type | Description |
---|---|
Coordinate |
GeometryComponent
Returns the geometry component on (or in) which this location occurs.
Declaration
public Geometry GeometryComponent { get; }
Property Value
Type | Description |
---|---|
Geometry |
IsInsideArea
Tests whether this location represents a point inside an area geometry.
Declaration
public bool IsInsideArea { get; }
Property Value
Type | Description |
---|---|
Boolean |
SegmentIndex
Returns the segment index for this location. If the location is inside an area, the index will have the value InsideArea.
Declaration
public int SegmentIndex { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |