Click or drag to resize

Dfs2Builder Class

Builder for building dfs2 files.

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.

The following must be set during stage 1: SpatialAxis, TemporalAxis, DataType, Projection

The SpatialAxis must be a 2D axis.

Use the DfsFileFactory to create classes to set.

Inheritance Hierarchy

Namespace:  DHI.Generic.MikeZero.DFS.dfs123
Assembly:  DHI.Generic.MIKEZero.DFS (in DHI.Generic.MIKEZero.DFS.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public class Dfs2Builder : Dfs123Builder, 
	IDfs2Builder, IDfs123Builder

The Dfs2Builder type exposes the following members.

Constructors
  NameDescription
Public methodDfs2Builder
Initializes a new instance of the Dfs2Builder class
Top
Properties
  NameDescription
Public propertyApplicationTitle
Get/Set the title of the application writing the file.

This is a stage 1 method. Setting in stage 2 has no effect.

(Inherited from Dfs123Builder.)
Public propertyApplicationVersion
Set the version number of the application writing the file.

This is a stage 1 method. Setting in stage 2 has no effect.

(Inherited from Dfs123Builder.)
Public propertyDataType
Get/Set the data type.

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.

This is a stage 1 method. Setting in stage 2 will fail.

(Inherited from Dfs123Builder.)
Public propertyDeleteValueByte
Gets/sets the delete value of type byte

This is a stage 1 method. Setting in stage 2 has no effect.

(Inherited from Dfs123Builder.)
Public propertyDeleteValueDouble
Gets/sets the delete value of type double

This is a stage 1 method. Setting in stage 2 has no effect.

(Inherited from Dfs123Builder.)
Public propertyDeleteValueFloat
Gets/sets the delete value of type float

This is a stage 1 method. Setting in stage 2 has no effect.

(Inherited from Dfs123Builder.)
Public propertyDeleteValueInt
Gets/sets the delete value of type int

This is a stage 1 method. Setting in stage 2 has no effect.

(Inherited from Dfs123Builder.)
Public propertyDeleteValueUnsignedInt
Gets/sets the delete value of type unsigned int

This is a stage 1 method. Setting in stage 2 has no effect.

(Inherited from Dfs123Builder.)
Public propertyFileTitle
Get/Set the title of the file.

This is a stage 1 method. Setting in stage 2 has no effect.

(Inherited from Dfs123Builder.)
Public propertyProjection
Get/Set the geographical projection and reference coordinates.

This must be set.

This is a stage 1 method. Setting in stage 2 will fail.

(Inherited from Dfs123Builder.)
Public propertySpatialAxis
Get/Set the spatial axis of the file. This must be one of the 2D axes.

This must be set.

This is a stage 1 method. Setting in stage 2 will fail.

(Overrides Dfs123BuilderSpatialAxis.)
Public propertyTemporalAxis
Sets the temporal axis of the file.

This must be set.

This is a stage 1 method. Setting in stage 2 will fail.

(Inherited from Dfs123Builder.)
Top
Methods
  NameDescription
Public methodAddCustomBlock
Add a custom block to the file.

This is a stage 1 method.

(Inherited from Dfs123Builder.)
Public methodAddDynamicItem
Add a dynamic item to the file.
(Inherited from Dfs123Builder.)
Public methodAddStaticItem(String, eumQuantity, Array)
Creates and adds a static item storing the arrayData.

The size of the arrayData must match the size of the spatial axis set in SpatialAxis

This is a stage 2 method.

(Inherited from Dfs123Builder.)
Public methodAddStaticItem(String, eumQuantity, IDfsSpatialAxis, Array)
Creates and adds a static item storing the arrayData.

This will add a static item with a size different from the one of the dynamic items. Having a static item in size different from the dynamic items is utilized by a few specific files of MIKE SHE.

The size of the arrayData must match the size of the spatial axis set in axis

This is a stage 2 method.

(Inherited from Dfs123Builder.)
Public methodStatic memberCreate
Create a new builder that will build a dfs2 file
Public methodCreateFile
Creates a file on the disc. Moves to the second build stage
(Inherited from Dfs123Builder.)
Public methodCreateStream
Creates a file in the provided stream.. Moves to the second build stage
(Inherited from Dfs123Builder.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetFile
Return the file as a Dfs2File
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSetDataType
Set the data type.

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.

This is a stage 1 method. Setting in stage 2 will fail.

(Inherited from Dfs123Builder.)
Public methodSetEncodingKeys (Inherited from Dfs123Builder.)
Public methodSetGeographicalProjection
Set the geographical projection and reference coordinates.

This must be set.

This is a stage 1 method. Setting in stage 2 will fail.

(Inherited from Dfs123Builder.)
Public methodSetNumberOfTimeSteps
Sets the number of time steps in the file.

This is only required in streaming context, where it is not possible to update the dfs header when everything is written to the file. In a non-streaming context this should not be used.

This is a stage 1 method.

(Inherited from Dfs123Builder.)
Public methodSetSpatialAxis
Get/Set the spatial axis of the file. This must be one of the allowed axis, depending on the file builder

This must be set.

This is a stage 1 method. Setting in stage 2 will fail.

(Inherited from Dfs123Builder.)
Public methodSetTemporalAxis
Sets the temporal axis of the file.

This must be set.

This is a stage 1 method. Setting in stage 2 will fail.

(Inherited from Dfs123Builder.)
Public methodSetTimeInfo
Sets the time of the first data set and the time span of data in the file.

This is only required in streaming context, where it is not possible to update the dfs header when everything is written to the file. In a non-streaming context this should not be used.

This is a stage 1 method.

(Inherited from Dfs123Builder.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodValidate
Validate will return a string of issues from the item builder. When this returns an empty list, the item has been properly build.

This is a stage 1 method.

(Inherited from Dfs123Builder.)
Top
See Also