24 #include "ufscommon.h"
83 typedef ufsFile File, *LPFILE;
84 typedef ufsLblock LogicalBlock;
85 typedef ufsDate Fdate;
116 F_UNDEFINED_FILE_TYPE = 0,
130 F_UNDEFINED_STAT_TYPE = 0, F_NO_STAT, F_REGULAR_STAT, F_LARGEVAL_STAT
155 F_UNDEFINED_TAXIS = 0,
170 F_UNDEFINED_SAXIS = 0,
202 typedef struct UTMProjOrigin
204 TCHAR *projection_id;
205 double lon0, lat0, orientation;
210 typedef struct Coords
217 typedef struct EqAxisD0
222 typedef struct EqAxisD1
230 typedef struct NeqAxisD1
239 typedef struct TvarAxisD1
245 typedef struct EqAxisD2
253 typedef struct NeqAxisD2
263 typedef struct CurveLinearAxisD2
273 typedef struct TvarAxisD2
279 typedef struct EqAxisD3
287 typedef struct NeqAxisD3
298 typedef struct CurveLinearAxisD3
309 typedef struct TvarAxisD3
315 typedef struct EqAxisD4
319 float x0, y0, z0, f0;
320 float dx, dy, dz, df;
326 typedef struct EqTimeAxis
330 double tstart, tstep;
334 typedef struct NeqTimeAxis
338 double tstart, tspan;
342 typedef struct EqCalendarAxis
344 TCHAR start_date[11];
346 TCHAR start_date_copy[11];
347 TCHAR start_time_copy[9];
350 double tstart, tstep;
354 typedef struct NeqCalendarAxis
356 TCHAR start_date[11];
358 TCHAR start_date_copy[11];
359 TCHAR start_time_copy[9];
362 double tstart, tspan;
368 typedef struct ItemStat
371 double no_of_del_values;
376 typedef struct GridPointStat
380 double sum_prod, prev_value;
381 double no_of_values, no_of_pairs;
382 double no_of_del_values;
387 typedef union ItemAxis
395 CurveLinearAxisD2 CurveLinearAxD2;
399 CurveLinearAxisD3 CurveLinearAxD3;
444 typedef struct absItemS
454 UnitConvType nAxisConvertType;
460 UnitConvType nConvertType;
469 float alpha, phi, theta;
477 typedef struct AssocStatic
480 struct AssocStatic *next;
497 GridPointStat *gp_stat;
498 AssocStatic *as_stat;
508 typedef struct StaticVector
512 } StaticVector, *LPVECTOR;
517 typedef union GeoInfo
519 UTMProjOrigin geo_origin;
525 typedef union TimeAxis
528 NeqTimeAxis NeqTimeAx;
529 EqCalendarAxis EqCalendarAx;
530 NeqCalendarAxis NeqCalendarAx;
536 typedef struct CustomBlock
551 struct CustomBlock *next;
552 } CustomBlock, *LPBLOCK;
556 typedef LONG (*dfsExtInitialize_t)(
557 struct DfsHeader* pdfs,
560 typedef LONG (*dfsExtTerminate_t)(
561 struct DfsHeader* pdfs);
563 typedef LONG (*dfsExtGetNoOfItems_t)(
564 struct DfsHeader* pdfs);
566 typedef LONG (*dfsExtGetItemInfo_t)(
567 struct DfsHeader* pdfs,
570 LPCTSTR* EumItemName,
573 LPCTSTR* EumUnitName,
576 typedef LONG (*dfsExtGetItemAxisType_t)(
577 struct DfsHeader* pdfs,
580 typedef LONG (*dfsExtGetItemAxisEq_t)(
581 struct DfsHeader* pdfs,
584 LPCTSTR EumUnitName[],
589 typedef BOOL (*dfsExtIsItemDerived_t)(
590 struct DfsHeader* pdfs,
593 typedef LONG (*dfsExtGetItemStatsGlobal_t)(
594 struct DfsHeader* pdfs,
600 typedef LONG (*dfsExtGetItemValueType_t)(
601 struct DfsHeader* pdfs,
605 typedef LONG (*dfsExtGetItemRefCoords_t)(
606 struct DfsHeader* pdfs,
612 typedef LONG (*dfsExtGetItemAxisOrientation_t)(
613 struct DfsHeader* pdfs,
619 typedef LONG (*dfsExtNewTimeStep_t)(
620 struct DfsHeader* pdfs,
623 typedef LONG (*dfsExtReadItemTimeStep_t)(
624 struct DfsHeader* pdfs,
635 typedef struct DfsPlugins
639 dfsExtInitialize_t dfsExtInitialize;
640 dfsExtTerminate_t dfsExtTerminate;
641 dfsExtGetNoOfItems_t dfsExtGetNoOfItems;
642 dfsExtGetItemInfo_t dfsExtGetItemInfo;
643 dfsExtGetItemAxisType_t dfsExtGetItemAxisType;
644 dfsExtGetItemAxisEq_t dfsExtGetItemAxisEq;
645 dfsExtIsItemDerived_t dfsExtIsItemDerived;
646 dfsExtGetItemStatsGlobal_t dfsExtGetItemStatsGlobal;
647 dfsExtGetItemValueType_t dfsExtGetItemValueType;
648 dfsExtGetItemRefCoords_t dfsExtGetItemRefCoords;
649 dfsExtGetItemAxisOrientation_t dfsExtGetItemAxisOrientation;
650 dfsExtNewTimeStep_t dfsExtNewTimeStep;
651 dfsExtReadItemTimeStep_t dfsExtReadItemTimeStep;
656 typedef struct DfsEncode
681 typedef struct DfsHeader
688 LONG compressed_file;
706 LONG no_of_phys_items;
708 CustomBlock *block_list;
710 LONG bEnableCompression;
723 } DfsHeader, *LPHEAD;
868 LPCTSTR apptitle, LONG appverno, LONG no_of_items,
869 StatType stat_type, LPHEAD *pdfs_rtn);
906 m0LINK LONG m0IMEX
dfsSetEncodeKey(LPHEAD pdfs,
int *xkey,
int *ykey,
int *zkey,
int nRecordSize);
1010 LPHEAD *pdfs_rtn, LPFILE *fp_rtn);
1043 FillBufferCallback callback,
1044 LPHEAD *pdfs_rtn, LPFILE *fp_rtn);
1065 LPHEAD pdfs, LPFILE *fp_rtn);
1090 LPHEAD pdfs, LPFILE *fp_rtn, BOOL canRead);
1116 WriteBufferCallback callback,
1117 LPHEAD pdfs, LPFILE *fp_rtn);
1140 LPHEAD *pdfs_rtn, LPFILE *fp_rtn);
1165 LPHEAD *pdfs_rtn, LPFILE *fp_rtn);
1660 LPCTSTR *projection_id_rtn,
1661 double *lon0_rtn,
double *lat0_rtn,
1662 double *orientation_rtn);
1687 LPCTSTR projection_id,
1688 double lon0,
double lat0,
1689 double orientation);
1719 double lon0,
double lat0,
1720 double orientation);
1825 LPCTSTR *t_eum_unit_rtn,
double *tstart_rtn,
1826 double *tstep_rtn, LONG *tnum_rtn, LONG *tindex_rtn);
1856 LPCTSTR *t_eum_unit_rtn,
double *tstart_rtn,
1857 double *tspan_rtn, LONG *tnum_rtn, LONG *tindex_rtn);
1879 double tstart,
double tstep, LONG tindex);
1901 double tstart, LONG tindex);
1933 LPCTSTR *start_date_rtn, LPCTSTR *start_time_rtn,
1934 LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn,
1935 double *tstart_rtn,
double *tstep_rtn,
1936 LONG *tnum_rtn, LONG *tindex_rtn);
1969 LPCTSTR *start_date_rtn, LPCTSTR *start_time_rtn,
1970 LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn,
1971 double *tstart_rtn,
double *tspan_rtn,
1972 LONG *tnum_rtn, LONG *tindex_rtn);
1997 LPCTSTR start_date, LPCTSTR start_time,
1998 LONG n_eum_unit,
double tstart,
double tstep, LONG tindex);
2023 LPCTSTR start_date, LPCTSTR start_time,
2024 LONG n_eum_unit,
double tstart, LONG tindex);
2079 m0LINK LONG m0IMEX dfsGetItemInfo_(LPITEM item,
2080 LONG *item_type_rtn, LPCTSTR *name_rtn,
2081 LPCTSTR *unit_rtn,
SimpleType *data_type_rtn);
2082 m0LINK LONG m0IMEX dfsSetItemInfo_(LPHEAD pdfs, LPITEM item,
2083 LONG item_type, LPCTSTR name,
2202 LONG *n_eum_item_type_rtn,
2203 LPCTSTR *t_eum_item_type_rtn,
2205 LONG *n_eum_unit_rtn,
2206 LPCTSTR *t_eum_unit_rtn,
2234 LONG n_eum_item_type,
2258 LONG n_eum_item_type,
2262 m0LINK LONG m0IMEX dfsRqItemUnit_(LPITEM item,
2529 double *min_rtn,
double *max_rtn,
2530 LONG *no_of_del_values_rtn);
2641 LPCTSTR *t_eum_unit_rtn);
2663 LONG j,
float x0,
float dx);
2688 LPCTSTR *t_eum_unit_rtn,
2689 LONG *j_rtn,
float *x0_rtn,
float *dx_rtn);
2716 float dx,
float dy);
2748 LPCTSTR *t_eum_unit_rtn,
2749 LONG *j_rtn, LONG *k_rtn,
2750 float *x0_rtn,
float *y0_rtn,
2751 float *dx_rtn,
float *dy_rtn);
2779 LONG j, LONG k, LONG l,
2780 float x0,
float y0,
float z0,
2781 float dx,
float dy,
float dz);
2819 LPCTSTR *t_eum_unit_rtn,
2820 LONG *j_rtn, LONG *k_rtn, LONG *l_rtn,
2821 float *x0_rtn,
float *y0_rtn,
float *z0_rtn,
2822 float *dx_rtn,
float *dy_rtn,
float *dz_rtn);
2853 LONG j, LONG k, LONG l, LONG m,
2854 float x0,
float y0,
float z0,
float f0,
2855 float dx,
float dy,
float dz,
float df);
2899 LPCTSTR *t_eum_unit_rtn,
2900 LONG *j_rtn, LONG *k_rtn, LONG *l_rtn, LONG *m_rtn,
2901 float *x0_rtn,
float *y0_rtn,
float *z0_rtn,
float *f0_rtn,
2902 float *dx_rtn,
float *dy_rtn,
float *dz_rtn,
float *df_rtn);
2928 Coords *coords, BOOL coords_copy);
2951 LPCTSTR *t_eum_unit_rtn,
2953 Coords **coords_rtn);
2981 double *xcoords,
double *ycoords, BOOL coords_copy);
3009 LPCTSTR *t_eum_unit_rtn,
3010 LONG *j_rtn, LONG *k_rtn,
3011 double **xcoords_rtn,
double **ycoords_rtn);
3040 LONG j, LONG k, LONG l,
3041 double *xcoords,
double *ycoords,
double *zcoords,
3074 LPCTSTR *t_eum_unit_rtn,
3075 LONG *j_rtn, LONG *k_rtn, LONG *l_rtn,
3076 double **xcoords_rtn,
double **ycoords_rtn,
double **zcoords_rtn);
3104 double *xcoords,
double *ycoords, BOOL coords_copy);
3132 LPCTSTR *t_eum_unit_rtn,
3133 LONG *j_rtn, LONG *k_rtn,
3134 double **xcoords_rtn,
double **ycoords_rtn);
3163 LONG j, LONG k, LONG l,
3164 double *xcoords,
double *ycoords,
double *zcoords,
3197 LPCTSTR *t_eum_unit_rtn,
3198 LONG *j_rtn, LONG *k_rtn, LONG *l_rtn,
3199 double **xcoords_rtn,
double **ycoords_rtn,
double **zcoords_rtn);
3222 m0LINK LONG m0IMEX dfsSetItemAxisTvarD1(LPITEM item, LONG n_eum_unit, LONG j);
3246 m0LINK LONG m0IMEX dfsGetItemAxisTvarD1(LPITEM item, LONG *n_eum_unit_rtn,
3247 LPCTSTR *t_eum_unit_rtn, LONG *j_rtn);
3269 m0LINK LONG m0IMEX dfsSetItemAxisTvarD2(LPITEM item, LONG n_eum_unit,
3296 m0LINK LONG m0IMEX dfsGetItemAxisTvarD2(LPITEM item, LONG *n_eum_unit_rtn,
3297 LPCTSTR *t_eum_unit_rtn,
3298 LONG *j_rtn, LONG *k_rtn);
3321 m0LINK LONG m0IMEX dfsSetItemAxisTvarD3(LPITEM item, LONG n_eum_unit,
3322 LONG j, LONG k, LONG l);
3351 m0LINK LONG m0IMEX dfsGetItemAxisTvarD3(LPITEM item, LONG *n_eum_unit_rtn,
3352 LPCTSTR *t_eum_unit_rtn,
3353 LONG *j_rtn, LONG *k_rtn, LONG *l_rtn);
3434 double *min_rtn,
double *max_rtn,
double *mean_rtn,
3435 double *st_dev_rtn,
double *auto_corr_rtn,
3436 LONG *no_of_values_rtn,
3437 LONG *no_of_del_values_rtn,
3438 LONG *no_of_pairs_rtn);
3474 LPCTSTR name, LONG n_elements,
void *data_ptr);
3524 LPCTSTR *name_rtn, LONG *n_elements_rtn,
void **data_ptr_rtn,
3525 LPBLOCK *pNextBlock_rtn);
3772 double *time_rtn,
void *dataptr_rtn);
3791 double time,
void *dataptr);
3817 m0LINK LONG m0IMEX dfsQueryFreeItemTimeStep(LPHEAD pdfs, LPFILE fp,
3836 m0LINK LONG m0IMEX dfsReadFreeItemTimeStep(LPHEAD pdfs, LPFILE fp,
3837 double *time_rtn,
void *dataptr_rtn);
3855 m0LINK LONG m0IMEX dfsWriteFreeItemTimeStep(LPHEAD pdfs, LPFILE fp,
3856 LONG item_no,
double time,
void *dataptr);
3874 m0LINK LONG m0IMEX dfsReadItemTvarTimeStep(LPHEAD pdfs, LPFILE fp,
3875 Coords *coords_rtn,
void *dataptr_rtn);
3893 m0LINK LONG m0IMEX dfsWriteItemTvarTimeStep(LPHEAD pdfs, LPFILE fp,
3894 Coords *coords,
void *dataptr);
3910 m0LINK LONG m0IMEX dfsQueryFreeItemTvarTimeStep(LPHEAD pdfs,
3911 LPFILE fp, LONG *item_no_rtn);
3931 m0LINK LONG m0IMEX dfsReadFreeItemTvarTimeStep(LPHEAD pdfs,
3932 LPFILE fp,
double *time_rtn, Coords *coords_rtn,
3952 m0LINK LONG m0IMEX dfsWriteFreeItemTvarTimeStep(LPHEAD pdfs,
3953 LPFILE fp, LONG item_no,
double time,
3954 Coords *coords,
void *dataptr);
3981 LPFILE fp, LONG tstep_no, LONG item_no);
4004 LPFILE fp, LONG tstep_no);
4027 LPFILE fp, LONG item_no);
4049 m0LINK LONG m0IMEX _dfsGetTimeAxisSpan(LPHEAD pdfs, LPFILE fp,
double *tspan_rtn);
4066 m0LINK LONG m0IMEX MzProject_AddFile(LPCTSTR lpszPath);
4076 m0LINK BOOL m0IMEX MzCreateFolder(LPCTSTR lpszPath);
4078 m0LINK BOOL m0IMEX MzShortCut_IsShortcut(LPCTSTR lpszPath);
4079 m0LINK HRESULT m0IMEX MzShortCut_ResolveShortcut(LPCTSTR lpszShortcutPath, LPTSTR lpszFilePath);
m0LINK LONG m0IMEX dfsStaticSetHeader(LPHEAD pdfs, LPITEM item)
Connects the header to the static item. This is required if the static item needs to be updated.
m0LINK LONG m0IMEX dfsGetCustomBlockRef(LPHEAD pdfs, LPBLOCK *pBlock_rtn)
retrieves a reference to the first custom defined block in a file if any blocks are found.
m0LINK LONG m0IMEX dfsWriteStartBlockDynamic(LPHEAD pdfs, LPFILE fp)
Writes a "start-of-dynamic-block" tag to the file, effectively ending the header part and the static ...
m0LINK LONG m0IMEX dfsSetAppTitle(LPHEAD pdfs, LPCTSTR apptitle)
Copies the string from the apptitle-text string to a corresponding field in the header structure poin...
m0LINK LONG m0IMEX dfsFileAppend(LPCTSTR pathname, LPHEAD *pdfs_rtn, LPFILE *fp_rtn)
Opens the file specified by pathname for appending, automatically reads the static header information...
m0LINK LONG m0IMEX dfsFileFlushTimeStep(LPHEAD pdfs, LPFILE fp)
Flushes the file specified by fp and updates the time step information in the header information poin...
m0LINK LONG m0IMEX dfsFileCreate(LPCTSTR pathname, LPHEAD pdfs, LPFILE *fp_rtn)
Creates a file specified by pathname for writing, automatically writes the static header information ...
m0LINK LPITEM m0IMEX dfsItemS(LPVECTOR pvec)
Maps a static vector to a direct reference to the geometrical description of the item (static and dyn...
m0LINK LONG m0IMEX dfsFindBlockStatic(LPHEAD pdfs, LPFILE fp)
Sets the position of the file pointer fp to the beginning of the static vector (topography) block.
m0LINK LONG m0IMEX dfsGetNeqCalendarAxis(LPHEAD pdfs, LPCTSTR *start_date_rtn, LPCTSTR *start_time_rtn, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, double *tstart_rtn, double *tspan_rtn, LONG *tnum_rtn, LONG *tindex_rtn)
Retrieves the description of a non equidistant time axis from the header structure pointed to by pdfs...
m0LINK LONG m0IMEX dfsGetItemAxisEqD4(LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, LONG *l_rtn, LONG *m_rtn, float *x0_rtn, float *y0_rtn, float *z0_rtn, float *f0_rtn, float *dx_rtn, float *dy_rtn, float *dz_rtn, float *df_rtn)
Retrieves the relative axis description of an individually selected 4-dimensional equidistant item po...
m0LINK LONG m0IMEX dfsSetItemAxisEqD0(LPITEM item, LONG n_eum_unit)
Sets the relative axis description of an individually selected 0-dimensional equidistant item pointed...
m0LINK LONG m0IMEX dfsGetItemValueType(LPITEM item, DataValueType *value_type)
Gets the Data value type of the specified item.
m0LINK char m0IMEX dfsGetDeleteValByte(LPHEAD pdfs)
Retrieves the char-type delete value from the header structure pointed to by pdfs.
m0LINK LONG m0IMEX dfsUpdateGeoInfoUTMProj(LPHEAD pdfs, LPCTSTR projection_id, double lon0, double lat0, double orientation)
Updates the GeoInfo projection, sets the zone and sets the longitude, latitude and orientation of the...
m0LINK LONG m0IMEX dfsFileCreateEx(LPCTSTR pathname, LPHEAD pdfs, LPFILE *fp_rtn, BOOL canRead)
Creates a file specified by pathname for writing, automatically writes the static header information ...
m0LINK LONG m0IMEX dfsGetItemAxisCurveLinearD3(LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, LONG *l_rtn, double **xcoords_rtn, double **ycoords_rtn, double **zcoords_rtn)
Retrieves the relative axis description of an individually selected 3-dimensional curvelinear item po...
m0LINK LONG m0IMEX dfsGetItemAxisEqD3(LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, LONG *l_rtn, float *x0_rtn, float *y0_rtn, float *z0_rtn, float *dx_rtn, float *dy_rtn, float *dz_rtn)
Retrieves the relative axis description of an individually selected 3-dimensional equidistant item po...
m0LINK LONG m0IMEX dfsSetItemAxisOrientation(LPITEM item, float alpha, float phi, float theta)
Sets the orientation of the reference coordinate system of a n-dimensional item pointed to by Item,...
m0LINK LONG m0IMEX dfsGetItemAxisNeqD1(LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, Coords **coords_rtn)
Retrieves the relative axis description of an individually selected 1-dimensional curvelinear item po...
m0LINK LONG m0IMEX dfsGetNoOfItems(LPHEAD pdfs)
Returns the number of dynamic items defined in the header structure pointed to by pdfs.
m0LINK LONG m0IMEX dfsSetTimeStartEnd(LPHEAD pdfs, double startTimeOffset, double timeSpan)
Sets explicitly the time of the first data set and the time span of the data set in the header.
StatType
Statistical values types.
m0LINK LONG m0IMEX dfsSetDeleteValFloat(LPHEAD pdfs, float fdel)
Copies the float-delete value from fdel to a corresponding field in the header structure pointed to b...
m0LINK LONG m0IMEX dfsFileDelete(LPCTSTR pathname)
Deletes the file, if it exists.
@ F_NEQTIME_FIXEDSPACE_ALLITEMS
File with: Non-equidistant time (spatial axis fixed in time, all items in every time step).
@ F_NEQTIME_TVARSPACE_VARITEMS
No longer in use.
@ F_EQTIME_TVARSPACE_ALLITEMS
No longer in use.
@ F_NEQTIME_FIXEDSPACE_VARITEMS
No longer in use.
@ F_EQTIME_FIXEDSPACE_ALLITEMS
File with: Equidistant time (spatial axis fixed in time, all items in every time step).
GeoInfoType
Defines whether the geographical projection is defined as a UTM projection type, or in other case,...
@ F_UNDEFINED_GEOINFO
No projection defined in file. Only very old DFS files has this set.
@ F_UTM_PROJECTION
A projection is defined in file. It need not be an UTM projection, even though the name indicates tha...
m0LINK LONG m0IMEX dfsSetGeoInfoUndefined(LPHEAD pdfs)
Sets the type of projection to be undefined. If no geographical information is available or the proje...
m0LINK LONG m0IMEX dfsSetEqTimeAxis(LPHEAD pdfs, LONG n_eum_unit, double tstart, double tstep, LONG tindex)
Copies the description of an equidistant time axis to the corresponding fields in the header structur...
m0LINK ULONG m0IMEX dfsGetUsedItemElements(LPITEM item)
Retrieves the number of actually used elements for an item pointed to by Item.
m0LINK SpaceAxisType m0IMEX dfsGetItemAxisType(LPITEM item)
Retrieves the spatial axis type of an individually selected item pointed to by Item.
m0LINK LONG m0IMEX dfsGetItemAxisNeqD2(LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, double **xcoords_rtn, double **ycoords_rtn)
Retrieves the relative axis description of an individually selected 2-dimensional non equidistant but...
m0LINK LONG m0IMEX dfsGetItemAxisUnitConversion(LPITEM item, UnitConvType *nConvType_rtn, LONG *nUnit_rtn)
Gets the unit conversion for the axis of a specific item.
m0LINK LONG m0IMEX dfsGetItemStats(LPHEAD pdfs, LONG item_no, LONG cOff, double *min_rtn, double *max_rtn, double *mean_rtn, double *st_dev_rtn, double *auto_corr_rtn, LONG *no_of_values_rtn, LONG *no_of_del_values_rtn, LONG *no_of_pairs_rtn)
Retrieves the statistical description of an individually selected gridpoint of an individually select...
m0LINK LONG m0IMEX dfsSetEncodeKey(LPHEAD pdfs, int *xkey, int *ykey, int *zkey, int nRecordSize)
Sets the encoding key for compressing the dfs file.
m0LINK LONG m0IMEX dfsGetAssocStatic(LPHEAD pdfs, LONG item_no, LONG staSeqNo, LONG *staItNo_rtn)
Retrieves the index number of a static item associated with the dynamic item specified by item_no.
m0LINK ULONG m0IMEX dfsGetItemBytes(LPITEM item)
Retrieves the number of bytes for an item pointed to by It.
m0LINK LONG m0IMEX dfsWriteItemTimeStep(LPHEAD pdfs, LPFILE fp, double time, void *dataptr)
Writes the time step of the next item in the file.
m0LINK LONG m0IMEX dfsEnablePlugin(const LPHEAD pdfs, const LPFILE fp)
Enables the load of a plugin-dll and initializes it, if it's available.
m0LINK LONG m0IMEX dfsFindItemDynamic(LPHEAD pdfs, LPFILE fp, LONG tstep_no, LONG item_no)
Positions the file pointer at the location in the file where the specified item at the specified time...
m0LINK LONG m0IMEX dfsReadItemTimeStep(LPHEAD pdfs, LPFILE fp, double *time_rtn, void *dataptr_rtn)
Reads the time step of the next item in the file.
m0LINK ULONG m0IMEX dfsGetDeleteValUnsignedInt(LPHEAD pdfs)
Retrieves the ULONG (unsigned int)-type delete value from the header structure pointed to by pdfs.
m0LINK LONG m0IMEX dfsGetEncodeKey(LPHEAD pdfs, int *xkey, int *ykey, int *zkey)
Gets the compression encoding key.
m0LINK LONG m0IMEX dfsSetItemAxisEqD4(LPITEM item, LONG n_eum_unit, LONG j, LONG k, LONG l, LONG m, float x0, float y0, float z0, float f0, float dx, float dy, float dz, float df)
Sets the relative axis description of an individually selected 4-dimensional equidistant item pointed...
m0LINK LONG m0IMEX dfsGetItemUnitConversion(LPITEM item, UnitConvType *nConvType_rtn, LONG *nUnit_rtn)
Gets the unit conversion for a specific item.
m0LINK ULONG m0IMEX dfsGetItemElements(LPITEM item)
Retrieves the number of elements for an item pointed to by It.
m0LINK LONG m0IMEX dfsTruncateItemTimeStep(LPHEAD pdfs, LONG item_no, LONG ndigit, void *dataptr)
Truncate the item data of a dfs file to a given number of digits.
LONG(m0CABA * FErrorHandlerT)(void *headptr, void *fileptr, void *vectorptr, FioErrors ioError, LPCTSTR src_file, int line)
m0LINK void m0IMEX dfsAddCommonErrorHandler(FErrorHandlerT dfsErrorHandler)
Adds a common error handler for all types of errors.
m0LINK void m0IMEX dfsInitSystem()
Initializes the entire dfs system.
m0LINK LONG m0IMEX dfsSetItemAxisNeqD1(LPITEM item, LONG n_eum_unit, LONG j, Coords *coords, BOOL coords_copy)
Sets the relative axis description of an individually selected 1-dimensional curvelinear item pointed...
m0LINK LONG m0IMEX dfsAddCustomBlock(LPHEAD pdfs, SimpleType data_type, LPCTSTR name, LONG n_elements, void *data_ptr)
adds a custom defined block of data to the file in form of an array.
m0LINK LONG m0IMEX dfsSetNeqTimeAxis(LPHEAD pdfs, LONG n_eum_unit, double tstart, LONG tindex)
Copies the description of a non equidistant time axis to the corresponding fields in the header struc...
m0LINK LONG m0IMEX dfsFileRead(LPCTSTR pathname, LPHEAD *pdfs_rtn, LPFILE *fp_rtn)
Opens the file specified by pathname for reading, automatically reads the static header information a...
m0LINK LONG m0IMEX dfsGetItemAxisNeqD3(LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, LONG *l_rtn, double **xcoords_rtn, double **ycoords_rtn, double **zcoords_rtn)
Retrieves the relative axis description of an individually selected 3-dimensional non equidistant but...
m0LINK LONG m0IMEX dfsSetNumberOfTimeSteps(LPHEAD pdfs, LONG n_number_of_time_steps)
Sets explicitly the number of time steps in the header.
TimeAxisType
Defines the regularity of the time axis used for the time series data. When the data is uniformly dis...
@ F_CAL_NEQ_AXIS
Non-equidistant calendar axis.
@ F_TM_EQ_AXIS
Equidistant time axis.
@ F_CAL_EQ_AXIS
Equidistant calendar axis.
@ F_TM_NEQ_AXIS
Non-equidistant time axis.
m0LINK LONG m0IMEX dfsStaticDestroy(LPVECTOR *pvec_rtn)
Frees the appropriate data structures for the static vector specified by pvec_rtn....
m0LINK LONG m0IMEX dfsFindTimeStep(LPHEAD pdfs, LPFILE fp, LONG tstep_no)
Positions the file pointer at the location in the file where the the specified time step starts.
m0LINK LONG m0IMEX dfsSetItemAxisCurveLinearD2(LPITEM item, LONG n_eum_unit, LONG j, LONG k, double *xcoords, double *ycoords, BOOL coords_copy)
Sets the relative axis description of an individually selected 2-dimensional curvelinear item pointed...
m0LINK LONG m0IMEX dfsSetItemInfo(LPHEAD pdfs, LPITEM item, LONG n_eum_item_type, LPCTSTR name, LONG n_eum_unit, SimpleType data_type)
Copies the common item information to the item pointed to by Item.
m0LINK LONG m0IMEX dfsFindBlockDynamic(LPHEAD pdfs, LPFILE fp)
Sets the position of the file pointer fp to the beginning of the dynamic block, that is at the beginn...
m0LINK LONG m0IMEX dfsGetDataType(LPHEAD pdfs)
Retrieves the tag-variable defining the type of data.
m0LINK LONG m0IMEX dfsGetItemGeometryUnit(LPITEM item)
Retrieves the unit type of the spatial dimension of an individually selected item pointed to by Item.
m0LINK LONG m0IMEX dfsStaticSkip(LPFILE fp)
Skips a static item and jumps to the next one.
m0LINK LONG m0IMEX dfsSetNeqCalendarAxis(LPHEAD pdfs, LPCTSTR start_date, LPCTSTR start_time, LONG n_eum_unit, double tstart, LONG tindex)
Copies the description of a non equidistant calendar axis to the corresponding fields in the header s...
m0LINK LONG m0IMEX dfsFindItemStatic(LPHEAD pdfs, LPFILE fp, LONG item_no)
Positions the file pointer at the location in the file where the specified static item starts.
m0LINK TimeAxisType m0IMEX dfsGetTimeAxisType(LPHEAD pdfs)
Retrieves the time axis type of the data set from the header structure pointed to by pdfs.
m0LINK LONG m0IMEX dfsGetItemAxisEqD0(LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn)
Retrieves the relative axis description of an individually selected 0-dimensional equidistant item po...
m0LINK ULONG m0IMEX dfsGetNoAssocStatic(LPHEAD pdfs, LONG item_no)
Retrieves the number of static items associated with the dynamic item specified by item_no.
m0LINK LONG m0IMEX dfsSetDeleteValInt(LPHEAD pdfs, LONG idel)
Copies the LONG-delete value from idel to a corresponding field in the header structure pointed to by...
m0LINK LONG m0IMEX dfsHeaderDestroy(LPHEAD *pdfs_rtn)
Frees the appropriate data structures for the header associated with a file.
m0LINK LONG m0IMEX dfsUpdateItemInfo(LPHEAD pdfs, LPITEM item, LONG n_eum_item_type, LPCTSTR name, LONG n_eum_unit)
Updates the common item information of an item of an existing file. Item is pointed to by Item.
m0LINK ULONG m0IMEX dfsGetUsedItemBytes(LPITEM item)
Retrieves the number of packed bytes for an item pointed to by It.
m0LINK LONG m0IMEX dfsGetItemAxisOrientation(LPITEM item, float *alpha_rtn, float *phi_rtn, float *theta_rtn)
Retrieves the orientation of the reference coordinate system of a n-dimensional item pointed to by It...
m0LINK LONG m0IMEX dfsIsFileCompressed(LPHEAD pdfs)
Returns flag indicating if file is compressed.
m0LINK LONG m0IMEX dfsGetCustomBlock(LPBLOCK pblock, SimpleType *data_type_rtn, LPCTSTR *name_rtn, LONG *n_elements_rtn, void **data_ptr_rtn, LPBLOCK *pNextBlock_rtn)
retrieves the data of a custom defined block when a reference pblock is given.
m0LINK LONG m0IMEX dfsGetItemAxisEqD1(LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, float *x0_rtn, float *dx_rtn)
Retrieves the relative axis description of an individually selected 1-dimensional equidistant item po...
m0LINK LONG m0IMEX dfsStaticCreate(LPVECTOR *pvec_rtn)
Creates the appropriate data structures for a new static vector.
SpaceAxisType
Defines the regularity of the space axis used for the time series data. When the data is uniformly di...
@ F_TVAR_AXIS_D2
No longer used.
@ F_TVAR_AXIS_D1
No longer used.
@ F_NEQ_AXIS_D1
Non-Equidistant 1 dimensional axis - dfs1 files.
@ F_EQ_AXIS_D4
Equidistant 4 dimensional axis.
@ F_CURVE_LINEAR_AXIS_D3
Curve-linear 3 dimensional axis - dfs3 files.
@ F_NEQ_AXIS_D2
Non-equidistant 2 dimensional orthogonal axis.
@ F_EQ_AXIS_D3
Equidistant 3 dimensional axis - dfs3 files.
@ F_CURVE_LINEAR_AXIS_D2
Curve-linear 2 dimensional axis - dfs2 files.
@ F_EQ_AXIS_D2
Equidistant 2 dimensional axis - the standard dfs2 files.
@ F_EQ_AXIS_D0
Zero dimensional axis - dfs0 files.
@ F_EQ_AXIS_D1
Equidistant 1 dimensional axis - dfs1 files.
@ F_TVAR_AXIS_D3
No longer used.
@ F_NEQ_AXIS_D3
Non-equidistant 3 dimensional orthogonal axis. Not used currently.
m0LINK LONG m0IMEX dfsSetEqCalendarAxis(LPHEAD pdfs, LPCTSTR start_date, LPCTSTR start_time, LONG n_eum_unit, double tstart, double tstep, LONG tindex)
Copies the description of an equidistant calendar axis to the corresponding fields in the header stru...
m0LINK ULONG m0IMEX dfsGetItemXYSize(LPITEM item)
Retrieves the number of horisontal elements, ie. in the plane X-Y for an item pointed to by Item,...
m0LINK LONG m0IMEX dfsGetEncodeKeySize(LPHEAD pdfs)
Gets the compression encoding key size.
m0LINK LONG m0IMEX dfsIsItemCompressed(LPITEM item, LONG *n_rec_size_rtn)
Determines whether the selected item is compressed in a MIKE 3 or a MIKE 21 compressed file....
m0LINK LONG m0IMEX dfsHeaderCreate(FileType file_type, LPCTSTR title, LPCTSTR apptitle, LONG appverno, LONG no_of_items, StatType stat_type, LPHEAD *pdfs_rtn)
Creates the appropriate data structures for the header associated with a file.
m0LINK void m0IMEX dfsAddErrorHandler(FioErrors ioError, FErrorHandlerT dfsErrorHandler)
Adds an error handler for specific types of errors.
m0LINK LONG m0IMEX dfsSetAssocStatic(LPHEAD pdfs, LONG item_no, LONG staItNo)
Associates a static item specified by staItNo with a dynamic item specified by item_no (establishes a...
m0LINK GeoInfoType m0IMEX dfsGetGeoInfoType(LPHEAD pdfs)
Retrieves the type of geographical information from the header structure pointed to by pdfs.
m0LINK LONG m0IMEX dfsSetAppVersionNo(LPHEAD pdfs, LONG appverno)
Copies the application version number from the appverno to a corresponding field in the header struct...
m0LINK LONG m0IMEX dfsGetItemGeometryType(LPITEM item)
Retrieves the type of geometry type, according to the dimension of the spatial axis of an individuall...
m0LINK LPVECTOR m0IMEX dfsStaticRead(LPFILE fp, LONG *fioError)
Reads a static vector from the file pointed to by fp. dfsStaticRead allocates the memory necessary to...
m0LINK LONG m0IMEX dfsStreamRead(unsigned char *buffer, size_t bufferSize, FillBufferCallback callback, LPHEAD *pdfs_rtn, LPFILE *fp_rtn)
Use buffer for reading data, and when read to end-of-buffer, the callback is used to fill the buffer ...
m0LINK LONG m0IMEX dfsSetItemAxisUnitConversion(LPITEM item, UnitConvType nConvType, LONG nUnit)
Sets the unit conversion for the axis of a specific item.
m0LINK LONG m0IMEX dfsSetItemValueType(LPITEM item, DataValueType value_type)
Sets the data value type for the specified item.
m0LINK LONG m0IMEX dfsGetItemAxisEqD2(LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, float *x0_rtn, float *y0_rtn, float *dx_rtn, float *dy_rtn)
Retrieves the relative axis description of an individually selected 2-dimensional equidistant item po...
m0LINK LONG m0IMEX dfsSetGeoInfoUTMProj(LPHEAD pdfs, LPCTSTR projection_id, double lon0, double lat0, double orientation)
Sets the type of projection to be UTM-projection, sets the zone and sets the longitude,...
m0LINK float m0IMEX dfsGetDeleteValFloat(LPHEAD pdfs)
Retrieves the float-type delete value from the header structure pointed to by pdfs.
m0LINK LONG m0IMEX dfsStaticGetData(LPVECTOR pvec, void *data)
Retrieves the actual data from the static vector pointed to by pvec and copies them to the array spec...
m0LINK LONG m0IMEX dfsGetItemInfo(LPITEM item, LONG *n_eum_item_type_rtn, LPCTSTR *t_eum_item_type_rtn, LPCTSTR *name_rtn, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, SimpleType *data_type_rtn)
Retrieves the item information that are common for all items both dynamic and static and 0- to 3-dime...
m0LINK LONG m0IMEX dfsFileFlush(LPHEAD pdfs, LPFILE fp)
Flushes the file specified by fp and updates the header information pointed to by pdfs.
m0LINK LPCTSTR m0IMEX dfsGetAppTitle(LPHEAD pdfs)
Retrieves the application title string of the data from the header structure.
m0LINK LONG m0IMEX dfsGetNeqTimeAxis(LPHEAD pdfs, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, double *tstart_rtn, double *tspan_rtn, LONG *tnum_rtn, LONG *tindex_rtn)
Retrieves the description of a non equidistant time axis from the header structure pointed to by pdfs...
m0LINK LONG m0IMEX dfsSetItemAxisCurveLinearD3(LPITEM item, LONG n_eum_unit, LONG j, LONG k, LONG l, double *xcoords, double *ycoords, double *zcoords, BOOL coords_copy)
Sets the relative axis description of an individually selected 3-dimensional curvelinear item pointed...
m0LINK LONG m0IMEX dfsSetDataType(LPHEAD pdfs, LONG data_type)
Sets the tag-variable defining the type of data pointed to by pdfs..
m0LINK LONG m0IMEX dfsGetVersionCurrent()
Retrieves the version number of the ufs-library that is currently being used.
m0LINK LONG m0IMEX dfsSetDeleteValUnsignedInt(LPHEAD pdfs, ULONG udel)
Copies the ULONG-delete value from udel to a corresponding field in the header structure pointed to b...
m0LINK LONG m0IMEX dfsGetDeleteValInt(LPHEAD pdfs)
Retrieves the int-type delete value from the header structure pointed to by pdfs.
m0LINK LONG m0IMEX dfsParamModifyTimes(LPHEAD pdfs, BOOL doModify)
Sets the parameter deciding whether times stored in the dfs should be modified. Default is true.
m0LINK LONG m0IMEX dfsGetItemAxisCurveLinearD2(LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, double **xcoords_rtn, double **ycoords_rtn)
Retrieves the relative axis description of an individually selected 2-dimensional curvelinear item po...
m0LINK LONG m0IMEX dfsGetAppVersionNo(LPHEAD pdfs)
Retrieves the version number of the application from the header structure.
m0LINK LONG m0IMEX dfsGetItemStatsGlobal(LPITEM item, double *min_rtn, double *max_rtn, LONG *no_of_del_values_rtn)
Retrieves the global statistical values of an individually selected item pointed to by Item.
m0LINK LONG m0IMEX dfsSetItemAxisNeqD3(LPITEM item, LONG n_eum_unit, LONG j, LONG k, LONG l, double *xcoords, double *ycoords, double *zcoords, BOOL coords_copy)
Sets the relative axis description of an individually selected 3-dimensional non equidistant but orth...
m0LINK FileType m0IMEX dfsGetFileType(LPHEAD pdfs)
Retrieves the file type of the file pointed to by pdfs.
m0LINK ULONG m0IMEX dfsGetItemXSize(LPITEM item)
Retrieves the number of elements in the X axis, for an item pointed to by Item, in rectangular grids ...
m0LINK LONG m0IMEX dfsSetFileTitle(LPHEAD pdfs, LPCTSTR title)
Copies the string from the title-text string to a corresponding field in the header structure pointed...
m0LINK LONG m0IMEX dfsUnloadPlugin(LPHEAD pdfs)
Unloads a DFS plugin.
m0LINK LONG m0IMEX dfsSetItemRefCoords(LPITEM item, float x, float y, float z)
Sets the origin of the reference coordinate system of a n-dimensional item pointed to by Item,...
m0LINK LONG m0IMEX dfsFileClose(LPHEAD pdfs, LPFILE *fp_rtn)
Closes the file specified by fp_rtn and updates the header specified by pdfs.
m0LINK LONG m0IMEX dfsGetItemDim(LPITEM item)
Retrieves the dimension of the spatial axis of an individually selected item pointed to by Item.
m0LINK LONG m0IMEX dfsGetGeoInfoUTMProj(LPHEAD pdfs, LPCTSTR *projection_id_rtn, double *lon0_rtn, double *lat0_rtn, double *orientation_rtn)
Retrieves the geographical information for an UTM-projection. The longitude, latitude and orientation...
m0LINK LONG m0IMEX dfsSetItemAxisNeqD2(LPITEM item, LONG n_eum_unit, LONG j, LONG k, double *xcoords, double *ycoords, BOOL coords_copy)
Sets the relative axis description of an individually selected 2-dimensional non equidistant but orth...
m0LINK void m0IMEX dfsDebugOn(BOOL On)
Switches on/off the possibility for online debugging.
DataValueType
Type of data value to specify how each value is to be interpreted between two time step values....
@ F_STEP_ACCUMULATED
Value accumulated since last time step to current time step.
@ F_REV_MEAN_STEP_ACCUMULATED
Mean value from current to next time step. Also called: MeanStepForward.
@ F_ACCUMULATED
Value accumulated from start of time series to current time step.
@ F_INSTANTANEOUS
Value at current point in time, current time step.
@ F_MEAN_STEP_ACCUMULATED
Mean value from previous to current time step. Also called: MeanStepBackwards.
m0LINK LONG m0IMEX dfsSetDeleteValDouble(LPHEAD pdfs, double ddel)
Copies the double-delete value from ddel to a corresponding field in the header structure pointed to ...
m0LINK LONG m0IMEX dfsSetDeleteValByte(LPHEAD pdfs, char cdel)
Copies the char-delete value from cdel to a corresponding field in the header structure pointed to by...
m0LINK StatType m0IMEX dfsGetItemStatsType(LPHEAD pdfs)
retrieves the type of statistical values stored in the header part of the file pointed to by pdfs
m0LINK LONG m0IMEX dfsSkipItem(LPHEAD pdfs, LPFILE fp)
Skips the time step of the next item in the file.
m0LINK LONG m0IMEX dfsGetItemRefCoords(LPITEM item, float *x_rtn, float *y_rtn, float *z_rtn)
Retrieves the origin of the reference coordinate system of a n-dimensional item pointed to by Item,...
m0LINK LONG m0IMEX dfsGetEqTimeAxis(LPHEAD pdfs, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, double *tstart_rtn, double *tstep_rtn, LONG *tnum_rtn, LONG *tindex_rtn)
Retrieves the description of an equidistant time axis from the header structure pointed to by pdfs.
m0LINK LONG m0IMEX dfsSetItemUnitConversion(LPITEM item, UnitConvType nConvType, LONG nUnit)
Sets the unit conversion for a specific item.
m0LINK LPITEM m0IMEX dfsItemD(LPHEAD pdfs, LONG item_no)
Maps the item number item_no for the header structure pointed to by pdfs to a direct reference to the...
m0LINK LONG m0IMEX dfsStreamCreate(unsigned char *buffer, size_t bufferSize, WriteBufferCallback callback, LPHEAD pdfs, LPFILE *fp_rtn)
Creates a file and writes it to stream.
m0LINK LONG m0IMEX dfsSetItemAxisEqD1(LPITEM item, LONG n_eum_unit, LONG j, float x0, float dx)
Sets the relative axis description of an individually selected 1-dimensional equidistant item pointed...
m0LINK LONG m0IMEX dfsFileEdit(LPCTSTR pathname, LPHEAD *pdfs_rtn, LPFILE *fp_rtn)
Opens the file specified by pathname for editing, automatically reads the static header information a...
m0LINK LONG m0IMEX dfsGetEqCalendarAxis(LPHEAD pdfs, LPCTSTR *start_date_rtn, LPCTSTR *start_time_rtn, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, double *tstart_rtn, double *tstep_rtn, LONG *tnum_rtn, LONG *tindex_rtn)
Retrieves the description of an equidistant calendar axis from the header structure pointed to by pdf...
m0LINK LPCTSTR m0IMEX dfsGetFileTitle(LPHEAD pdfs)
Retrieves the title string of the data from the header structure.
m0LINK LONG m0IMEX dfsSetItemAxisEqD2(LPITEM item, LONG n_eum_unit, LONG j, LONG k, float x0, float y0, float dx, float dy)
Sets the relative axis description of an individually selected 2-dimensional equidistant item pointed...
m0LINK LONG m0IMEX dfsSkipTimeStep(LPHEAD pdfs, LPFILE fp)
Skips the entire time step containing all items stored consecutively in the time step.
m0LINK void m0IMEX dfsItemEnableCompression(LPHEAD pdfs)
Flags the header information structure of a file to enable compression of the file.
m0LINK LONG m0IMEX dfsSetItemAxisEqD3(LPITEM item, LONG n_eum_unit, LONG j, LONG k, LONG l, float x0, float y0, float z0, float dx, float dy, float dz)
Sets the relative axis description of an individually selected 3-dimensional equidistant item pointed...
m0LINK ULONG m0IMEX dfsGetItemXYZSize(LPITEM item)
Retrieves the number of actually used elements for an item pointed to by Item, in rectangular grids o...
m0LINK double m0IMEX dfsGetDeleteValDouble(LPHEAD pdfs)
Retrieves the double-type delete value from the header structure pointed to by pdfs.
m0LINK LONG m0IMEX dfsStaticWrite(LPVECTOR pvec, LPFILE fp, void *data)
Writes the static vector pointed to by pvec to the file pointed to by fp.