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

Interface ICWFGM Grid. More...

import "GridCom.idl";

Collaboration diagram for ICWFGM_Grid:
Collaboration graph

Public Member Functions

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)
 

Properties

ICWFGM_FuelMap FuelMap [get, set]
 

Detailed Description

Interface ICWFGM 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

ICWFGM_Grid::Clone ( [out] 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.
ICWFGM_Grid::CreateGrid ( [in] unsigned short  xsize,
[in] unsigned short  ysize,
[in] double  xllcorner,
[in] double  yllcorner,
[in] double  resolution,
[in] unsigned char  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.
ICWFGM_Grid::CreateSlopeElevationGrid ( [in] short  elevation,
[in] unsigned short  slope,
[in] unsigned short  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.
ICWFGM_Grid::ExportAspect ( [in] 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.
ICWFGM_Grid::ExportElevation ( [in] 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.
ICWFGM_Grid::ExportGrid ( [in] const BSTR  grid_file_name)

This method exports grid FBP data to files.

Parameters
grid_file_nameGrid file name.
ICWFGM_Grid::ExportSlope ( [in] 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.
ICWFGM_Grid::GetAttribute ( [in] unsigned short  option,
[out, retval] VARIANT *  value 
)
    Polymorphic.  This routine retrieves an attribute/option value given the attribute/option index.
    \param  option  Attribute of interest.
  • 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.

flags, defined in 'GridCom_Ext.h'.

Parameters
valueReturn value for the attribute/option index.
ICWFGM_Grid::ImportElevation ( [in] const BSTR  prj_file_name,
[in] 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.
ICWFGM_Grid::ImportGrid ( [in] const BSTR  prj_file_name,
[in] const BSTR  grid_file_name,
[out] 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).
ICWFGM_Grid::IsFuelUsed ( [in] ICWFGM_Fuel fuel)

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

Parameters
fuelFuel in question.
ICWFGM_Grid::SetAttribute ( [in] unsigned short  option,
[in] 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.
flags, defined in 'GridCom_Ext.h'.
valueThe value to set the attribute to.
ICWFGM_Grid::WriteProjection ( [in] 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.

Property Documentation

ICWFGM_Grid::FuelMap
getsetproperty

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.
newValThe fuel map.