SpatialExtensions Class |
Namespace: DHI.Mike1D.Generic.Spatial
public static class SpatialExtensions
The SpatialExtensions type exposes the following members.
Name | Description | |
---|---|---|
AsCoordinate |
Return a Coordinate from an ICoordinate. If it is already an
Coordinate, this is returned, i.e. it is not copied.
| |
CalculateLeftRightCoordinatesFromDistances |
From the point and using the direction unit vector, create
two points left ad right of of the point in the given distance from the point.
| |
CastToList |
Cast an ICoordinateSequence to an CoordinateList,
create a new if a cast is not possible
| |
CreateUnitVector |
Creates a unit vector pointing from p1 to p2
| |
DirectionUnitVector |
Finds the local reach direction as the direction from the locally surounding digi points. The
vector returned is a unit vector.
| |
DirectionUnitVectorSmooth |
Finds the local reach direction as the direction from the locally surrounding digi points. The
vector returned is a unit vector.
This returns a smoothly varying unit vector: On the center of the line between two digipoints, the direction of the line is returned. On a digipoint the average of the line before and after the digipoint is returned. In between the center of the line and the digipoint the direction varies linearly. | |
DistanceSqXY |
Distance squared in XY coordinates.
| |
DistanceXY |
Distance in XY coordinates.
| |
Interpolate |
Interpolate two coordinate sequences.
The end-points of the sequences are interpolated similar to Interpolate(Double, ICoordinate, ICoordinate). Internal points are included by inserting a similar internal point in the other sequence at matching relative m-value, and performing point interpolation on those points. | |
LocateAlong(ICoordinateSequence, Double) |
Locate a coordinate where the m value
is located in the coords.
| |
LocateAlong(ICoordinateSequence, Double, ExtrapolationTypes) |
Locate a coordinate where the m value
is located in the coords.
If extrapolate is true, the coordinates are extrapolated. If only one coordinate exist in coords, return that coordinate. Extrapoloation types 'Nearest' and 'Linear is supported'. | |
LocateAlong(ICoordinateSequence, Double, ExtrapolationTypes, Double) |
Locate a coordinate where the m value
is located in the coords.
If extrapolate is true, the coordinates are extrapolated within the extrapolation distance. If only one coordinate exist in coords, return that coordinate. Extrapoloation types 'Nearest' and 'Linear is supported'. | |
ValidateIncreasingM |
Validate that the M values are increasing. Returns -1 on success.
On failure, returns the index of the first coordinate that does not have increasing M. |