Interface ICWFGM Grid. More...
import "GridCom.idl";
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] |
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.
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.
newGrid | The 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.
xsize | East-west dimension size. |
ysize | North-south dimension size. |
xllcorner | Location. |
yllcorner | Location. |
resolution | Resolution of each grid cell. |
BasicFuel | The 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.
elevation | Elevation for the entire grid. |
slope | Slope for the entire grid. |
aspect | Aspect 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
grid_file_name | File 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
grid_file_name | File name where the data should be exported. |
ICWFGM_Grid::ExportGrid | ( | [in] const BSTR | grid_file_name | ) |
This method exports grid FBP data to files.
grid_file_name | Grid file name. |
ICWFGM_Grid::ExportSlope | ( | [in] const BSTR | grid_file_name | ) |
This method exports Slope data from the grid to a file
grid_file_name | File 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'.
value | Return 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.
prj_file_name | Projection file name. |
grid_file_name | Grid 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.
prj_file_name | Projection file name. |
grid_file_name | Grid file name. |
fail_index | Fuel 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.
fuel | Fuel in question. |
ICWFGM_Grid::SetAttribute | ( | [in] unsigned short | option, |
[in] VARIANT | value | ||
) |
Sets the value for the attribute denoted by "option".
option | The attribute to change. Valid option values are:
|
value | The 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.
szPath | The path/file to write the projection to. |
|
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.
pVal | The fuel map. |
newVal | The fuel map. |