Skip to contents

Creates image collection summaries for individual flights (folders)

Usage

uas_report(
  x,
  flt = NULL,
  group_img = FALSE,
  thumbnails = FALSE,
  show_local_dir = TRUE,
  units = c("imperial", "metric")[1],
  report_title = "Flight Summary",
  attachments = c("mcp_kml", "ctr_kml")[0],
  pts_col = NULL,
  output_dir = NULL,
  create_dir = TRUE,
  output_file = NULL,
  overwrite_html = FALSE,
  open_report = FALSE,
  self_contained = TRUE,
  tbm_use = FALSE,
  tbm_overwrite = FALSE,
  tbm_size = 480,
  tbm_src = c("Google", "Stadia")[1],
  tbm_api_key = NULL,
  tbm_exp = 0.2,
  report_rmd = NULL,
  header_html = NULL,
  footer_html = NULL,
  use_tmpdir = FALSE,
  quiet = FALSE,
  show_gps_coord = lifecycle::deprecated(),
  png_map = lifecycle::deprecated(),
  overwrite_png = lifecycle::deprecated(),
  png_exp = lifecycle::deprecated(),
  google_api = lifecycle::deprecated(),
  col = lifecycle::deprecated()
)

Arguments

x

A list of class 'uas_info'

flt

Flight(s) in x to process (character or numeric vector, default is all)

group_img

Group images within ~1m of each other into 1 point

thumbnails

Display thumbnail images, logical

show_local_dir

Show the local image directory, logical

units

imperial or metric, character

report_title

Title to appear at the top of the summary

attachments

Supplementary files to create and link to the flight summary, see Details.

pts_col

Color value(s) of the centroids and/or footprints

output_dir

If NULL, then will be placed in a 'map' sub-directory of the images

create_dir

Create the output directory if it doesn't exist

output_file

Name of the HTML file. If NULL a default based on the name of the input directory is chosen.

overwrite_html

Overwrite existing HTML files without warning, logical

open_report

Open the HTML file in a browser

self_contained

Make the output HTML file self-contained

tbm_use

Whether to create a PNG version of the map. May be logical, or dimensions of the output image in pixels (see Details)

tbm_overwrite

Overwrite existing PNG files without warning, logical

tbm_size

The size of a square flight thumbnail image in pixels, number

tbm_src

The API service to use to get the flight thumbnail background image, see Details.

tbm_api_key

API key for Google Static Maps or Stadia, see Details.

tbm_exp

A proportion to expand the bounding box of the PNG map, see Details.

report_rmd

Rmd template used to generate the HTML file. See Details.

header_html

A HTML file name or URL to use as the header

A HTML file name or URL to use as the footer

use_tmpdir

Use the temp dir for processing

quiet

TRUE to supress printing of the pandoc command line

show_gps_coord

`r lifecycle::badge("deprecated")` Does nothing

png_map

`r lifecycle::badge("deprecated")` Use tbm_use

overwrite_png

`r lifecycle::badge("deprecated")` Use tbm_overwrite

png_exp

`r lifecycle::badge("deprecated")` Use tbm_exp

google_api

`r lifecycle::badge("deprecated")` Use tbm_api_key

col

`r lifecycle::badge("deprecated")` Use pts_col

Value

The HTML file name(s) of the flight summaries generated

Details

This will generate HTML report(s) of the images in the UAS metadata object based.

group_img determinies whether images at the same location are represented by a single point on the map. This is common with multi-spectral sensors that take generate multiple images per location. 'Same location' is determined by looking at the 5th decimal place of the x and y geographic coordinates (~1m).

units defines whether the units for the flight area, above ground altitude, and GSD are reported in imperial or metric units.

If no value for output_dir is passed, the report will be saved in a sub-directory of the image directory called 'map'. This sub-directory will be created if create_dir = TRUE.

self_contained determines whether the HTML file(s) created will have all the JavaScript and CSS files embedded in the HTML file itself, or saved in a subdirectory called 'libs'. If saving several reports to one output directory, If saving multiple HTML reports to the same output directory, passing self_contained = FALSE is more efficient

The HTML report is generated from a RMarkdown file. If you know how to edit RMarkdown, you can modify the default template and pass the filename of your preferred template using the report_rmd argument.

tbm_use determines whether a thumbnail image of the flight will be downloaded from Google or StadiaMaps, and saved in output_dir. Although this thumbnail image of the flight is not be displayed in the flight summary report, it is used when generated a Table-of-Contents for a series of flights, and can be useful as a standalone quick glance of the flight in Windows Explorer, GitHub repos, etc.

Note that both Google Maps and StadiaMaps require an API key (that you pass using tbm_api_key). If you don't have an API key for one of these services, then you can't download a thumbnail image of the flight. To get an API key for the Google Static Maps service, see https://developers.google.com/maps/documentation/maps-static/ (there are also a number of tutorials available). Note that Google does require a credit card or their APIs, but the monthly quota before you get charged should be more than enough if all you're doing is downloading thumbnail images for your drone flights. To get an API key for StadiaMaps (no credit card required), start here. See the ggmap package for details.

The flight thumbnail image will be created at the dimensions given by tbm_size. tbm_exp is a percentage of the flight bounding box that will be used as a buffer around the background map. If the map seems too cropped, or you get a warning message about rows removed, try increasing it. pts_col can be used to pass a single color or vector of custom colors for the image locations (the default is a rainbow color ramp).

attachment specifies which supplementary files to create and link to the flight summary. Choices are ctr_kml and mcp_kml for KML versions of the camera locations and MCP (minimum convex polygon around all images). These KML files will be created in the same output directory as the flight summary.

See also