Dfs2File Class |
Use the DfsFileFactory to open an existing dfs2 file.
Use the Dfs2Builder to create a new dfs2 file.
Namespace: DHI.Generic.MikeZero.DFS.dfs123
The Dfs2File type exposes the following members.
Name | Description | |
---|---|---|
![]() | Dfs2File |
Wrap a dfs file object in a dfs2 file object.
If dfs file is not a dfs2 file, an exception is thrown, and behavior is undefined. |
Name | Description | |
---|---|---|
![]() | FileInfo |
File info
(Inherited from Dfs123File.) |
![]() | FileName |
Name of file.
(Inherited from Dfs123File.) |
![]() | ItemInfo |
Information on all the dynamic items in the file.
(Inherited from Dfs123File.) |
![]() | SpatialAxis |
Spatial axis that are valid for all dynamic and static items.
(Inherited from Dfs123File.) |
Name | Description | |
---|---|---|
![]() | Close |
See Close (Inherited from Dfs123File.) |
![]() | CreateEmptyItemData(Int32) |
Create an IDfsItemData2DT of the correct type for the
item with the given itemNumber.
|
![]() | CreateEmptyItemDataT(Int32) |
Create an IDfsItemData2DT of the correct type for the
item with the given itemNumber.
|
![]() | DfsCurrentVersion |
Returns the current version of the Dfs file library
(Inherited from Dfs123File.) |
![]() | Dispose |
Close file and release ressources on the unmanaged side.
(Inherited from Dfs123File.) |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | FindItem |
Positions the file pointer at the location in the file where the
specified dynamic item at the specified time step starts.
(Inherited from Dfs123File.) |
![]() | FindTimeStep |
Positions the file pointer at the location in the file where the
specified time step starts.
(Inherited from Dfs123File.) |
![]() | Flush |
See Flush (Inherited from Dfs123File.) |
![]() | FlushTimeStep |
See FlushTimeStep (Inherited from Dfs123File.) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | ReadItemTimeStep(Int32, Int32) |
For details, see ReadItemTimeStep(Int32, Int32).
This version returns a IDfsItemData2D.
|
![]() | ReadItemTimeStep(IDfsItemData2D, Int32) |
For details, see ReadItemTimeStep(IDfsItemData, Int32).
This version works on a IDfsItemData2D.
|
![]() | ReadItemTimeStepNext |
For details, see ReadItemTimeStepNext.
This version returns a IDfsItemData2D.
|
![]() | ReadStaticItem | (Inherited from Dfs123File.) |
![]() | ReadStaticItemNext | (Inherited from Dfs123File.) |
![]() | Reset |
Resets the file pointer to point on the first dynamic item time step in the file.
(Inherited from Dfs123File.)Can also be used if it is required to restart reading the static items. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | WriteItemTimeStep |
Writes data to the specified item and timestep in the file.
(Inherited from Dfs123File.)If the item-timestep exists already, data is updated. If it does not exist, the item number and timestep index must match exactly the next item-timestep after the last one in the file. The size of the data must match the data size of the item that is to be written. The time value is only relevant for files with non-equidistant time axis. For files with an equidistant time axis, the time value is ignored, and a zero can be used. |
![]() | WriteItemTimeStepNext | Writes the next dynamic item-timestep. If the file pointer points to the end of the file, this will append a new item-timestep to the file. If the file pointer points to an existing item-timestep, the data of that item-timestep is updated. Remember that the file pointer position depends on the mode that the file was opened: In edit mode the file pointer points at the first item-timestep. In append mode the file pointer points initially at the end of file. It iterates over the item-timesteps as the ReadItemTimeStepNext, see there for more details. This is the most efficient way to iterate through and update/append the items and timesteps in a file, since it iterates exactly as the data is stored on the disk. The size of the data must match the data size of the item that is to be written. The time value is only relevant for files with non-equidistant time axis. For files with an equidistant time axis, the time value is ignored, and a zero can be used. |
![]() | WriteStaticItemData | (Inherited from Dfs123File.) |
Name | Description | |
---|---|---|
![]() | CreateEmptyItemData(Int32) | Overloaded.
Create an IDfsItemData2DT of the correct type for the
item with the given itemNumber.
(Defined by Dfs2Util.) |
![]() | CreateEmptyItemDataT(Int32) | Overloaded.
Create an IDfsItemData2DT of the correct type for the
item with the given itemNumber.
(Defined by Dfs2Util.) |
![]() | GenerateMaxItemData |
Reads all timesteps of a dfs2 file item and returns one item data with
the maximum value over time.
(Defined by Dfs2Util.) |
![]() | GenerateMinItemData |
Reads all timesteps of a dfs2 file item and returns one item data with
the minimum value over time.
(Defined by Dfs2Util.) |
![]() | LandValue |
Extract land-value from a HPQ dfs2 file.
(Defined by Dfs2Util.)Value is extracted from the 3rd position of the "M21_Misc" custom block. If the "M21_Misc" custom block is not found, an exception is thrown. |
![]() | ReadFloatTimeSeriesByPoint |
This method will read all items and timesteps and return the values on
the xIndex,yIndex in the grid
as time series.
(Defined by Dfs2Util.)first dimension is time, second is items. This method will fail if not all items are of type float. |