RRExtensionsCalculateWeights Method |
Calculate grid weights for catchment.
If catchment has a geometry (CatchmentGeometry), that is being used for the calculations.
If it does not have a geometry, but it has a CenterPoint, the centerpoint is used.
Namespace:
DHI.Mike1D.RainfallRunoffModule
Assembly:
DHI.Mike1D.RainfallRunoffModule (in DHI.Mike1D.RainfallRunoffModule.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax public static List<GriddedWeight> CalculateWeights(
this GridWeightCalculator gwc,
ICatchment catchment,
IDiagnostics diagnostics,
bool exact = false,
bool mayFail = false
)
<ExtensionAttribute>
Public Shared Function CalculateWeights (
gwc As GridWeightCalculator,
catchment As ICatchment,
diagnostics As IDiagnostics,
Optional exact As Boolean = false,
Optional mayFail As Boolean = false
) As List(Of GriddedWeight)
public:
[ExtensionAttribute]
static List<GriddedWeight^>^ CalculateWeights(
GridWeightCalculator^ gwc,
ICatchment^ catchment,
IDiagnostics^ diagnostics,
bool exact = false,
bool mayFail = false
)
Parameters
- gwc
- Type: GridWeightCalculator
Grid weight calculator, having definition of grid and grid origin - catchment
- Type: DHI.Mike1D.RainfallRunoffModuleICatchment
Catchment to calculate weights for - diagnostics
- Type: DHI.Mike1D.GenericIDiagnostics
[Missing <param name="diagnostics"/> documentation for "M:DHI.Mike1D.RainfallRunoffModule.RRExtensions.CalculateWeights(DHI.Spatial.Algorithm.GridWeightCalculator,DHI.Mike1D.RainfallRunoffModule.ICatchment,DHI.Mike1D.Generic.IDiagnostics,System.Boolean,System.Boolean)"]
- exact (Optional)
- Type: SystemBoolean
Flag indicating whether to use the exact intersection approach or the fast automatic approach of the GridWeightCalculator - mayFail (Optional)
- Type: SystemBoolean
[Missing <param name="mayFail"/> documentation for "M:DHI.Mike1D.RainfallRunoffModule.RRExtensions.CalculateWeights(DHI.Spatial.Algorithm.GridWeightCalculator,DHI.Mike1D.RainfallRunoffModule.ICatchment,DHI.Mike1D.Generic.IDiagnostics,System.Boolean,System.Boolean)"]
Return Value
Type:
ListGriddedWeightList of weights. Null if catchment does not have geometry information or geometry is outside of grid
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
GridWeightCalculator. 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