Options
All
  • Public
  • Public/Protected
  • All
Menu

The top level class where all information required to run a W.I.S.E. job will be stored.

author

"Travis Redpath"

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private attachmentIndex

attachmentIndex: number = 1

A counter to use when adding attachments to make sure that the names are unique.

Private attachments

attachments: FileAttachment[] = new Array<FileAttachment>()

An array of files that can be used in place of regular files in the simulation. Stores both a filename and the file contents.

Protected builder

builder: Socket

comments

comments: string = ""

Optional user comments about the job.

exportUnits

exportUnits: UnitSettings

Settings that define which units will be used when data is exported in summary or statistics files.

Protected fetchState

fetchState: number = 0

inputs

inputs: WISEInputs

Files that are needed as input for the job.

jobOptions

jobOptions: JobOptions

Options concering how to run the job, not related directly to scenarios or fire growth.

outputs

outputs: WISEOutputs

Files that will be output from the job.

streamInfo

streamInfo: Array<OutputStreamInfo>

Details of a service to stream output files to after all simulations have completed.

timestepSettings

timestepSettings: TimestepSettings

Settings that modify W.I.S.E.'s behaviour at the end of each timestep.

Static Private Readonly PARAM_COMMENT

PARAM_COMMENT: "GLOBALCOMMENTS" = "GLOBALCOMMENTS"

Methods

addAttachment

  • addAttachment(filename: string, contents: string | Buffer): string | boolean
  • Add a file attachment to the project. Attachments can be used anywhere a filename would be used.

    example
    fs.readFile("/mnt/location/file.txt", "utf8", (err, data) => {
        //on successful read data will be a string containing the contents of the file
        let wise = new WISE();
        let att = wise.addAttachment("file.txt", data);
        wise.addFileIgnition("2019-02-20T12:00:00", att, "No comment");
    });
    
    fs.readFile("/mnt/location/file.kmz", (err, data) => {
        //on successful read data will be a Buffer containing the contents of the file
        let wise = new WISE();
        let att = wise.addAttachment("file.kmz", data);
        wise.addFileIgnition("2019-02-20T12:00:00", att, "No comment");
    });

    Parameters

    • filename: string

      The name of the file to attach. Must be a valid Windows filename. See validateFilename

    • contents: string | Buffer

      The file contents. Must still be valid if streamed to a file with UTF-8 encoding.

    Returns string | boolean

    Will return false if the filename is not valid, otherwise the URL to use as the filename when referencing the attachment will be returned.

addDirectionWeatherGrid

  • addDirectionWeatherGrid(startTime: string | DateTime, startTimeOfDay: string | Duration, endTime: string | DateTime, endTimeOfDay: string | Duration, comments?: string): WeatherGrid
  • Add a weather grid for wind directions to the project.

    Parameters

    • startTime: string | DateTime

      The grids start time. If a string is used it must be formatted as "YYYY-MM-DDThh:mm:ss".

    • startTimeOfDay: string | Duration

      The grids start time of day. If a string is used it must be formatted as "hh:mm:ss".

    • endTime: string | DateTime

      The grids end time. If a string is used it must be formatted as "YYYY-MM-DDThh:mm:ss".

    • endTimeOfDay: string | Duration

      The grids end time of day. If a string is used it must be formatted as "hh:mm:ss".

    • Optional comments: string

      An optional user created comment to attach to the weather grid.

    Returns WeatherGrid

    WeatherGrid

addFileAsset

  • addFileAsset(filename: string, comments?: string): AssetFile
  • Add a new asset using a shapefile.

    throws

    If SocketMsg.inlineThrowOnError is set and SocketMsg.skipFileTests is not set a RangeError will be thrown if the file doesn't exist.

    Parameters

    • filename: string

      The location of the shapefile to use as the shape of the asset.

    • Optional comments: string

      Any user defined comments for the asset. Can be null if there are no comments.

    Returns AssetFile

addFileFuelBreak

  • addFileFuelBreak(filename: string, comments?: string): FuelBreak
  • Add a fuel break to the project.

    throws

    If SocketMsg.inlineThrowOnError is set and SocketMsg.skipFileTests is not set a RangeError will be thrown if the file doesn't exist.

    Parameters

    • filename: string

      The file location of the fuel break. Can either be the actual file path or the attachment URL returned from addAttachment

    • Optional comments: string

      An optional user created comment to attach to the fuel break.

    Returns FuelBreak

addFileFuelPatch

  • addFileFuelPatch(filename: string, fromFuel: FromFuel | string, toFuel: string, comment?: string): FuelPatch
  • Add a file fuel patch to the job.

    throws

    If SocketMsg.inlineThrowOnError is set and SocketMsg.skipFileTests is not set a RangeError will be thrown if the file doesn't exist.

    Parameters

    • filename: string

      The location of the shape file. Can either be the actual file path or the attachment URL returned from addAttachment

    • fromFuel: FromFuel | string

      The fuel to change from. Can either be one of the rules defined in FuelPatch (FROM_FUEL_*) or the name of a fuel.

    • toFuel: string

      The name of the fuel to change to.

    • Optional comment: string

      An optional user created comment to attach to the fuel patch.

    Returns FuelPatch

addFileIgnition

  • addFileIgnition(filename: string, startTime: string | DateTime, comments?: string): Ignition
  • Add an ignition from a file.

    throws

    If SocketMsg.inlineThrowOnError is set and SocketMsg.skipFileTests is not set a RangeError will be thrown if the file doesn't exist.

    Parameters

    • filename: string

      The location of the ignitions file. Can either be the actual file path or the attachment URL returned from addAttachment

    • startTime: string | DateTime

      The ignitions start time.

    • Optional comments: string

      An optional user created comment to attach to the ignition.

    Returns Ignition

    Ignition

addFileTarget

  • addFileTarget(filename: string, comments?: string): TargetFile
  • Add a new target using a shapefile.

    throws

    If SocketMsg.inlineThrowOnError is set and SocketMsg.skipFileTests is not set a RangeError will be thrown if the file doesn't exist.

    Parameters

    • filename: string

      The location of the shapefile to use as the shape of the target.

    • Optional comments: string

      Any user defined comments for the target. Can be null if there are no comments.

    Returns TargetFile

addFileWeatherPatch

  • addFileWeatherPatch(filename: string, startTime: string | DateTime, startTimeOfDay: string | Duration, endTime: string | DateTime, endTimeOfDay: string | Duration, comments?: string): WeatherPatch
  • Add a weather patch from a file.

    throws

    If SocketMsg.inlineThrowOnError is set and SocketMsg.skipFileTests is not set a RangeError will be thrown if the file doesn't exist.

    Parameters

    • filename: string

      The location of the file containing the patches location. Can either be the actual file path or the attachment URL returned from addAttachment

    • startTime: string | DateTime

      The patch start time. If a string is used must be formatted as "YYYY-MM-DDThh:mm:ss".

    • startTimeOfDay: string | Duration

      The patches start time of day. If a string is used it must be formatted as "hh:mm:ss".

    • endTime: string | DateTime

      The patch end time. If a string is used must be formatted as "YYYY-MM-DDThh:mm:ss".

    • endTimeOfDay: string | Duration

      The patches end time of day. If a string is used it must be formatted as "hh:mm:ss".

    • Optional comments: string

      An optional user created comment to attach to the weather patch.

    Returns WeatherPatch

    WeatherPatch

addGridFile

addGridFileWithComment

  • addGridFileWithComment(filename: string, proj: string, type: GridFileType, comment: string): GridFile
  • Add a grid file to the project.

    throws

    If SocketMsg.inlineThrowOnError is set and SocketMsg.skipFileTests is not set a RangeError will be thrown if the file doesn't exist.

    Parameters

    • filename: string

      The location of the grid file. Can either be the actual file path or the attachment URL returned from addAttachment

    • proj: string

      The location of the grid files projection.

    • type: GridFileType

      Must be one of the GridFile::TYPE_* values.

    • comment: string

      A user comment to add to the grid file.

    Returns GridFile

addLandscapeFuelPatch

  • addLandscapeFuelPatch(fromFuel: FromFuel | string, toFuel: string, comment?: string): FuelPatch
  • Add a landscape fuel patch to the job.

    Parameters

    • fromFuel: FromFuel | string

      The fuel to change from. Can either be one of the FromFuel wildcard rules or the name of a fuel.

    • toFuel: string

      The name of the fuel to change to.

    • Optional comment: string

      An optional user created comment to attach to the fuel patch.

    Returns FuelPatch

addLandscapeWeatherPatch

  • addLandscapeWeatherPatch(startTime: string | DateTime, startTimeOfDay: string | Duration, endTime: string | DateTime, endTimeOfDay: string | Duration, comments?: string): WeatherPatch
  • Add a landscape weather patch.

    Parameters

    • startTime: string | DateTime

      The patch start time. If a string is used it must be formatted as "YYYY-MM-DDThh:mm:ss".

    • startTimeOfDay: string | Duration

      The patches start time of day. If a string is used it must be formatted as "hh:mm:ss".

    • endTime: string | DateTime

      The patch end time. If a string is used it must be formatted as "YYYY-MM-DDThh:mm:ss".

    • endTimeOfDay: string | Duration

      The patches end time of day. If a string is used it must be formatted as "hh:mm:ss".

    • Optional comments: string

      An optional user created comment to attach to the weather patch.

    Returns WeatherPatch

    WeatherPatch

addMultiPointIgnition

  • addMultiPointIgnition(points: Array<LatLon>, startTime: string | DateTime, comments?: string): Ignition
  • Add an ignition with multiple points.

    Parameters

    • points: Array<LatLon>

      An array of LatLons that are all point ignitions.

    • startTime: string | DateTime

      The ignitions start time.

    • Optional comments: string

      An optional user created comment to attach to the ignition.

    Returns Ignition

    Ignition

addOutputGridFileToScenario

addOutputStatsFileToScenario

  • Add a stats file to a scenario. If you want to set the type of file exported instead of relying on the file extension use the {@code fileType} parameter of the returned object.

    Parameters

    • scen: Scenario

      The scenario to add the stats file to.

    • filename: string

      The name of the file to output to.

    Returns StatsFile

    The newly created stats file export.

addOutputSummaryFileToScenario

  • Add a summary output file to a scenario.

    Parameters

    • scen: Scenario

      The scenario to add the summary file to.

    • filename: string

      The name of the file to output to. Can either be the actual file path or the attachment URL returned from addAttachment

    Returns SummaryFile

addOutputVectorFileToScenario

  • addOutputVectorFileToScenario(type: VectorFileType, filename: string, perimStartTime: string | DateTime, perimEndTime: string | DateTime, scen: Scenario): VectorFile
  • Add a vector file output to a scenario.

    Parameters

    • type: VectorFileType

      Either 'SHP' or 'KML'.

    • filename: string

      The name of the output file. Can either be the actual file path or the attachment URL returned from addAttachment

    • perimStartTime: string | DateTime

      The time to start output of the perimeter.

    • perimEndTime: string | DateTime

      The time to stop output of the perimeter.

    • scen: Scenario

      The scenario to output the data for.

    Returns VectorFile

    VectorFile

addPointAsset

  • Add a new asset using a single point. A buffer around the point can be created using the {@code buffer} property.

    Parameters

    • location: LatLon

      The lat/lon of the asset.

    • Optional comments: string

      Any user defined comments for the asset. Can be null if there are no comments.

    Returns AssetFile

addPointIgnition

  • addPointIgnition(point: LatLon, startTime: string | DateTime, comments?: string): Ignition
  • Add an ignition from a single point. If this is to be a multipoint more points can be added to the returned object using {@link Ignition#addPoint}.

    Parameters

    • point: LatLon

      The location of the ignition.

    • startTime: string | DateTime

      The ignitions start time.

    • Optional comments: string

      An optional user created comment to attach to the ignition.

    Returns Ignition

    Ignition

addPointTarget

  • Add a new target using a single point.

    Parameters

    • location: LatLon

      The lat/lon of the target.

    • Optional comments: string

      Any user defined comments for the target. Can be null if there are no comments.

    Returns TargetFile

addPolygonAsset

  • Add a new asset using a polygon.

    Parameters

    • locations: Array<LatLon>

      An array of lat/lons that make up the polygon.

    • Optional comments: string

      Any user defined comments for the asset. Can be null if there are no comments.

    Returns AssetFile

addPolygonFuelBreak

  • addPolygonFuelBreak(vertices: Array<LatLon>, comments?: string): FuelBreak
  • Add a fuel break to the project.

    Parameters

    • vertices: Array<LatLon>

      The vertices of the polygon. Must be an array of LatLon values. The LatLon values will be copied by reference.

    • Optional comments: string

      An optional user created comment to attach to the fuel break;

    Returns FuelBreak

addPolygonFuelPatch

  • addPolygonFuelPatch(vertices: Array<LatLon>, fromFuel: FromFuel | string, toFuel: string, comments?: string): FuelPatch
  • Add a polygon fuel patch to the job.

    Parameters

    • vertices: Array<LatLon>

      The vertices of the polygon. Must be an array of LatLon values. The LatLon values will be copied by reference.

    • fromFuel: FromFuel | string

      The fuel to change from. Can either be one of the rules defined in FuelPatch (FROM_FUEL_*) or the name of a fuel.

    • toFuel: string

      The name of the fuel to change to.

    • Optional comments: string

      An optional user created comment to attach to the fuel patch.

    Returns FuelPatch

addPolygonIgnition

  • addPolygonIgnition(vertices: Array<LatLon>, startTime: string | DateTime, comments?: string): Ignition
  • Add an ignition from a set of vertices.

    Parameters

    • vertices: Array<LatLon>

      An array of LatLons that describe the polygon.

    • startTime: string | DateTime

      The ignitions start time.

    • Optional comments: string

      An optional user created comment to attach to the ignition.

    Returns Ignition

    Ignition

addPolygonTarget

  • Add a new target using a polygon.

    Parameters

    • locations: Array<LatLon>

      An array of lat/lons that make up the polygon.

    • Optional comments: string

      Any user defined comments for the target. Can be null if there are no comments.

    Returns TargetFile

addPolygonWeatherPatch

  • addPolygonWeatherPatch(vertices: Array<LatLon>, startTime: string | DateTime, startTimeOfDay: string | Duration, endTime: string | DateTime, endTimeOfDay: string | Duration, comments?: string): WeatherPatch
  • Add a weather patch from an array of vertices of a polygon.

    Parameters

    • vertices: Array<LatLon>

      The vertices of the polygon.

    • startTime: string | DateTime

      The patch start time. If a string is used it must be formatted as "YYYY-MM-DDThh:mm:ss".

    • startTimeOfDay: string | Duration

      The patches start time of day. If a string is used it must be formatted as "hh:mm:ss".

    • endTime: string | DateTime

      The patch end time. If a string is used it must be formatted as "YYYY-MM-DDThh:mm:ss".

    • endTimeOfDay: string | Duration

      The patches end time of day. If a string is used it must be formatted as "hh:mm:ss".

    • Optional comments: string

      An optional user created comment to attach to the weather patch.

    Returns WeatherPatch

    WeatherPatch

addPolylineAsset

  • Add a new asset using a polyline. A buffer around the line can be created using the {@code buffer} property.

    Parameters

    • locations: Array<LatLon>

      An array of lat/lons that make up the polyline.

    • Optional comments: string

      Any user defined comments for the asset. Can be null if there are no comments.

    Returns AssetFile

addPolylineFuelBreak

  • addPolylineFuelBreak(vertices: Array<LatLon>, width: number, comments?: string): FuelBreak
  • Add a fuel break to the project.

    Parameters

    • vertices: Array<LatLon>

      The vertices of the polyline. Must be an array of LatLon values. The LatLon values will be copied by reference.

    • width: number

      The width of the fuel break.

    • Optional comments: string

      An optional user created comment to attach to the fuel break;

    Returns FuelBreak

addPolylineIgnition

  • addPolylineIgnition(vertices: Array<LatLon>, startTime: string | DateTime, comments?: string): Ignition
  • Add an ignition from a set of vertices.

    Parameters

    • vertices: Array<LatLon>

      An array of LatLons that descrive the polyline.

    • startTime: string | DateTime

      The ignitions start time.

    • Optional comments: string

      An optional user created comment to attach to the ignition.

    Returns Ignition

    Ignition

addPolylineTarget

  • Add a new target using a polyline.

    Parameters

    • locations: Array<LatLon>

      An array of lat/lons that make up the polyline.

    • Optional comments: string

      Any user defined comments for the asset. Can be null if there are no comments.

    Returns TargetFile

addScenario

  • addScenario(startTime: string | DateTime, endTime: string | DateTime, comments?: string): Scenario
  • Add a scenario to the job.

    Parameters

    • startTime: string | DateTime

      The start time of the scenario. If a string is used it must be formatted as 'YYYY-MM-DDThh:mm:ss'.

    • endTime: string | DateTime

      The end time of the scenario. If a string is used it must be formatted as 'YYYY-MM-DDThh:mm:ss'.

    • Optional comments: string

      An optional user created comment to attach to the scenario.

    Returns Scenario

addSpeedWeatherGrid

  • addSpeedWeatherGrid(startTime: string | DateTime, startTimeOfDay: string | Duration, endTime: string | DateTime, endTimeOfDay: string | Duration, comments?: string): WeatherGrid
  • Add a weather grid for wind speeds to the project.

    Parameters

    • startTime: string | DateTime

      The grids start time. If a string is used it must be formatted as "YYYY-MM-DDThh:mm:ss".

    • startTimeOfDay: string | Duration

      The grids start time of day. Must be formatted as "hh:mm:ss".

    • endTime: string | DateTime

      The grids end time. If a string is used it must be formatted as "YYYY-MM-DDThh:mm:ss".

    • endTimeOfDay: string | Duration

      The grids end time of day. Must be formatted as "hh:mm:ss".

    • Optional comments: string

      An optional user created comment to attach to the weather grid.

    Returns WeatherGrid

    WeatherGrid

addWeatherStation

  • Add a weather station to the project.

    Parameters

    • elevation: number

      The elevation of the weather station.

    • location: LatLon

      The location of the weather station.

    • Optional comments: string

      An optional user created comment to attach to the weather station.

    Returns WeatherStation

    WeatherStation

beginJob

  • beginJob(callback: (job: WISE, name: string) => any): void
  • Sends the job to the job manager for execution.

    throws

    This method can only be called once at a time per instance.

    Parameters

    • callback: (job: WISE, name: string) => any
        • (job: WISE, name: string): any
        • Parameters

          • job: WISE
          • name: string

          Returns any

    Returns void

Private beginJobInternal

  • beginJobInternal(callback: (wrapper: StartJobWrapper) => any, error?: (message: any) => any): void
  • Parameters

    Returns void

beginJobPromise

  • Sends the job to the job manager for execution.

    throws

    This method can only be called once at a time per instance.

    Returns Promise<StartJobWrapper>

    A StartJobWrapper that contains the name of the newly started job as well as the current WISE object.

checkValid

  • Get a list of errors that exist in the current W.I.S.E. configuration.

    Returns Array<ValidationError>

    A list of errors that were found.

clearStreamOutputToMqtt

  • clearStreamOutputToMqtt(): void
  • Clear the stream output files for the MQTT connection.

    Returns void

clearTimezone

  • clearTimezone(): void
  • Clears the timezone for all specified times.

    Returns void

isValid

  • isValid(): boolean
  • Are the input and output values for the job valid.

    Returns boolean

removeAsset

  • Remove an asset from the job. This will not remove it from any scenarios that it may be associated with.

    Parameters

    Returns boolean

removeFuelBreak

  • removeFuelBreak(fuelBreak: FuelBreak): boolean
  • Remove a FuelBreak object from the fuel break files.

    Parameters

    • fuelBreak: FuelBreak

      The FuelBreak object to remove

    Returns boolean

    A boolean indicating if the object was found and removed

removeFuelOption

  • removeFuelOption(fuelOption: FuelOption): boolean
  • Remove a FuelOption object from the input fuel options.

    Parameters

    • fuelOption: FuelOption

      The FuelOption object to remove

    Returns boolean

    A boolean indicating if the object was found and removed

removeFuelPatch

  • removeFuelPatch(fuelPatch: FuelPatch): boolean
  • Remove a FuelPatch object from the fuel patch files.

    Parameters

    • fuelPatch: FuelPatch

      The FuelPatch object to remove

    Returns boolean

    A boolean indicating if the object was found and removed

removeGridFile

  • removeGridFile(gridFile: GridFile): boolean
  • Remove a GridFile object from the grid files.

    Parameters

    • gridFile: GridFile

      The GridFile object to remove

    Returns boolean

    A boolean indicating if the object was found and removed

removeIgnition

  • removeIgnition(ignition: Ignition): boolean
  • Remove an Ignition object from the ignitions.

    Parameters

    • ignition: Ignition

      The Ignition object to remove

    Returns boolean

    A boolean indicating if the object was found and removed

removeOutputGridFileFromScenario

  • Removes the output grid file from a scenario

    Parameters

    Returns boolean

removeOutputStatsFileFromScenario

  • removeOutputStatsFileFromScenario(stat: StatsFile): boolean
  • Remove a stats file from a scenario.

    Parameters

    Returns boolean

removeOutputSummaryFileFromScenario

  • removeOutputSummaryFileFromScenario(stat: SummaryFile): boolean
  • Removes the output summary file from a scenario

    Parameters

    Returns boolean

removeOutputVectorFileFromScenario

  • removeOutputVectorFileFromScenario(stat: VectorFile): boolean
  • Removes the output vector file from a scenario

    Parameters

    Returns boolean

removeScenario

  • removeScenario(scenario: Scenario): boolean
  • Remove a Scenario object from the scenarios.

    Parameters

    • scenario: Scenario

      The Scenario object to remove

    Returns boolean

    A boolean indicating if the object was found and removed

removeTarget

  • Remove an target from the job. This will not remove it from any scenarios that it may be associated with.

    Parameters

    Returns boolean

removeWeatherGrid

  • Remove a WeatherGrid object from the weather grid files.

    Parameters

    • weatherGrid: WeatherGrid

      The WeatherGrid object to remove

    Returns boolean

    A boolean indicating if the object was found and removed

removeWeatherPatch

  • Remove a WeatherPatch object from the weather patch files.

    Parameters

    • weatherPatch: WeatherPatch

      The WeatherPatch object to remove

    Returns boolean

    A boolean indicating if the object was found and removed

removeWeatherStation

  • Remove a WeatherStation object from the weather stations.

    Parameters

    Returns boolean

    A boolean indicating if the object was found and removed

setCrownBaseHeight

  • setCrownBaseHeight(fuel: "C-1" | "C-6" | "NZ-60" | "NZ-61" | "NZ-66" | "NZ-67" | "NZ-71", value: number): void
  • Set the crown base height.

    Parameters

    • fuel: "C-1" | "C-6" | "NZ-60" | "NZ-61" | "NZ-66" | "NZ-67" | "NZ-71"

      The fuel type to set the crown base height for. Must be C-1, C-6, NZ-60, NZ-61, NZ-66, NZ-67, or NZ-71.

    • value: number

      The crown base height (m).

    Returns void

setCrownFuelLoad

  • setCrownFuelLoad(fuel: "C-1" | "C-6" | "NZ-60" | "NZ-61" | "NZ-66" | "NZ-67" | "NZ-71", value: number): void
  • Set the crown fuel load in kg/m^2.

    Parameters

    • fuel: "C-1" | "C-6" | "NZ-60" | "NZ-61" | "NZ-66" | "NZ-67" | "NZ-71"

      The fuel type to set the crown fuel load for. Must be C-1, C-6, NZ-60, NZ-61, NZ-66, NZ-67, or NZ-71.

    • value: number

      The crown fuel load (kg/m^2).

    Returns void

setDefaultFMC

  • setDefaultFMC(value: number): void
  • Set the default FMC value for the fuel map. This value can be overridden by scenarios.

    deprecated

    deprecated since 6.2.4.3. Project level default FMC is no longer used.

    Parameters

    • value: number

      The default FMC value. Set to -1 to disable.

    Returns void

setElevationFile

  • setElevationFile(filename: string): void
  • Set the elevation grid file. An elevation grid file is optional. An exception will be thrown if the file does not exist.

    Parameters

    • filename: string

      Can either be the actual file path or the attachment URL returned from addAttachment

    Returns void

setFuelmapFile

  • setFuelmapFile(filename: string): void
  • Set the fuel map file. This file is required. An exception will be thrown if the file does not exist.

    Parameters

    • filename: string

      Can either be the actual file path or the attachment URL returned from addAttachment

    Returns void

setGrassCuring

  • setGrassCuring(fuel: "O-1a" | "O-1b" | "NZ-2" | "NZ-15" | "NZ-30" | "NZ-31" | "NZ-32" | "NZ-33" | "NZ-40" | "NZ-41" | "NZ-43" | "NZ-46" | "NZ-50" | "NZ-53" | "NZ-62" | "NZ-63" | "NZ-65", value: number): void
  • Set the grass curing for the O-1a, O-1b, NZ-2, NZ-15, NZ-30, NZ-31, NZ-32, NZ-33, NZ-40, NZ-41, NZ-43, NZ-46, NZ-50, NZ-53, NZ-62, NZ-63, or NZ-65 fuel type. If unset, this also sets the grass fuel load to 0.35kg/m^2.

    Parameters

    • fuel: "O-1a" | "O-1b" | "NZ-2" | "NZ-15" | "NZ-30" | "NZ-31" | "NZ-32" | "NZ-33" | "NZ-40" | "NZ-41" | "NZ-43" | "NZ-46" | "NZ-50" | "NZ-53" | "NZ-62" | "NZ-63" | "NZ-65"

      The fuel type to set the grass curing for.

    • value: number

      The grass curing (0 - 100%).

    Returns void

setGrassFuelLoad

  • setGrassFuelLoad(fuel: "O-1a" | "O-1b" | "NZ-2" | "NZ-15" | "NZ-30" | "NZ-31" | "NZ-32" | "NZ-33" | "NZ-40" | "NZ-41" | "NZ-43" | "NZ-46" | "NZ-50" | "NZ-53" | "NZ-62" | "NZ-63" | "NZ-65", value: number): void
  • Set the grass fuel load for either the O-1a, O-1b, NZ-2, NZ-15, NZ-30, NZ-31, NZ-32, NZ-33, NZ-40, NZ-41, NZ-43, NZ-46, NZ-50, NZ-53, NZ-62, NZ-63, or NZ-65 fuel type. If unset, this also sets the grass curing to 60%.

    Parameters

    • fuel: "O-1a" | "O-1b" | "NZ-2" | "NZ-15" | "NZ-30" | "NZ-31" | "NZ-32" | "NZ-33" | "NZ-40" | "NZ-41" | "NZ-43" | "NZ-46" | "NZ-50" | "NZ-53" | "NZ-62" | "NZ-63" | "NZ-65"

      The fuel type to set the grass fuel load for.

    • value: number

      The grass fuel load (kg/m^2).

    Returns void

setLutDefinition

  • setLutDefinition(fuels: Array<FuelDefinition>, filename?: string): string | boolean
  • Set the LUT using an array of fuel definitions. Replaces any existing LUT. One of this and setLutFile must be used but they cannot be used together.

    Parameters

    • fuels: Array<FuelDefinition>

      A list of fuel definitions to use as the LUT table.

    • Default value filename: string = "api_fuel_def.csv"

      An optional filename that will be used as a placeholder in the FGM for the LUT.

    Returns string | boolean

    False if the fuel definitions were not able to be added, the attachment name if setting the LUT was successful.

setLutFile

  • setLutFile(filename: string): void
  • Set the look up table. Replaces any existing LUT. One of this and setLutDefinition must be used but they cannot be used together. An exception will be thrown if the file does not exist.

    Parameters

    • filename: string

    Returns void

setPercentConifer

  • setPercentConifer(fuel: "M-1" | "M-2" | "NZ-54" | "NZ-69", value: number): void
  • Set the percent conifer for the M-1, M-2, NZ-54, or NZ-69 fuel type.

    Parameters

    • fuel: "M-1" | "M-2" | "NZ-54" | "NZ-69"

      The fuel type to set the percent conifer for. Must be M-1, M-2, NZ-54, or NZ-69.

    • value: number

      The percent conifer as a percent (0 - 100%).

    Returns void

setPercentDeadFir

  • setPercentDeadFir(fuel: "M-3" | "M-4", value: number): void
  • Set the percent dead fir for either the M-3 or M-4 fuel type.

    Parameters

    • fuel: "M-3" | "M-4"

      The fuel type to set the percent dead fir for. Must be either M-3 or M-4.

    • value: number

      The percent dead fir as a percent (0 - 100%).

    Returns void

setProjectionFile

  • setProjectionFile(filename: string): void
  • Set the projection file. This file is required. An exception will be thrown if the file does not exist.

    Parameters

    • filename: string

    Returns void

setTimezone

  • setTimezone(zone: Duration, daylight: boolean): void
  • Specify the timezone for all specified times.

    Parameters

    • zone: Duration

      The hour offset from UTC.

    • daylight: boolean

      Whether the offset is for daylight savings time or not.

    Returns void

setTimezoneByValue

  • setTimezoneByValue(value: number): void
  • Specify the timezone for all specified times by name. Must be one of the names provided by the timezone classes getTimezoneNameList() function.

    Parameters

    • value: number

      The value associated with the time zone.

    Returns void

streamOutputToGeoServer

  • streamOutputToGeoServer(username: string, password: string, url: string, workspace: string, coverageStore: string, srs?: string | null): void
  • Stream output files to a GeoServer instance. Currently only GeoTIFF files can be streamed to GeoServer.

    Parameters

    • username: string

      The username to authenticate on the GeoServer instance with.

    • password: string

      The password to authenticate on the GeoServer instance with. WARNING: the password will be stored in plain text.

    • url: string

      The URL of the GeoServer instance. The web interface should be at {url}/web.

    • workspace: string

      The name of the workspace to upload the file to. If the workspace doesn't exist it will be created.

    • coverageStore: string

      A prefix on the filename that will be used when creating the coverage store. The full coverage store name will be "coverageStore_filename" or just "filename" if coverageStore is an empty string.

    • Default value srs: string | null = null

      The declared spatial reference system of the uploaded file. If not provided the uploaded coverage will not be enabled.

    Returns void

streamOutputToMqtt

  • streamOutputToMqtt(): void
  • Stream output files to the MQTT connection.

    Returns void

unsetElevationFile

  • unsetElevationFile(): void
  • Unset the elevation grid file

    Returns void

unsetFuelmapFile

  • unsetFuelmapFile(): void
  • Unset the fuel map file.

    Returns void

unsetLutFile

  • unsetLutFile(): void
  • Unset the look up table.

    Returns void

unsetProjectionFile

  • unsetProjectionFile(): void
  • Unset the projection file.

    Returns void

unsetTimezoneByValue

  • unsetTimezoneByValue(value: number): void
  • Unset the timezone for all specified times by name.

    Parameters

    • value: number

    Returns void

Private validateFilename

  • validateFilename(filename: string): boolean
  • Test the validity of a filename.

    • The filename must not contain any of the following characters: \ / : * ? " < > |
    • The filename must not begin with a dot (.)
    • The filename may not be any of the following: nul, prn, con, aux, lpt#, com#

    Parameters

    • filename: string

      The filename to test for validity.

    Returns boolean

validateJob

  • validateJob(callback: (job: WISE, name: string) => any): void
  • Sends the job to the job manager for validation.

    throws

    This method can only be called once at a time per instance.

    Parameters

    • callback: (job: WISE, name: string) => any
        • (job: WISE, name: string): any
        • Parameters

          • job: WISE
          • name: string

          Returns any

    Returns void

validateJobPromise

  • Sends the job to the job manager for validation. The job won't run completely until the user issues the rerun command later.

    throws

    This method can only be called once at a time per instance.

    Returns Promise<StartJobWrapper>

    A StartJobWrapper that contains the name of the newly started job as well as the current WISE object.