DfsBuilder Class |
The builder works in two stages. The first stage all header information and information of the dynamic items are provided. In the second stage static items are added. Then a dfs file is ready, and data for the dynamic items can be added.
To go from the first to the second stage by calling CreateFile(String), which will actually create a file on the disc.
To get the final file, call GetFile. After GetFile has been called, no more static items can be added to the file.
Stage 1: The following must be set during stage 1: SetGeographicalProjection(IDfsProjection), SetDataType(Int32), SetTemporalAxis(IDfsTemporalAxis). Furthermore, a number of dynamic items must be added.
Stage 2: Any number of static items can be added. Create the item by using one of the AddStaticItem(String, Array) functions. To create a new static item from scratch, use CreateStaticItemBuilder together with AddStaticItem(IDfsStaticItem).
Namespace: DHI.Generic.MikeZero.DFS
The DfsBuilder type exposes the following members.
Name | Description | |
---|---|---|
DeleteValueByte |
Gets/sets the delete value of type byte
This is a stage 1 method. | |
DeleteValueDouble |
Gets/sets the delete value of type double
This is a stage 1 method. | |
DeleteValueFloat |
Gets/sets the delete value of type float
This is a stage 1 method. | |
DeleteValueInt |
Gets/sets the delete value of type int
This is a stage 1 method. | |
DeleteValueUnsignedInt |
Gets/sets the delete value of type unsigned int
This is a stage 1 method. |
Name | Description | |
---|---|---|
AddCustomBlock(IDfsCustomBlock) |
Adds a custom block.
| |
AddCustomBlock(String, Array) |
Adds a custom block containing the array data.
The type of arrayData must be an array of type equivalent to one of the supported DfsSimpleType, e.g. int[]. | |
AddCustomBlock(String, Byte) |
Add a custom block containing byte data.
| |
AddCustomBlock(String, Double) |
Add a custom block containing double data.
| |
AddCustomBlock(String, Int16) |
Add a custom block containing short data.
| |
AddCustomBlock(String, Int32) |
Add a custom block containing int data.
| |
AddCustomBlock(String, Single) |
Add a custom block containing float data.
| |
AddCustomBlock(String, UInt16) |
Add a custom block containing ushort data.
| |
AddCustomBlock(String, UInt32) |
Add a custom block containing uint data.
| |
AddDynamicItem |
Add a dynamic item to the file.
| |
AddStaticItem(IDfsStaticItem) |
Add static item to the file.
The static item can come from another file, then the item definition and data is copied over. | |
AddStaticItem(String, Array) |
Creates and adds a static item storing the arrayData.
Use this only when Quantity
and SpatialAxis and others are
not important. Quantity and spatial axis are set to default
dummy values.
The type of arrayData must be an array of type equivalent to one of the supported DfsSimpleType, e.g. int[]. | |
AddStaticItem(String, eumQuantity, Array) |
Creates and adds a static item storing the arrayData.
Use this only when SpatialAxis is
not important. Spatial axis are set to default dummy values.
The type of arrayData must be an array of type equivalent to one of the supported DfsSimpleType, e.g. int[]. | |
Create |
Create a new builder that will build a default type of dfs file (with FixedSpace and AllItems)
| |
CreateDynamicItemBuilder |
Create a dynamic item builder, for creating and configuring a new dynamic item.
| |
CreateFile |
Create the file and move from stage 1 to stage 2 of the build process.
| |
CreateStaticItemBuilder |
Create a static item builder, for creating and configuring a new static item.
| |
Equals | (Inherited from Object.) | |
GetFile |
Returns the new dfs file
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
SetApplicationTitle |
Set the title of the application writing the file.
This is a stage 1 method. | |
SetApplicationVersionNo |
Set the version number of the application writing the file.
This is a stage 1 method. | |
SetDataType |
Set the data type.
This is a stage 1 method. The data type tags the file as a special dfs file type. There exists no global system for maintaining these tag-variables. The tag-variables should only be interpreted locally within one model-complex e.g. MIKE 21. The application programmer can tag bathymetries, result files, input files freely. | |
SetEncodingKey |
Sets the encoding key for compressing the dfs file.
See GetEncodeKey(Int32, Int32, Int32) for the definition
of the encode key values.
Compression is only supported when all dynamic items are of type float. All dynamic items must have a size that is compatible with the encode key values, i.e., xKey[i] < xCount && yKey[y] < yCount && zKey[i] < zCount | |
SetFileTitle |
Set the title of the file.
This is a stage 1 method. | |
SetGeographicalProjection |
Sets the geographical projection and reference coordinates.
This must be set. This is a stage 1 method. | |
SetItemStatisticsType |
Sets the statistics level StatType of all items
in the file
| |
SetTemporalAxis |
Sets the temporal axis of the file.
This must be set. This is a stage 1 method. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Validate |
Validate will return a string of issues from the item builder.
When this returns an empty list, the item has been properly build.
|