All Classes Functions Variables Properties
List of all members | Public Member Functions
CCWFGM_Grid Class Reference

Class CWFGM Grid. More...

#include <CWFGM_Grid.h>

Collaboration diagram for CCWFGM_Grid:
Collaboration graph

Public Member Functions

HRESULT IPersistStreamInit_Save (LPSTREAM pStm, BOOL fClearDirty, const ATL_PROPMAP_ENTRY *pMap)
 
HRESULT IPersistStreamInit_Load (LPSTREAM pStm, const ATL_PROPMAP_ENTRY *pMap)
 
STDMETHOD() GetAttribute (USHORT option, VARIANT *value)
 
STDMETHOD() SetAttribute (USHORT option, VARIANT value)
 
STDMETHOD() ExportGrid (const BSTR grid_file_name)
 
STDMETHOD() ImportElevation (const BSTR prj_file_name, const BSTR grid_file_name)
 
STDMETHOD() ImportGrid (const BSTR prj_file_name, const BSTR grid_file_name, long *fail_index)
 
STDMETHOD() Clone (ICWFGM_Grid **newGrid)
 
STDMETHOD() get_FuelMap (ICWFGM_FuelMap **pVal)
 
STDMETHOD() put_FuelMap (ICWFGM_FuelMap *newVal)
 
STDMETHOD() IsFuelUsed (ICWFGM_Fuel *fuel)
 
STDMETHOD() MT_Lock (__int64 layerThread, USHORT exclusive, USHORT obtain)
 
STDMETHOD() Valid (__int64 layerThread, ULONGLONG start_time, LONGLONG duration, ULONG option, SAFEARRAY **application_count)
 
STDMETHOD() GetAttribute (__int64 layerThread, USHORT option, VARIANT *value)
 
STDMETHOD() GetDimensions (__int64 layerThread, USHORT *x_dim, USHORT *y_dim)
 
STDMETHOD() GetFuelData (__int64 layerThread, USHORT _x, USHORT _y, ULONGLONG time, ICWFGM_Fuel **fuel)
 
STDMETHOD() GetFuelIndexData (__int64 layerThread, USHORT x, USHORT y, ULONGLONG time, UCHAR *fuel_index)
 
STDMETHOD() GetElevationData (__int64 layerThread, USHORT x, USHORT y, SHORT allow_defaults_returned, double *elevation, double *slope_factor, double *slope_azimuth)
 
STDMETHOD() GetWeatherData (__int64 layerThread, USHORT x, USHORT y, ULONGLONG time, ULONG interpolate_method, IWXData *wx, IFWIData *ifwi, DFWIData *dfwi)
 
STDMETHOD() GetAttributeData (__int64 layerThread, USHORT _x, USHORT _y, ULONGLONG time, USHORT option, VARIANT *attribute)
 
STDMETHOD() GetFuelDataArray (__int64 layerThread, USHORT _x_min, USHORT _y_min, USHORT _x_max, USHORT _y_max, ULONGLONG time, SAFEARRAY **fuel)
 
STDMETHOD() GetFuelIndexDataArray (__int64 layerThread, USHORT _x_min, USHORT _y_min, USHORT _x_max, USHORT _y_max, ULONGLONG time, SAFEARRAY **fuel)
 
STDMETHOD() GetElevationDataArray (__int64 layerThread, USHORT x_min, USHORT y_min, USHORT x_max, USHORT y_max, SHORT allow_defaults_returned, SAFEARRAY **elevation, SAFEARRAY **slope_factor, SAFEARRAY **slope_azimuth)
 
STDMETHOD() GetWeatherDataArray (__int64 layerThread, USHORT x_min, USHORT y_min, USHORT x_max, USHORT y_max, ULONGLONG time, ULONG interpolate_method, SAFEARRAY **wx, SAFEARRAY **ifwi, SAFEARRAY **dfwi)
 
STDMETHOD() GetAttributeDataArray (__int64 layerThread, USHORT _x_min, USHORT _y_min, USHORT _x_max, USHORT _y_max, ULONGLONG time, USHORT option, SAFEARRAY **attribute)
 
STDMETHOD() GetEventTime (__int64 layerThread, ULONG flags, ULONGLONG from_time, ULONGLONG *next_event)
 
STDMETHOD() PreCalculationEvent (__int64 layerThread, ULONGLONG time, ULONG mode)
 
STDMETHOD() PostCalculationEvent (__int64 layerThread, ULONGLONG time, ULONG mode)
 
STDMETHOD() GetGridEngine (__int64 layerThread, ICWFGM_GridEngine **pVal)
 
STDMETHOD() PutGridEngine (__int64 layerThread, ICWFGM_GridEngine *newVal)
 
STDMETHOD() get_LayerManager (ICWFGM_LayerManager **pVal)
 
STDMETHOD() put_LayerManager (ICWFGM_LayerManager *newVal)
 
STDMETHOD() get_UserData (VARIANT *pVal)
 
STDMETHOD() put_UserData (VARIANT newVal)
 
STDMETHOD() CreateGrid (USHORT xsize, USHORT ysize, double xllcorner, double yllcorner, double resolution, UCHAR BasicFuel)
 
STDMETHOD() CreateSlopeElevationGrid (SHORT elevation, USHORT slope, USHORT aspect)
 
STDMETHOD() WriteProjection (const BSTR szPath)
 
STDMETHOD() ExportElevation (const BSTR grid_file_name)
 
STDMETHOD() ExportSlope (const BSTR grid_file_name)
 
STDMETHOD() ExportAspect (const BSTR grid_file_name)
 
- Public Member Functions inherited from ICWFGM_Grid
HRESULT Clone ([out]ICWFGM_Grid **newGrid)
 
HRESULT ImportGrid ([in] const BSTR prj_file_name, [in]const BSTR grid_file_name, [out]long *fail_index)
 
HRESULT ImportElevation ([in] const BSTR prj_file_name, [in] const BSTR grid_file_name)
 
HRESULT ExportGrid ([in]const BSTR grid_file_name)
 
HRESULT IsFuelUsed ([in]ICWFGM_Fuel *fuel)
 
HRESULT GetAttribute ([in]unsigned short option, [out, retval]VARIANT *value)
 
HRESULT SetAttribute ([in]unsigned short option, [in]VARIANT value)
 
HRESULT WriteProjection ([in]const BSTR szPath)
 
HRESULT CreateGrid ([in]unsigned short xsize, [in]unsigned short ysize, [in]double xllcorner, [in]double yllcorner, [in]double resolution, [in]unsigned char BasicFuel)
 
HRESULT CreateSlopeElevationGrid ([in]short elevation, [in]unsigned short slope, [in]unsigned short aspect)
 
HRESULT ExportElevation ([in]const BSTR grid_file_name)
 
HRESULT ExportSlope ([in]const BSTR grid_file_name)
 
HRESULT ExportAspect ([in]const BSTR grid_file_name)
 
- Public Member Functions inherited from ICWFGM_GridEngine
HRESULT MT_Lock ([in] __int64 layerThread, [in] unsigned short exclusive, [in] unsigned short obtain)
 
HRESULT Valid ([in] __int64 layerThread, [in] unsigned __int64 start_time, [in] __int64 duration, [in] unsigned long option, [in, out] SAFEARRAY(unsigned short)*application_count)
 
HRESULT GetAttribute ([in] __int64 layerThread, [in] unsigned short option, [out, retval]VARIANT *value)
 
HRESULT GetDimensions ([in] __int64 layerThread, [out] unsigned short *x_dim, [out]unsigned short *y_dim)
 
HRESULT GetFuelData ([in] __int64 layerThread, [in] unsigned short _x, [in] unsigned short _y, [in] unsigned __int64 time, [out, retval]ICWFGM_Fuel **fuel)
 
HRESULT GetFuelIndexData ([in] __int64 layerThread, [in] unsigned short x, [in] unsigned short y, [in] unsigned __int64 time, [out, retval]unsigned char *fuel_index)
 
HRESULT GetElevationData ([in] __int64 layerThread, [in] unsigned short x, [in] unsigned short y, [in] short allow_defaults_returned, [out]double *elevation, [out] double *slope_factor, [out] double *slope_azimuth)
 
HRESULT GetAttributeData ([in] __int64 layerThread, [in] unsigned short x, [in] unsigned short y, [in] unsigned __int64 time, [in] unsigned short option, [out, retval] VARIANT *attribute)
 
HRESULT GetWeatherData ([in] __int64 layerThread, [in] unsigned short x, [in] unsigned short y, [in] unsigned __int64 time, [in]unsigned long interpolate_method, [out]IWXData *wx, [out]IFWIData *ifwi, [out]DFWIData *dfwi)
 
HRESULT GetFuelDataArray ([in] __int64 layerThread, [in] unsigned short _x_min, [in] unsigned short _y_min, [in] unsigned short _x_max, [in]unsigned short _y_max,[in]unsigned __int64 time, [in, out] SAFEARRAY(ICWFGM_Fuel *)*fuel)
 
HRESULT GetFuelIndexDataArray ([in] __int64 layerThread, [in]unsigned short _x_min, [in]unsigned short _y_min, [in]unsigned short _x_max, [in]unsigned short _y_max, [in]unsigned __int64 time, [in, out] SAFEARRAY(unsigned char)*fuel_index)
 
HRESULT GetElevationDataArray ([in] __int64 layerThread, [in]unsigned short x_min, [in]unsigned short y_min, [in]unsigned short x_max, [in]unsigned short y_max, [in]short allow_defaults_returned, [in, out] SAFEARRAY(double)*elevation, [in, out] SAFEARRAY(double)*slope_factor, [in, out] SAFEARRAY(double)*slope_azimuth)
 
HRESULT GetWeatherDataArray ([in] __int64 layerThread, [in]unsigned short x_min, [in]unsigned short y_min, [in]unsigned short x_max, [in] unsigned short y_max, [in]unsigned __int64 time, [in]unsigned long interpolate_method, [in, out] SAFEARRAY(IWXData)*wx, [in, out] SAFEARRAY(IFWIData)*ifwi, [in, out] SAFEARRAY(DFWIData)*dfwi)
 
HRESULT GetAttributeDataArray ([in] __int64 layerThread, [in]unsigned short x_min, [in]unsigned short y_min, [in]unsigned short x_max, [in]unsigned short y_max, [in] unsigned __int64 time, [in] unsigned short option, [in, out] SAFEARRAY(VARIANT)*attribute)
 
HRESULT GetEventTime ([in] __int64 layerThread, [in] unsigned long flags, [in] unsigned __int64 from_time, [out, retval] unsigned __int64 *next_event)
 
HRESULT PreCalculationEvent ([in] __int64 layerThread, [in] unsigned __int64 time, [in] unsigned long mode)
 
HRESULT PostCalculationEvent ([in] __int64 layerThread, [in] unsigned __int64 time, [in] unsigned long mode)
 
HRESULT GetGridEngine ([in] __int64 layerThread, [out, retval] ICWFGM_GridEngine **pVal)
 
HRESULT PutGridEngine ([in] __int64 layerThread, [in] ICWFGM_GridEngine *newVal)
 

Additional Inherited Members

- Properties inherited from ICWFGM_Grid
ICWFGM_FuelMap FuelMap [get, set]
 
- Properties inherited from ICWFGM_GridEngine
ICWFGM_LayerManager LayerManager [get, set]
 
VARIANT UserData [get, set]
 

Detailed Description

Class CWFGM Grid.

A CWFGM Grid is a representation of an area and supports two interfaces: one interface to perform basic assignment, modification, and import operations (ICWFGM_Grid), and a second interface for retrieval of data for purposes of simulations, etc. (ICWFGM_GridEngine). The second interface is a requirement for the simulation engine but is also used elsewhere to extract grid values for the display. These methods are separated into two interfaces to simplify building another grid object for use with the simulation engine.

Member Function Documentation

STDMETHODIMP CCWFGM_Grid::Clone ( ICWFGM_Grid **  newGrid)

Creates a new grid object with all the same properties of the object being called, returns a handle to the new object in 'newGrid'. No data is shared between these two objects, an exact copy is created. The FuelMap property should be set on the copied object immediately after successful completion of this call.

Parameters
newGridThe grid object.
See Also
ICWFGM_Grid::Clone
Return values
E_POINTERThe address provided for newGrid is invalid.
S_OKSuccessful.
E_NOINTERFACE'newGrid' is not a successfully created CWFGM Grid object.
E_OUTOFMEMORYInsufficient memory.
ERROR_SEVERITY_WARNINGUnspecified failure.
STDMETHODIMP CCWFGM_Grid::CreateGrid ( USHORT  xsize,
USHORT  ysize,
double  xllcorner,
double  yllcorner,
double  resolution,
UCHAR  BasicFuel 
)

Rather than importing an FBP fuel grid, this function will allow the client application to manually create the grid. This grid has a location and is set to a single fuel type.

Parameters
xsizeEast-west dimension size.
ysizeNorth-south dimension size.
xllcornerLocation.
yllcornerLocation.
resolutionResolution of each grid cell.
BasicFuelThe initial fuel to assign the entire grid to.
See Also
ICWFGM_Grid::CreateGrid
Return values
S_OKSuccessful.
E_INVALIDARGIf any of the parameters are invalid.
ERROR_GRID_UNINITIALIZEDGrid objects are not correctly initialized.
ERROR_FUELS_FUEL_UNKNOWNThe index provide is unknown by the fuel map.
E_OUTOFMEMORYInsufficient memory to create the grid.
ERROR_SCENARIO_SIMULATION_RUNNINGValue cannot be changed as it is being used by a currently running scenario.
STDMETHODIMP CCWFGM_Grid::CreateSlopeElevationGrid ( SHORT  elevation,
USHORT  slope,
USHORT  aspect 
)

Used primarily for testing purposes. Sets elevation, slope, aspect to constant values. Note that elevations are NOT calculated to match slope, aspect data.

Parameters
elevationElevation for the entire grid.
slopeSlope for the entire grid.
aspectAspect of the slope for the entire grid.
See Also
ICWFGM_Grid::CreateSlopeElevationGrid
Return values
S_OKSuccessful.
ERROR_GRID_INITIALIZEDData had already been loaded/initialized and so cannot be reset.
E_OUTOFMEMORYInsufficient memory to create the grid.
ERROR_SCENARIO_SIMULATION_RUNNINGValue cannot be changed as it is being used by a currently running scenario.
STDMETHODIMP CCWFGM_Grid::ExportAspect ( const BSTR  grid_file_name)

This method export Aspect data from the grid to a file

Parameters
grid_file_nameFile name where the data should be exported.
See Also
ICWFGM_Grid::ExportAspect
Return values
S_OKSuccessful.
E_POINTERBad pointer.
ERROR_GRID_UNINITIALIZEDGrid not initialized.
E_INVALIDARGInvalid argument(s).
STDMETHODIMP CCWFGM_Grid::ExportElevation ( const BSTR  grid_file_name)

This method exports elevation data from the grid to a file

Parameters
grid_file_nameFile name where the data should be exported.
See Also
ICWFGM_Grid::ExportElevation
Return values
S_OKSuccessful.
E_POINTERBad pointer.
ERROR_GRID_UNINITIALIZEDGrid not initialized.
E_INVALIDARGInvalid argument(s).
STDMETHODIMP CCWFGM_Grid::ExportGrid ( const BSTR  grid_file_name)

This method exports grid FBP data to files.

Parameters
grid_file_nameGrid file name.
See Also
ICWFGM_Grid::ExportGrid
Return values
E_POINTERInvalid pointer.
E_INVALIDARGInvalid arguments.
ERROR_ACCESS_DENIEDAccess denied.
ERROR_INVALID_HANDLEGeneric file I/O error.
ERROR_FILE_EXISTSThe file already exists.
ERROR_INVALID_PARAMETERThe parameters are invalid.
ERROR_TOO_MANY_OPEN_FILESToo many files are open.
ERROR_FILE_NOT_FOUNDThe file cannot be found.
E_OUTOFMEMORYInsufficient memory.
ERROR_HANDLE_DISK_FULLDisk full
ERROR_SEVERITY_WARNINGUnsure of reason for failure.
ERROR_FUELS_FUEL_UNKNOWNFueltype is unknown.
S_OKSuccessful.
STDMETHODIMP CCWFGM_Grid::ExportSlope ( const BSTR  grid_file_name)

This method exports Slope data from the grid to a file

Parameters
grid_file_nameFile name where the data should be exported.
See Also
ICWFGM_Grid::ExportSlope
Return values
S_OKSuccessful.
E_POINTERBad pointer.
ERROR_GRID_UNINITIALIZEDGrid not initialized.
E_INVALIDARGInvalid argument(s).
STDMETHODIMP CCWFGM_Grid::get_FuelMap ( ICWFGM_FuelMap **  pVal)

The CWFGM Grid needs an object supporting the ICWFGM_FuelMap interface; the creator of the Grid should assign this property to a valid value before using the grid object. This property is write-once-read-many because of its high dependency on internal indexes assigned by the fuel map. The COM reference count for the fuel map is incremented on assignment and decremented when this object is destroyed.

Parameters
pValThe fuel map.
See Also
ICWFGM_Grid::FuelMap
Return values
E_POINTERThe address provided for index is invalid.
S_OKSuccessful.
E_NOINTERFACEOn assignment if not passed CWFGM FuelMap object.
ERROR_GRID_INITIALIZEDIf the assignment is tried more than once.
ERROR_GRID_UNINITIALIZEDWhen reading the value before it has been set.
ERROR_SCENARIO_SIMULATION_RUNNINGValue cannot be changed as it is being used in a currently running scenario.
STDMETHODIMP CCWFGM_Grid::get_LayerManager ( ICWFGM_LayerManager **  pVal)

This property is must be set before any calls to GetGridEngine or PutGridEngine. Additionally, this property should be considered write-once. This value should be set to the ICWFGM_LayerManager object which any layerThread assigned to this object will have been allocated from.

Parameters
pValvalue of LayerManager
STDMETHODIMP CCWFGM_Grid::get_UserData ( VARIANT *  pVal)

This property is unused by this object, and is available for exclusive use by the client code. It is a VARIANT value to ensure that the client code can store a pointer value (if it chooses) for use in manual subclassing this object. This value is not loaded or saved during serialization operations, and it is the responsibility of the client code to manage any value or object stored here. Access to this property is not thread-safe.

Parameters
pValValue of UserData
See Also
ICWFGM_GridEngine::UserData
Return values
E_POINTERThe address provided for pVal is invalid
S_OKSuccessful
STDMETHODIMP CCWFGM_Grid::GetAttribute ( USHORT  option,
VARIANT *  value 
)

Polymorphic. This routine retrieves an attribute/option value given the attribute/option index.

Parameters
optionReturns the attribute of interest. Valid attributes are:
  • CWFGM_GRID_ATTRIBUTE_XLLCORNER 64-bit floating point. UTM value for the X coordinate of the lower-left corner of the grid extent.
  • CWFGM_GRID_ATTRIBUTE_YLLCORNER 64-bit floating point. UTM value for the Y coordinate of the lower-left corner of the grid extent.
  • CWFGM_GRID_ATTRIBUTE_PLOTRESOLUTION 64-bit floating point, metres. Resolution of the underlying grid data.
  • CWFGM_GRID_ATTRIBUTE_LATITUDE 64-bit floating point, radians.
  • CWFGM_GRID_ATTRIBUTE_LONGITUDE 64-bit floating point, radians.
  • CWFGM_GRID_ATTRIBUTE_DEFAULT_ELEVATION 64-bit floating point, metres. User specified elevation to use when there is no grid elevation available for at a requested grid location.
  • CWFGM_GRID_ATTRIBUTE_MIN_ELEVATION 64-bit floating point, metres.
  • CWFGM_GRID_ATTRIBUTE_MAX_ELEVATION 64-bit floating point, metres.
  • CWFGM_GRID_ATTRIBUTE_MEDIAN_ELEVATION 64-bit floating point, metres.
  • CWFGM_GRID_ATTRIBUTE_MIN_SLOPE 64-bit floating point. Percentage ground slope specified as a decimal value (0 - 1)
  • CWFGM_GRID_ATTRIBUTE_MAX_SLOPE 64-bit floating point. Percentage ground slope specified as a decimal value (0 - 1)
  • CWFGM_GRID_ATTRIBUTE_MIN_AZIMUTH 64-bit floating point. Direction of up-slope, Cartesian radians.
  • CWFGM_GRID_ATTRIBUTE_MAX_AZIMUTH 64-bit floating point. Direction of up-slope, Cartesian radians.
  • CWFGM_GRID_ATTRIBUTE_TIMEZONE 64-bit signed integer. Units are in seconds, relative to GMT. For example, MST (Mountain Standard Time) would be -6 * 60 * 60 seconds. Valid values are from -12 hours to +12 hours.
  • CWFGM_GRID_ATTRIBUTE_DAYLIGHT_SAVINGS 64-bit signed integer. Units are in seconds. Amount of correction to apply for daylight savings time.
  • CWFGM_GRID_ATTRIBUTE_DST_START 64-bit unsigned integer. Units are in seconds. Julian date determining when daylight savings starts within the calendar year.
  • CWFGM_GRID_ATTRIBUTE_DST_END 64-bit unsigned integer. Units are in seconds. Julian date determining when daylight savings ends within the calendar year.
  • CWFGM_GRID_ATTRIBUTE_FUELS_PRESENT Boolean. TRUE if a valid fuel grid has been successfully loaded.
  • CWFGM_GRID_ATTRIBUTE_DEM_PRESENT Boolean. TRUE if an elevation grid has been successfully loaded.
  • CWFGM_ATTRIBUTE_LOAD_WARNING BSTR. Any warnings generated by the COM object when deserializating.
  • CWFGM_GRID_ATTRIBUTE_SPATIALREFERENCE BSTR. GDAL WKT format string defining the spatial reference of the grid.
valueLocation for the retrieved value to be placed.
See Also
ICWFGM_Grid::GetAttribute
Return values
E_POINTERThe address provided for value is invalid.
S_OKSuccessful.
ERROR_SEVERITY_WARNINGIf asking for default elevation where the default elevation is not set.
S_FALSEIf asking for values where the appropriate array has not been initialized.
ERROR_GRID_UNINITIALIZEDNo FBP grid data has been loaded.
E_OUTOFMEMORYInsufficient memory (can occur when retrieving slope data which hasn't been loaded so must be calculated).
E_INVALIDARGThe attribute/option index was invalid/unknown for this object.
STDMETHODIMP CCWFGM_Grid::GetAttribute ( __int64  layerThread,
USHORT  option,
VARIANT *  value 
)
    Polymorphic.  This method returns a specified attribute/option value. 
    \param  layerThread             Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object.  Needed.  It is designed to allow nested layering analogous to the GIS layers.
    \param option   The attribute of interest.  Valid option values are as follows, defined in "GridCom_Ext.h".
  • CWFGM_GRID_ATTRIBUTE_XLLCORNER 64-bit floating point. UTM value for the X coordinate of the lower-left corner of the grid extent.
  • CWFGM_GRID_ATTRIBUTE_YLLCORNER 64-bit floating point. UTM value for the Y coordinate of the lower-left corner of the grid extent.
  • CWFGM_GRID_ATTRIBUTE_PLOTRESOLUTION 64-bit floating point, metres. Resolution of the underlying grid data.
  • CWFGM_GRID_ATTRIBUTE_LATITUDE 64-bit floating point, radians.
  • CWFGM_GRID_ATTRIBUTE_LONGITUDE 64-bit floating point, radians.
  • CWFGM_GRID_ATTRIBUTE_DEFAULT_ELEVATION 64-bit floating point, metres. User specified elevation to use when there is no grid elevation available for at a requested grid location.
  • CWFGM_GRID_ATTRIBUTE_MIN_ELEVATION 64-bit floating point, metres.
  • CWFGM_GRID_ATTRIBUTE_MAX_ELEVATION 64-bit floating point, metres.
  • CWFGM_GRID_ATTRIBUTE_MEDIAN_ELEVATION 64-bit floating point, metres.
  • CWFGM_GRID_ATTRIBUTE_MIN_SLOPE 64-bit floating point. Percentage ground slope specified as a decimal value (0 - 1)
  • CWFGM_GRID_ATTRIBUTE_MAX_SLOPE 64-bit floating point. Percentage ground slope specified as a decimal value (0 - 1)
  • CWFGM_GRID_ATTRIBUTE_MIN_AZIMUTH 64-bit floating point. Direction of up-slope, Cartesian radians.
  • CWFGM_GRID_ATTRIBUTE_MAX_AZIMUTH 64-bit floating point. Direction of up-slope, Cartesian radians.
  • CWFGM_GRID_ATTRIBUTE_TIMEZONE 64-bit signed integer. Units are in seconds, relative to GMT. For example, MST (Mountain Standard Time) would be -6 * 60 * 60 seconds. Valid values are from -12 hours to +12 hours.
  • CWFGM_GRID_ATTRIBUTE_DAYLIGHT_SAVINGS 64-bit signed integer. Units are in seconds. Amount of correction to apply for daylight savings time.
  • CWFGM_GRID_ATTRIBUTE_DST_START 64-bit unsigned integer. Units are in seconds. Julian date determining when daylight savings starts within the calendar year.
  • CWFGM_GRID_ATTRIBUTE_DST_END 64-bit unsigned integer. Units are in seconds. Julian date determining when daylight savings ends within the calendar year.
  • CWFGM_GRID_ATTRIBUTE_FUELS_PRESENT Boolean. TRUE if a valid fuel grid has been successfully loaded.
  • CWFGM_GRID_ATTRIBUTE_DEM_PRESENT Boolean. TRUE if an elevation grid has been successfully loaded.
  • CWFGM_ATTRIBUTE_LOAD_WARNING BSTR. Any warnings generated by the COM object when deserializating.
  • CWFGM_GRID_ATTRIBUTE_SPATIALREFERENCE BSTR. GDAL WKT format string defining the spatial reference of the grid.
Parameters
valueLocation for the retrieved value to be placed.
See Also
ICWFGM_GridEngine::GetAttribute
Return values
E_POINTERThe address provided for value is invalid.
S_OKSuccessful.
ERROR_SEVERITY_WARNINGIf asking for default elevation where the default elevation is not set.
S_FALSEIf asking for values where the appropriate array has not been initialized.
ERROR_GRID_UNINITIALIZEDNo FBP grid data has been loaded.
E_OUTOFMEMORYInsufficient memory (can occur when retrieving slope data which hasn't been loaded so must be calculated).
E_INVALIDARGThe attribute/option index was invalid/unknown for this object.
STDMETHODIMP CCWFGM_Grid::GetAttributeData ( __int64  layerThread,
USHORT  _x,
USHORT  _y,
ULONGLONG  time,
USHORT  option,
VARIANT *  attribute 
)

Polymorphic. This object does not implement any functionality regarding specific polymorphic gridded attributes.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
_xValue on x-axis.
_yValue on y-axis.
timeA GMT time provided as seconds since January 1st, 1600.
optionData array option.
attributeData array attribute.
See Also
ICWFGM_GridEngine::GetAttributeData
Return values
E_NOTIMPLMethod not implemented
STDMETHODIMP CCWFGM_Grid::GetAttributeDataArray ( __int64  layerThread,
USHORT  _x_min,
USHORT  _y_min,
USHORT  _x_max,
USHORT  _y_max,
ULONGLONG  time,
USHORT  option,
SAFEARRAY **  attribute 
)

Polymorphic. This object does not implement any functionality regarding specific polymorphic gridded attributes.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
_x_minMinimum value (inclusive) on x-axis.
_y_minMinimum value (inclusive) on y-axis.
_x_maxMaximum value (inclusive) on x-axis.
_y_maxMaximum value (inclusive) on y-axis.
timeA GMT time provided as seconds since January 1st, 1600.
optionData array option.
attributeData array attribute.
See Also
ICWFGM_GridEngine::GetAttributeDataArray
Return values
E_NOTIMPLMethod not implemented
STDMETHODIMP CCWFGM_Grid::GetDimensions ( __int64  layerThread,
USHORT *  x_dim,
USHORT *  y_dim 
)

This method provides information regarding grid dimenions

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
x_dimX dimension of the grid
y_dimY dimension of the grid
See Also
ICWFGM_GridEngine::GetDimensions
Return values
E_POINTERThe address provided for value is invalid.
S_OKSuccessful.
ERROR_SEVERITY_WARNINGIf asking for default elevation where the default elevation is not set.
S_FALSEIf asking for values where the appropriate array has not been initialized.
ERROR_GRID_UNINITIALIZEDNo FBP grid data has been loaded.
E_OUTOFMEMORYInsufficient memory (can occur when retrieving slope data which hasn't been loaded so must be calculated).
E_INVALIDARGThe attribute/option index was invalid/unknown for this object.
STDMETHODIMP CCWFGM_Grid::GetElevationData ( __int64  layerThread,
USHORT  x,
USHORT  y,
SHORT  allow_defaults_returned,
double *  elevation,
double *  slope_factor,
double *  slope_azimuth 
)

Get the elevation data at a given grid location.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
xThe x-component of the grid cell location.
yThe y-component of the grid cell location.
allow_defaults_returnedFlag for allowing defaults to be returned
elevationElevation (m) of the requested location.
slope_factorPercentage ground slope specified as a decimal value (0 - 1)
slope_azimuthDirection of up-slope, Cartesian radians.
See Also
ICWFGM_GridEngine::GetElevationData
Return values
E_POINTEROne or more of elevation, slope_factor, slope_azimuth is NULL
ERROR_GRID_UNINITIALIZEDObject hasn't been initialized; no gridded data has been loaded
ERROR_GRID_LOCATION_OUT_OF_RANGEx and/or y is invalid
SUCCESS_RETURNING_DEFAULTSDefault return values are provided, indicates no data available (at requested location)
S_OKsuccess
STDMETHODIMP CCWFGM_Grid::GetElevationDataArray ( __int64  layerThread,
USHORT  x_min,
USHORT  y_min,
USHORT  x_max,
USHORT  y_max,
SHORT  allow_defaults_returned,
SAFEARRAY **  elevation,
SAFEARRAY **  slope_factor,
SAFEARRAY **  slope_azimuth 
)

Get the elevation data for all grid cells inside a specified rectangle.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
x_minThe minimum x-component of the bounding rectangle.
y_minThe minimum y-component of the bounding rectangle.
x_maxThe maximum x-component (inclusive) of the bounding rectangle.
y_maxTHe maximum y-component (inclusive) of the bounding rectangle.
allow_defaults_returnedFlag for allowing defaults to be returned
elevationAn array of elevation data for the given bounding rectangle.
slope_factorAn array of slope factor data for the given bounding rectangle.
slope_azimuthAn array of slope azimuth data for the given bounding rectangle.
See Also
ICWFGM_GridEngine::GetElevationDataArray
Return values
E_POINTEROne or more of elevation, slope_factor, slope_azimuth is NULL
E_INVALIDARGThe array is not 2D, or is insufficient in size to contain the requested data
ERROR_GRID_UNINITIALIZEDObject hasn't been initialized; no gridded data has been loaded
ERROR_GRID_LOCATION_OUT_OF_RANGEx and/or y is invalid
SUCCESS_RETURNING_DEFAULTSDefault return values are provided, indicates no data available (at requested location)
S_OKsuccess
STDMETHODIMP CCWFGM_Grid::GetEventTime ( __int64  layerThread,
ULONG  flags,
ULONGLONG  from_time,
ULONGLONG *  next_event 
)

This filter object simply returns since it does not introduce any events to a simulation.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
flagsCalculation flags.
from_timeA GMT time provided as seconds since January 1st, 1600.
next_eventA GMT time provided as seconds since January 1st, 1600, representing the time for the next event, based on 'flags'.
See Also
ICWFGM_GridEngine::GetEventTime
Return values
ERROR_SEVERITY_WARNINGGrid is not initialized.
S_OKThis object does not introduce any simulation events.
STDMETHODIMP CCWFGM_Grid::GetFuelData ( __int64  layerThread,
USHORT  _x,
USHORT  _y,
ULONGLONG  time,
ICWFGM_Fuel **  fuel 
)

Returns fuel data from the imported fuel grid map.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
_xValue on x-axis.
_yValue on y-axis.
timeA GMT time provided as seconds since January 1st, 1600.
fuelFuel Information.
See Also
ICWFGM_GridEngine::GetFuelData
Return values
ERROR_GRID_UNINITIALIZEDNo grid data has been loaded
ERROR_GRID_LOCATION_OUT_OF_RANGERequested location (in grid units) is outside the grid's bounds.
E_POINTERfuel is invalid
ERROR_FUELS_FUEL_UNKNOWNThe location requested contains NODATA
STDMETHODIMP CCWFGM_Grid::GetFuelDataArray ( __int64  layerThread,
USHORT  _x_min,
USHORT  _y_min,
USHORT  _x_max,
USHORT  _y_max,
ULONGLONG  time,
SAFEARRAY **  fuel 
)

Fills in the provided array of fuel data from the imported fuel grid map.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
_x_minMinimum value (inclusive) on x-axis.
_y_minMinimum value (inclusive) on y-axis.
_x_maxMaximum value (inclusive) on x-axis.
_y_maxMaximum value (inclusive) on y-axis.
timeA GMT time provided as seconds since January 1st, 1600.
fuelData array attribute.
See Also
ICWFGM_GridEngine::GetFuelDataArray
Return values
E_INVALIDARGThe array is not 2D, or is insufficient in size to contain the requested data
ERROR_GRID_UNINITIALIZEDNo grid data has been loaded
ERROR_GRID_LOCATION_OUT_OF_RANGERequested location (in grid units) is outside the grid's bounds.
E_POINTERfuel is invalid
ERROR_FUELS_FUEL_UNKNOWNThe location requested contains NODATA
STDMETHODIMP CCWFGM_Grid::GetFuelIndexData ( __int64  layerThread,
USHORT  x,
USHORT  y,
ULONGLONG  time,
UCHAR *  fuel_index 
)

Returns fuel index data from the imported fuel grid map.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
xValue on x-axis.
yValue on y-axis.
timeA GMT time provided as seconds since January 1st, 1600.
fuel_indexFuel Index Information.
See Also
ICWFGM_GridEngine::GetFuelIndexData
Return values
ERROR_GRID_UNINITIALIZEDNo grid data has been loaded
ERROR_GRID_LOCATION_OUT_OF_RANGERequested location (in grid units) is outside the grid's bounds.
E_POINTERfuel is invalid
ERROR_FUELS_FUEL_UNKNOWNThe location requested contains NODATA
STDMETHODIMP CCWFGM_Grid::GetFuelIndexDataArray ( __int64  layerThread,
USHORT  _x_min,
USHORT  _y_min,
USHORT  _x_max,
USHORT  _y_max,
ULONGLONG  time,
SAFEARRAY **  fuel 
)

Fills in the provided array of fuel index data from the imported fuel grid map.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
_x_minMinimum value (inclusive) on x-axis.
_y_minMinimum value (inclusive) on y-axis.
_x_maxMaximum value (inclusive) on x-axis.
_y_maxMaximum value (inclusive) on y-axis.
timeA GMT time provided as seconds since January 1st, 1600.
fuelData array attribute.
See Also
ICWFGM_GridEngine::GetFuelIndexDataArray
Return values
E_INVALIDARGThe array is not 2D, or is insufficient in size to contain the requested data
ERROR_GRID_UNINITIALIZEDNo grid data has been loaded
ERROR_GRID_LOCATION_OUT_OF_RANGERequested location (in grid units) is outside the grid's bounds.
E_POINTERfuel is invalid
ERROR_FUELS_FUEL_UNKNOWNThe location requested contains NODATA
STDMETHODIMP CCWFGM_Grid::GetGridEngine ( __int64  layerThread,
ICWFGM_GridEngine **  pVal 
)

This method is not implemented by this object, since it is intended to always be at the base of a thread of filter objects.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
pValPointer to grid engine.
See Also
ICWFGM_GridEngine::GetGridEngine
Return values
E_NOTIMPLMethod not implemented
STDMETHODIMP CCWFGM_Grid::GetWeatherData ( __int64  layerThread,
USHORT  x,
USHORT  y,
ULONGLONG  time,
ULONG  interpolate_method,
IWXData wx,
IFWIData ifwi,
DFWIData dfwi 
)

This object does not implement any functionality regarding weather.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
xValue on x-axis.
yValue on y-axis.
timeA GMT time provided as seconds since January 1st, 1600.
interpolate_methodInterpolation method identifier.
wxWeather information.
ifwiIFWI Information.
dfwiDFWI Information.
See Also
ICWFGM_GridEngine::GetWeatherData
Return values
E_NOTIMPLMethod not implemented
STDMETHODIMP CCWFGM_Grid::GetWeatherDataArray ( __int64  layerThread,
USHORT  x_min,
USHORT  y_min,
USHORT  x_max,
USHORT  y_max,
ULONGLONG  time,
ULONG  interpolate_method,
SAFEARRAY **  wx,
SAFEARRAY **  ifwi,
SAFEARRAY **  dfwi 
)

This object does not implement any functionality regarding weather.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
x_minMinimum value (inclusive) on x-axis.
y_minMinimum value (inclusive) on y-axis.
x_maxMaximum value (inclusive) on x-axis.
y_maxMaximum value (inclusive) on y-axis.
timeA GMT time provided as seconds since January 1st, 1600.
interpolate_methodInterpolation method identifier.
wxArray of Weather information.
ifwiArray of Instantaneous FWI codes.
dfwiArray of Daily FWI codes.
See Also
ICWFGM_GridEngine::GetWeatherDataArray
Return values
ERROR_GRID_UNINITIALIZEDNo object in the grid layering to forward the request to.
STDMETHODIMP CCWFGM_Grid::ImportElevation ( const BSTR  prj_file_name,
const BSTR  grid_file_name 
)

This method will import the elevation data. The elevation's grid file name is necessary. The projection file name is optional and if provided, must have matching values to the fuel map already imported.

Parameters
prj_file_nameProjection file name.
grid_file_nameGrid file name.
See Also
ICWFGM_Grid::ImportElevation
Return values
E_POINTERIf any of the parameters cannot be read.
ERROR_SCENARIO_SIMULATION_RUNNINGValue cannot be changed as it is being used in a currently running scenario.
S_OKSuccessful.
ERROR_FILE_NOT_FOUNDIf either file cannot be found in the file system.
ERROR_ACCESS_DENIEDIf either file cannot be opened.
ERROR_READ_FAULT| ERROR_SEVERITY_WARNING The file format is unrecognized, or if there is an error in the file format.
ERROR_GRID_LOCATION_OUT_OF_RANGEThe import files do not appear to match data that has already been imported.
ERROR_GRID_SIZE_INCORRECTThe dimensions and/or resolution of the file do not match data that has already been imported.
E_OUTOFMEMORYInsufficient memory.
SUCCESS_GRID_IMPORT_CONTAINED_NODATASuccessful operation, but the elevation grid contained NODATA entries.
SUCCESS_GRID_DATA_UPDATEDThe original elevation grid map has been successfully replaced.
ERROR_TOO_MANY_OPEN_FILESSystem error; current application has too many files open.
E_FAILA valid geographic projection transformation could not be created.
S_OKSuccessful.
ERROR_INVALID_HANDLEGeneric file I/O error.
ERROR_FILE_EXISTSFile already exists.
ERROR_INVALID_PARAMETERParameter is not valid.
ERROR_HANDLE_DISK_FULLDisk full
STDMETHODIMP CCWFGM_Grid::ImportGrid ( const BSTR  prj_file_name,
const BSTR  grid_file_name,
long *  fail_index 
)

This method will (re)import the FBP grid layer. Both the PRJ (projection) and the Grid files are needed to complete this operation. 'fail_index' may be NULL.

Parameters
prj_file_nameProjection file name.
grid_file_nameGrid file name.
fail_indexFuel import index that was unrecognized, which caused the operation to fail (if it did).
See Also
ICWFGM_Grid::ImportGrid
Return values
E_POINTER'prj_file_name', 'grid_file_name', or 'fail_index' cannot be read or written to.
S_OKSuccessful.
ERROR_SCENARIO_SIMULATION_RUNNINGValue cannot be changed as it is being used in a currently running scenario.
E_FAILA valid geographic projection transformation could not be created.
ERROR_READ_FAULT| ERROR_SEVERITY_WARNING The file format is unrecognized, or if there is an error in the file format.
ERROR_GRID_UNINITIALIZEDThe FuelMap property has not be set.
ERROR_FILE_NOT_FOUNDIf either file cannot be found.
ERROR_ACCESS_DENIEDIf either file cannot be opened.
ERROR_FUELS_FUEL_UNKNOWNThe grid file contains a fuel index that is not defined in the FuelMap object. If 'fail_index' is not NULL, then the index found in the file that is not defined in FuelMap is placed here.
ERROR_GRID_LOCATION_OUT_OF_RANGEThe import files do not appear to match data that has already been imported.
E_OUTOFMEMORYInsufficient memory.
ERROR_TOO_MANY_OPEN_FILESSystem error; current application has too many files open.
SUCCESS_GRID_DATA_UPDATEDThe original fuel grid map has been successfully replaced.
S_OKSuccessful.
ERROR_INVALID_HANDLEGeneric file I/O error.
ERROR_FILE_EXISTSFile already exists.
ERROR_INVALID_PARAMETERParameter is not valid.
ERROR_HANDLE_DISK_FULLDisk full
STDMETHODIMP CCWFGM_Grid::IsFuelUsed ( ICWFGM_Fuel fuel)

This method reports whether a fuel is assigned to any point in the grid.

Parameters
fuelFuel in question.
See Also
ICWFGM_Grid::IsFuelUsed
Return values
E_POINTERInvalid pointer to a fuel.
S_OKIf the fuel is used.
ERROR_SEVERITY_WARNINGIf the fuel is not used.
ERROR_FUELS_FUEL_UNKNOWN'fuel' is not in any associations.
ERROR_GRID_UNINITIALIZEDGrid not initialized yet.
STDMETHODIMP CCWFGM_Grid::MT_Lock ( __int64  layerThread,
USHORT  exclusive,
USHORT  obtain 
)

Changes the state of the object with respect to access rights. When the object is used by an active simulation, it must not be modified. When the object is somehow modified, it must be done so in an atomic action to prevent concerns with arising from multithreading. Note that these locks are primarily needed to ensure that data contributing during a simulation is not modified while the simulation is executing.

All routines in the ICWFGM_GridEngine interface are necessarily NOT multithreading safe (for performance) but other interfaces for a given COM object implementing this interface must be by specification. Locking request is forwarded to the attached ICWFGM_FuelMap object.

In the event of an error, then locking is undone to reflect an error state.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
exclusiveTRUE if the requester wants a write lock, false for read/shared access
obtainTRUE to obtain the lock, FALSE to release the lock. If this is FALSE, then the 'exclusive' parameter must match the initial call used to obtain the lock.
See Also
ICWFGM_GridEngine::MT_Lock
ICWFGM_FuelMap::MT_Lock
Return values
SUCCESS_STATE_OBJECT_UNLOCKEDLock was released.
SUCCESS_STATE_OBJECT_LOCKED_WRITEExclusive/write lock obtained.
SUCCESS_STATE_OBJECT_LOCKED_SCENARIOA scenario successfully required a lock for purposes of simulating.
SUCCESS_STATE_OBJECT_LOCKED_READShared/read lock obtained.
S_OKSuccessful
ERROR_GRID_UNINITIALIZEDNo path via layerThread can be determined to further determine successful locks.
STDMETHODIMP CCWFGM_Grid::PostCalculationEvent ( __int64  layerThread,
ULONGLONG  time,
ULONG  mode 
)

This object requires no work to be performed in this call.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
timeA GMT time provided as seconds since January 1st, 1600.
modeCalculation mode.
See Also
ICWFGM_GridEngine::PostCalculationEvent
Return values
S_OKAlways successful
STDMETHODIMP CCWFGM_Grid::PreCalculationEvent ( __int64  layerThread,
ULONGLONG  time,
ULONG  mode 
)

This object requires no work to be performed in this call.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
timeA GMT time provided as seconds since January 1st, 1600.
modeCalculation mode.
See Also
ICWFGM_GridEngine::PreCalculationEvent
Return values
S_OKAlways successful.
STDMETHODIMP CCWFGM_Grid::put_FuelMap ( ICWFGM_FuelMap newVal)

The CWFGM Grid needs an object supporting the ICWFGM_FuelMap interface; the creator of the Grid should assign this property to a valid value before using the grid object. This property is write-once-read-many because of its high dependency on internal indexes assigned by the fuel map. The COM reference count for the fuel map is incremented on assignment and decremented when this object is destroyed.

Parameters
newValThe fuel map.
See Also
ICWFGM_Grid::FuelMap
Return values
E_POINTERThe address provided for index is invalid.
S_OKSuccessful.
E_NOINTERFACEOn assignment if not passed CWFGM FuelMap object.
ERROR_GRID_INITIALIZEDIf the assignment is tried more than once.
ERROR_GRID_UNINITIALIZEDWhen reading the value before it has been set.
ERROR_SCENARIO_SIMULATION_RUNNINGValue cannot be changed as it is being used in a currently running scenario.
STDMETHODIMP CCWFGM_Grid::put_LayerManager ( ICWFGM_LayerManager newVal)

This property is must be set before any calls to GetGridEngine or PutGridEngine. Additionally, this property should be considered write-once. This value should be set to the ICWFGM_LayerManager object which any layerThread assigned to this object will have been allocated from.

Parameters
newValvalue for LayerManager
STDMETHODIMP CCWFGM_Grid::put_UserData ( VARIANT  newVal)

This property is unused by this object, and is available for exclusive use by the client code. It is a VARIANT value to ensure that the client code can store a pointer value (if it chooses) for use in manual subclassing this object. This value is not loaded or saved during serialization operations, and it is the responsibility of the client code to manage any value or object stored here. Access to this property is not thread-safe.

Parameters
newValReplacement value for UserData
See Also
ICWFGM_GridEngine::UserData
Return values
S_OKSuccessful
STDMETHODIMP CCWFGM_Grid::PutGridEngine ( __int64  layerThread,
ICWFGM_GridEngine newVal 
)

This method is not implemented by this object, since it is intended to always be at the base of a thread of filter objects.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
newValPointer to new grid engine.
See Also
ICWFGM_GridEngine::PutGridEngine
Return values
E_NOTIMPLMethod not implemented
STDMETHODIMP CCWFGM_Grid::SetAttribute ( USHORT  option,
VARIANT  value 
)

Sets the value for the attribute denoted by "option".

Parameters
optionThe attribute to change. Valid option values are:
  • CWFGM_GRID_ATTRIBUTE_LATITUDE 64-bit floating point, radians.
  • CWFGM_GRID_ATTRIBUTE_LONGITUDE 64-bit floating point, radians.
  • CWFGM_GRID_ATTRIBUTE_DEFAULT_ELEVATION 64-bit floating point, metres. User specified elevation to use when there is no grid elevation available for at a requested grid location.
  • CWFGM_GRID_ATTRIBUTE_TIMEZONE 64-bit signed integer. Units are in seconds, relative to GMT. For example, MST (Mountain Standard Time) would be -6 * 60 * 60 seconds. Valid values are from -12 hours to +12 hours.
  • CWFGM_GRID_ATTRIBUTE_DAYLIGHT_SAVINGS 64-bit signed integer. Units are in seconds. Amount of correction to apply for daylight savings time.
  • CWFGM_GRID_ATTRIBUTE_DST_START 64-bit unsigned integer. Units are in seconds. Julian date determining when daylight savings starts within the calendar year.
  • CWFGM_GRID_ATTRIBUTE_DST_END 64-bit unsigned integer. Units are in seconds. Julian date determining when daylight savings ends within the calendar year.
  • CWFGM_GRID_ATTRIBUTE_SPATIALREFERENCE BSTR. GDAL WKT format string defining the spatial reference of the grid.
bit flags, defined in "GridCom_Ext.h".
valueThe value to set the attribute to.
See Also
ICWFGM_Grid::SetAttribute
Return values
S_OKSuccessful.
E_INVALIDARGOn assignment if the value is out of range.
ERROR_SCENARIO_SIMULATION_RUNNINGValue cannot be changed as it is being used in a currently running scenario.
E_FAILThe provided value (variant) was of the wrong type that could not be converted to the correct type.
STDMETHODIMP CCWFGM_Grid::Valid ( __int64  layerThread,
ULONGLONG  start_time,
LONGLONG  duration,
ULONG  option,
SAFEARRAY **  diurnal_application_count 
)

This method determines whether this object is valid for any simulating.

Parameters
layerThreadHandle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers.
start_timeIgnored.
durationIgnored.
optionDetermines type of Valid request.
diurnal_application_countOptional (dependent on option). Array of counts for how often a particular type of grid occurs in the set of ICWFGM_GridEngine objects associated with a scenario.
See Also
ICWFGM_GridEngine::Valid
Return values
S_OKSuccessful.
ERROR_SEVERITY_WARNINGGrid is not initialized.
ERROR_GRID_WEATHER_NOT_IMPLEMENTEDGrid is valid but does not provide any weather data.
STDMETHODIMP CCWFGM_Grid::WriteProjection ( const BSTR  szPath)

Writes a projection file. All imported grids share the same dimensions and projection information.

Parameters
szPathThe path/file to write the projection to.
See Also
ICWFGM_Grid::WriteProjection
Return values
E_POINTERPath is invalid.
E_INVALIDARGPath is invalid.
S_OKSuccessful.
S_INVALIDARGInvalid arguments.
ERROR_ACCESS_DENIEDAccess denied.
ERROR_INVALID_HANDLEGeneric file I/O error.
ERROR_FILE_EXISTSThe file already exists.
ERROR_INVALID_PARAMETERThe parameters are invalid.
ERROR_TOO_MANY_OPEN_FILESToo many files are open.
ERROR_FILE_NOT_FOUNDThe file cannot be found.
E_OUTOFMEMORYInsufficient memory.
ERROR_HANDLE_DISK_FULLDisk full
ERROR_SEVERITY_WARNINGUnsure of reason for failure.