Create world files and projection files for UAS images

uas_worldfile(
  x,
  idx = NULL,
  aux.xml = TRUE,
  wld = FALSE,
  wldext = "auto",
  prj = FALSE,
  rotated = TRUE,
  quiet = FALSE
)

Arguments

x

A list of class 'uas_info'

idx

Which rows in x to process (default is all)

aux.xml

Create an aux.xml file, logical. See details.

wld

Create a world file, logical. See details.

wldext

Extension for the world file, character. Ignored if wld = FALSE.

prj

Create a prj file, logical. See details.

rotated

Compute parameters that replicate the camera Yaw.

quiet

Show messages.

Value

A vector of filenames generated.

Details

This function creates sidecard world files and/or projection files that are required to view raw images in GIS software such as ArcGIS and QGIS.

The parameters this function uses to generate world file are taken exclusively from the image metadata, including the altitude above the launch point, the focal length, and so on. They should be considered approximate at best. For a more accurate image placement, process the images with photogrammetry software.

To generate world files, you must tell it to compute footprints when generating the flight metadata object. In other words, when you run uas_info, pass fp = TRUE. If you've already generated a metadata object for the flight, you may also need to pass update_cache = TRUE. Computing footprints requires an altitude for each image, which not all drones support (especially multispectral cameras). For details see uas_info.

This function has been tested with JPG files from several DJI cameras. It has not yet been adapted for TIF files from multispectral cameras, and may not work with those formats (contact the package author if you want to try).

aux.xml files are ESRI auxillary files for raster layers. If your objective is to open the images in ArcGIS or QGIS, then generating the aux.xml files (the default setting) should be all you need. To be read by GIS software, they should have the same name as the image file with 'aux.xml' added on. aux.xml files can contain a lot of info about a raster layer, including statistics, the rotation info, coordinate reference system, and other stuff. The files generated by this function will only contain projection and rotation info only. Note also any existing aux.xml files will be overwritten. aux.xml files are the only sidecar file that ArcGIS software seems to support for reading the projection info.

World files are small text files with extensions jpw and tfw for JPG and TIF files respectively. To be read by GIS software, they must have the same basename as the image and be saved in the same directory. Both ArcGIS and QGIS read world files, however they are not needed if the same info is available in an aux.xml file.

prj files contain just the Coordinate Reference System info. They do not seem to be recognized for rasters by ArcGIS, however QGIS picks them up.

See also