Click or drag to resize

CrossSectionData Class

A class representing a collection of cross sections, spanning multiple reaches.

The collection orders the cross sections in two ways: If a reach only has one global cross-section, it is indexed by reachID and topoID. Other cross sections which have a location including a chainage, are ordered by locationID (reachID), topoID and chainage.

If a cross section gets its location updated after insertion into the collection, it needs to be removed and reinserted into the collection in order to be indexed correctly.

Events are not supported for COM interop, even though they appear in the type lib.

All physical quantities are in SI units.

Inheritance Hierarchy
SystemObject
  DHI.Mike1D.GenericAbstractDataAccess
    DHI.Mike1D.CrossSectionModuleCrossSectionData

Namespace:  DHI.Mike1D.CrossSectionModule
Assembly:  DHI.Mike1D.CrossSectionModule (in DHI.Mike1D.CrossSectionModule.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public class CrossSectionData : AbstractDataAccess, 
	IEnumerable<ICrossSection>, IEnumerable

The CrossSectionData type exposes the following members.

Constructors
  NameDescription
Public methodCrossSectionData
Initializes a new instance of the CrossSectionData class
Top
Properties
  NameDescription
Public propertyConnection
Holder of read/write information
(Inherited from AbstractDataAccess.)
Public propertyCount
returns the number of cross sections
Public propertyCustomTypes
List of custom types stored in the data object and that must be serialized.

A custom type is e.g. a user implemented structure or catchment model. In order to store information on the custom type in the .m1dx file, the system needs to know which custom types are being used, and they must be added to this list.

(Inherited from AbstractDataAccess.)
Public propertyExtensionData
Holds data from an extended DataContract
(Inherited from AbstractDataAccess.)
Public propertyRuntimeDiagnostics
Diagnostics instance for the engine net. Used during runtime.
Public propertyXSInterpolationType
Defines how to interpolate a cross section.

Default value is ProcessedTopDown

Top
Methods
  NameDescription
Public methodAdd
Add the crossSection based on its location id and chainage and topoID.

If a cross section gets its location updated after insertion into the collection, it needs to be removed and reinserted into the collection.

Public methodAddGlobal
Add the crossSection as a global crossSection for the entire reach.
Public methodClear
Removes all cross sections from this collection.
Public methodCreateRuntimeDiagnostics
Create a runtime Diagnostics instance. This is called from the initializer which contains the cross section data since there is no initializer here (CrossSectionData is created during load, not initialization).
Public methodElevateReachGlobal
For all reach/topo-id's with only one cross section on chainage 0, elevate those cross sections to reach global
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFindClosestCrossSection
Find the closest cross section based on the location and topoID. If no cross section is found, null is returned.

If the reach defined in the location has a global cross section, the global cross section is returned. TODO: Consider returning null instead

This is meant for editing the cross sections, use Get to always get a cross section at a location.

Public methodFindCrossSection
Find a cross section based on the location and topoID. If no cross section is found (chainage within Constants.LOCATION_EQUAL_TOLERANCE), null is returned.

If the reach defined in the location has a global cross section, the global cross section is returned. TODO: Consider returning null instead

This is meant for editing the cross sections, use Get to always get a cross section at a location.

Public methodFindCrossSectionsForLocationSpan
Gets the cross-sections on locations inside span.

If excludeEnds is true, then cross sections must be strictly inside span (cross sections must be LOCATION_EQUAL_TOLERANCE inside span).

If excludeEnds is false, then cross sections on the end of the span will be included (within tolerance of LOCATION_EQUAL_TOLERANCE).

Uses StrictContains in the locationSpan to match. If there is a global cross section for this reachID, then an array of length 0 is returned.

Public methodFindGlobalCrossSection
Find a cross section based on the reachID and topoID. The reach must have a global cross section defined, otherwise null is returned.
Public methodFindNeighborCrossSections
Find the cross section's neighbors on the same reach and with the same topoID. If there is another cross section at that location already, return its neighbors. TODO: What to return if the branch only has one global cross section? Currently null.
Public methodGetCrossSection(ILocation, String)
Get a cross section for a location, interpolated if none exists at the location. Returns null if a required interpolation is not possible. Returns a child if the location is found with in a location span of a cross section Processed data are found for the geometric interpolation
Public methodGetCrossSection(ILocation, String, Boolean)
Get a cross section for a route location, interpolated if none exists all the location. Returns null if a required interpolation is not possible. Processed data can be found in 2 different ways (see below)
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetReachTopoIdEnumerable
Return an enumerable that can iterate over all reach-id and topo-id combinations
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberGetVeryLargeCrossSection
Get a standard very large cross section.
Public methodGetZExtremes
returns the global extrema for z coordinates
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMergeWith
Merge other collection into this. If duplicates, this overrides other (not updated).
Public methodRemoveCrossSection
Find and remove a cross section based on the location and topoID. If no cross section is found (chainage within Constants.LOCATION_EQUAL_TOLERANCE), false is returned. If the reach defined in the location has a global cross section, the global cross section is removed. TODO: Consider doing nothing
Public methodRemoveGlobalCrossSection
Find and removes a cross section based on the reachID and topoID. The reach must have a global cross section defined, otherwise nothing happens.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Protected field_connection
Protected holder of read/write info
(Inherited from AbstractDataAccess.)
Top
Extension Methods
  NameDescription
Public Extension MethodAutoProcess
Set the AutoProcess flag for all cross sections.
(Defined by CrossSectionExtensions.)
Public Extension MethodClone
Clone all cross sections in CrossSectionData.
(Defined by CrossSectionExtensions.)
Public Extension MethodGetCrossSections
Find upstream and downstream cross section from crossSectionData at location. If none exists, create an return a GetVeryLargeCrossSection
(Defined by CrossSectionExtensions.)
Public Extension MethodGetRiverBankLevels
Get bank levels of cross sections inside span.
(Defined by CrossSectionExtensions.)
Top
See Also