get_fire_mov: Calculation of the fire movement

Description Usage Arguments Value Examples

View source: R/get_fire_mov.R

Description

This function calculates the movement of a single fire per step time indexes. It collects hot spots per step time indexes, then takes the mean or median of the longitude and latitude as the centre of the fire.

Usage

1
get_fire_mov(result, cluster, step = 1, method = "mean")

Arguments

result

spotoroo object. A result of a call to hotspot_cluster().

cluster

Integer. The membership label of the cluster.

step

Integer (>0). Step size used in the calculation of the fire movement.

method

Character. Either "mean" or "median", method of the calculation of the centre of the fire.

Value

A data.frame. The fire movement.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  # Time consuming functions (>5 seconds)


  # Get clustering results
  result <- hotspot_cluster(hotspots,
                          lon = "lon",
                          lat = "lat",
                          obsTime = "obsTime",
                          activeTime = 24,
                          adjDist = 3000,
                          minPts = 4,
                          minTime = 3,
                          ignitionCenter = "mean",
                          timeUnit = "h",
                          timeStep = 1)

  # Get fire movement of the first cluster
  mov1 <- get_fire_mov(result, cluster = 1, step = 3, method = "mean")
  mov1

  # Get fire movement of the second cluster
  mov2 <- get_fire_mov(result, cluster = 2, step = 6, method = "median")
  mov2

spotoroo documentation built on Nov. 10, 2021, 9:08 a.m.