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

Interface ICWFGM WindSpeedGrid. More...

import "WeatherCom.idl";

Collaboration diagram for ICWFGM_WindSpeedGrid:
Collaboration graph

Public Member Functions

HRESULT Clone ([out]ICWFGM_WindSpeedGrid **newGrid)
 
HRESULT Import ([in]const unsigned short sector, [in]const double speed, [in] const BSTR prj_file_name, [in]const BSTR grid_file_name)
 
HRESULT Export ([in]const unsigned short sector, [in]const double speed, [in] const BSTR prj_file_name, [in]const BSTR grid_file_name)
 
HRESULT Remove ([in]const unsigned short sector, [in]const double speed)
 
HRESULT GetAttribute ([in]unsigned short option, [out, retval]VARIANT *value)
 
HRESULT SetAttribute ([in]unsigned short option, [in]VARIANT value)
 
HRESULT GetCount ([in]const unsigned short sector, [out, retval]unsigned short *count)
 
HRESULT GetWindSpeeds ([in]const unsigned short sector, [out]unsigned short *count, [in, out]SAFEARRAY(double)*speed_array)
 
HRESULT GetFilenames ([in]const unsigned short sector, [out]SAFEARRAY(BSTR)*filenames)
 
HRESULT GetSectorCount ([out, retval]unsigned short *count)
 
HRESULT GetSectorAngles ([in]const unsigned short sector, [out]double *min_angle, [out]double *max_angle)
 
HRESULT AddSector ([in]const BSTR sector_name, [in, out]double *min_angle, [in, out]double *max_angle, [out, retval]unsigned short *index)
 
HRESULT RemoveSector ([in]const unsigned short sector)
 
HRESULT GetSector ([in]unsigned short option, [in, out]double *angle, [in, out]unsigned short *sector, [out]BSTR *sector_name)
 
HRESULT ImportFrom ([in]ICWFGM_WeatherGridFilter *filter)
 
HRESULT ModifySectorSet ([in]SAFEARRAY(WeatherGridSetModifier) set_modifier)
 

Detailed Description

Interface ICWFGM WindSpeedGrid.

    This object manages a collection weather data for a simulation engine's scenario.  It implements the GridEngine interface for communication with the simulation engine.  Since it only handles weather data, its GridEngine property should refer to an object that can provide fuel type and elevation data, latitude, longitude, etc.

In addition to the GridEngine interface, it also implements its own interface so that a client application may specify a collection of weather streams for use in a simulation. This object manages the spatial aspect of merging data together from multiple weather streams. Only one weather stream from a weather station may be associated with a weather grid at a time. This rule is imposed to avoid confusing situations to merge data from multiple streams. A stream cannot be attached to a weather grid until it is associated with a weather station, to ensure that it has a location.

Member Function Documentation

ICWFGM_WindSpeedGrid::AddSector ( [in] const BSTR  sector_name,
[in, out] double *  min_angle,
[in, out] double *  max_angle,
[out, retval] unsigned short *  index 
)

Adds a sector to filter. The logic applied for determining the correct sector is >= min_angle, and < max_angle. When max_angle < min_angle, it is assumed to cross 0 degrees (north) in compass rotation. A sector must be at least 1 degree wide.

Parameters
sector_nameSector Name value, only used by the client application.
min_angleMinimum sector angle value, compass degress
max_angleMaximum sector angle value, compass degrees
indexIndex of new sector.
ICWFGM_WindSpeedGrid::Clone ( [out] ICWFGM_WindSpeedGrid **  newGrid)

Creates a new wind speed grid with all the same properties and data 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 (including of all loaded wind direction grid data) is created.

Parameters
newGridA wind speed grid object.
ICWFGM_WindSpeedGrid::Export ( [in] const unsigned short  sector,
[in] const double  speed,
[in] const BSTR  prj_file_name,
[in] const BSTR  grid_file_name 
)

Exports a Wind Speed Grid from a specific sector, for a specific speed. Specification of the output projection file name is optional.

Parameters
sectorIndex of sector.
speedWind speed value (kph)
prj_file_nameProjection File name
grid_file_nameGrid File name
ICWFGM_WindSpeedGrid::GetAttribute ( [in] unsigned short  option,
[out, retval] VARIANT *  value 
)

Polymorphic. If layerThread is non-zero, then this filter object simply forwards the call to the next lower GIS layer determined by layerThread. If layerthread is zero, then this object will interpret the call.

Parameters
optionThe attribute of interest. Valid attributes are:
  • CWFGM_WEATHER_OPTION_START_TIME 64-bit unsigned integer. GMT time provided as seconds since Midnight January 1, 1600
  • CWFGM_WEATHER_OPTION_END_TIME 64-bit unsigned integer. GMT time provided as seconds since Midnight January 1, 1600
  • CWFGM_WEATHER_OPTION_START_TIMESPAN 64-bit signed integer. Units are in seconds. Specifies the start of the diurnal application period for this weather object.
  • CWFGM_WEATHER_OPTION_END_TIMESPAN 64-bit signed integer. Units are in seconds. Specifies the start of the diurnal application period for this weather object.
  • 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_WEATHER_GRID_APPLY_FILE_SECTORS Boolean. Determines whether to use per-sector data.
  • CWFGM_WEATHER_GRID_APPLY_FILE_DEFAULT Boolean. Determines whether to use default (shared among all data). If CWFGM_WEATHER_GRID_APPLY_FILE_SECTORS is true, then per-sector data will conditionally override this default data.
  • CWFGM_ATTRIBUTE_LOAD_WARNING BSTR. Any warnings generated by the COM object when deserializating.
valueLocation for the retrieved value to be placed.
ICWFGM_WindSpeedGrid::GetCount ( [in] const unsigned short  sector,
[out, retval] unsigned short *  count 
)

Returns the number of grid files loaded into the specified sector.

Parameters
sectorIndex of sector.
countNumber of wind speed ranges.
ICWFGM_WindSpeedGrid::GetFilenames ( [in] const unsigned short  sector,
[out] SAFEARRAY(BSTR)*  filenames 
)

Gets filename for the grid loaded into the specified wind direction sector.

Parameters
sectorIndex of sector.
filenamesArray of file names for given sector
ICWFGM_WindSpeedGrid::GetSector ( [in] unsigned short  option,
[in,out] double *  angle,
[in,out] unsigned short *  sector,
[out] BSTR *  sector_name 
)

Gets the details of a sector of the grid. This function has two modes: If option is CWFGM_WINDGRID_BYINDEX, then this method keys off '*sector' and populates angle[0], angle[1], and sector_name, with the minimum angle, maximum angle, and name assigned to this sector, respectively.
If option is CWFGM_WINDGRID_BYANGLE, then this method keys off '*angle' and populates sector and sector_name with the index of, and name assigned, to sector.

Parameters
optionOption value
angleAngle value
sectorIndex of sector.
sector_nameSector name
ICWFGM_WindSpeedGrid::GetSectorAngles ( [in] const unsigned short  sector,
[out] double *  min_angle,
[out] double *  max_angle 
)

Get the minimum and maximum sector angles for a specific sector. The logic applied for determining the correct sector is >= min_angle, and < max_angle. When max_angle < min_angle, it is assumed to cross 0 degrees.

Parameters
sectorIndex of sector.
min_angleMinimum sector angle value, compass degrees
max_angleMaximum sector angle value, compass degrees
ICWFGM_WindSpeedGrid::GetSectorCount ( [out, retval] unsigned short *  count)

Returns number of sectors which exist.

Parameters
countStores the number of sectors for the filter
ICWFGM_WindSpeedGrid::GetWindSpeeds ( [in] const unsigned short  sector,
[out] unsigned short *  count,
[in,out] SAFEARRAY(double)*  speed_array 
)

Returns the wind speeds for all grid files loaded into the specified sector.

Parameters
sectorIndex of sector.
countReturns number of elements stored in speed_array
speed_array2D Speed data for sectors
ICWFGM_WindSpeedGrid::Import ( [in] const unsigned short  sector,
[in] const double  speed,
[in] const BSTR  prj_file_name,
[in] const BSTR  grid_file_name 
)

Imports Wind Speed Grid to a specific sector and assigned applicable speed ranges. If the import projection file is unspecified, then it is assumed to match the projection for the associated main ICWFGM_GridEngine object.

Parameters
sectorIndex of sector.
speedWind speed value (kph) used to generate the grid
prj_file_nameProjection File name
grid_file_nameGrid File name
ICWFGM_WindSpeedGrid::ImportFrom ( [in] ICWFGM_WeatherGridFilter filter)

Imports from an existing filter. This function only exists to support legacy FGM files and should not be called directly by any client code.

Parameters
filterWeather grid filter to import from
ICWFGM_WindSpeedGrid::ModifySectorSet ( [in] SAFEARRAY(WeatherGridSetModifier set_modifier)

Updates the wind direction ranges in the grid.

Parameters
set_modifierA list of grid values to modify.
ICWFGM_WindSpeedGrid::Remove ( [in] const unsigned short  sector,
[in] const double  speed 
)

Remove a loaded grid applicable to a given speed from the specified sector.

Parameters
sectorIndex of sector.
speedSpeed value (kph)
ICWFGM_WindSpeedGrid::RemoveSector ( [in] const unsigned short  sector)

Removes sector from filter

Parameters
sectorIndex of sector.
ICWFGM_WindSpeedGrid::SetAttribute ( [in] unsigned short  option,
[in] VARIANT  value 
)

Sets the value of an "option" to the value of the "value" variable provided.

Parameters
optionThe weather option of interest. Valid options are:
  • CWFGM_WEATHER_OPTION_START_TIME 64-bit unsigned integer. GMT time provided as seconds since Midnight January 1, 1600
  • CWFGM_WEATHER_OPTION_END_TIME 64-bit unsigned integer. GMT time provided as seconds since Midnight January 1, 1600
  • CWFGM_WEATHER_OPTION_START_TIMESPAN 64-bit signed integer. Units are in seconds. Specifies the start of the diurnal application period for this weather object.
  • CWFGM_WEATHER_OPTION_END_TIMESPAN 64-bit signed integer. Units are in seconds. Specifies the start of the diurnal application period for this weather object.
  • CWFGM_WEATHER_GRID_APPLY_FILE_SECTORS Boolean. Determines whether to use per-sector data.
  • CWFGM_WEATHER_GRID_APPLY_FILE_DEFAULT Boolean. Determines whether to use default (shared among all data). If CWFGM_WEATHER_GRID_APPLY_FILE_SECTORS is true, then per-sector data will conditionally override this default data.
valueValue of attribute