EngineFindExtensions.GetClosestDownstreamGridpoint Method (IList<EngineReach>, Double, Predicate<GridPoint>, Boolean) |
Find the specified type of gridpoint which is closest to the given location downstream.
It is assumed that the EngineReach max and min chainages
are containing the given chainage, otherwise null is returned.
Namespace:
DHI.Mike1D.Engine
Assembly:
DHI.Mike1D.Engine (in DHI.Mike1D.Engine.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntaxpublic static GridPoint GetClosestDownstreamGridpoint(
this IList<EngineReach> reaches,
double chainage,
Predicate<GridPoint> match,
bool allowExact
)
<ExtensionAttribute>
Public Shared Function GetClosestDownstreamGridpoint (
reaches As IList(Of EngineReach),
chainage As Double,
match As Predicate(Of GridPoint),
allowExact As Boolean
) As GridPoint
public:
[ExtensionAttribute]
static GridPoint^ GetClosestDownstreamGridpoint(
IList<EngineReach^>^ reaches,
double chainage,
Predicate<GridPoint^>^ match,
bool allowExact
)
Parameters
- reaches
- Type: System.Collections.Generic.IList<EngineReach>
reaches to search, assuming they share the same reach id - chainage
- Type: System.Double
Location to start search at - match
- Type: System.Predicate<GridPoint>
The Predicate delegate that defines the conditions of the element to search for. - allowExact
- Type: System.Boolean
Boolean specifying whether if a grid point is found at exactly the chainage value is to be included in the search.
Return Value
Type:
GridPointClosest HGridPoint, null if none exists
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IList<EngineReach>. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also