Class LengthLocationMap
Computes the LinearLocation for a given length along a linear Geometry Negative lengths are measured in reverse from end of the linear geometry. Out-of-range values are clamped.
Inherited Members
Namespace: NetTopologySuite.LinearReferencing
Assembly: NetTopologySuite.dll
Syntax
public class LengthLocationMap
Constructors
| Edit this page View SourceLengthLocationMap(Geometry)
Initializes a new instance of the LengthLocationMap class.
Declaration
public LengthLocationMap(Geometry linearGeom)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | linearGeom | A linear geometry. |
Methods
| Edit this page View SourceGetLength(Geometry, LinearLocation)
Computes the length for a given LinearLocation on a linear Geometry.
Declaration
public static double GetLength(Geometry linearGeom, LinearLocation loc)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | linearGeom | The linear geometry to use. |
| LinearLocation | loc | The LinearLocation index of the location. |
Returns
| Type | Description |
|---|---|
| double | The length for the LinearLocation. |
GetLength(LinearLocation)
Declaration
public double GetLength(LinearLocation loc)
Parameters
| Type | Name | Description |
|---|---|---|
| LinearLocation | loc |
Returns
| Type | Description |
|---|---|
| double |
GetLocation(Geometry, double)
Computes the LinearLocation for a given length along a linear Geometry.
Declaration
public static LinearLocation GetLocation(Geometry linearGeom, double length)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | linearGeom | The linear geometry to use. |
| double | length | The length index of the location. |
Returns
| Type | Description |
|---|---|
| LinearLocation | The LinearLocation for the length. |
GetLocation(Geometry, double, bool)
Computes the LinearLocation for a given length along a linear Geometry, with control over how the location is resolved at component endpoints.
Declaration
public static LinearLocation GetLocation(Geometry linearGeom, double length, bool resolveLower)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | linearGeom | The linear geometry to use |
| double | length | The length index of the location |
| bool | resolveLower | If true lengths are resolved to the lowest possible index |
Returns
| Type | Description |
|---|---|
| LinearLocation |
GetLocation(double)
Compute the LinearLocation corresponding to a length. Negative lengths are measured in reverse from end of the linear geometry. Out-of-range values are clamped. Ambiguous indexes are resolved to the lowest possible location value.
Declaration
public LinearLocation GetLocation(double length)
Parameters
| Type | Name | Description |
|---|---|---|
| double | length | The length index. |
Returns
| Type | Description |
|---|---|
| LinearLocation | The corresponding LinearLocation. |
GetLocation(double, bool)
Compute the LinearLocation corresponding to a length. Negative lengths are measured in reverse from end of the linear geometry. Out-of-range values are clamped. Ambiguous indexes are resolved to the lowest or highest possible location value, depending on the value of resolveLower
Declaration
public LinearLocation GetLocation(double length, bool resolveLower)
Parameters
| Type | Name | Description |
|---|---|---|
| double | length | The length index |
| bool | resolveLower |
Returns
| Type | Description |
|---|---|
| LinearLocation | The corresponding LinearLocation. |