Click or drag to resize

SpatialExtensions Class

Extension methods and static for the Spatial namespace
Inheritance Hierarchy
SystemObject
  DHI.Mike1D.Generic.SpatialSpatialExtensions

Namespace:  DHI.Mike1D.Generic.Spatial
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 16.0.0.0 (11.1.1.1111)
Syntax
C#
public static class SpatialExtensions

The SpatialExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAsCoordinate
Return a Coordinate from an ICoordinate. If it is already an Coordinate, this is returned, i.e. it is not copied.
Public methodStatic memberCalculateLeftRightCoordinatesFromDistances
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.
Public methodStatic memberCastToList
Cast an ICoordinateSequence to an CoordinateList, create a new if a cast is not possible
Public methodStatic memberCreateUnitVector
Creates a unit vector pointing from p1 to p2
Public methodStatic memberDirectionUnitVector
Finds the local reach direction as the direction from the locally surounding digi points. The vector returned is a unit vector.
Public methodStatic memberDirectionUnitVectorSmooth
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.

Public methodStatic memberDistanceSqXY
Distance squared in XY coordinates.
Public methodStatic memberDistanceXY
Distance in XY coordinates.
Public methodStatic memberInterpolate
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.

Public methodStatic memberLocateAlong(ICoordinateSequence, Double)
Locate a coordinate where the m value is located in the coords.
Public methodStatic memberLocateAlong(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'.

Public methodStatic memberLocateAlong(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'.

Public methodStatic memberValidateIncreasingM
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.

Top
See Also