This is an R wrapper for the 'gdallocationinfo' function that is part of the
Geospatial Data Abstraction Library (GDAL). It follows the parameter naming
conventions of the original function, with some modifications to allow for more R-like
parameters. For all parameters, the user can use a single character string following,
precisely, the gdalinfo format (http://www.gdal.org/gdallocationinfo.html), or,
in some cases, use R vectors to achieve the same end.
This utility is intended to provide a variety of information about a pixel. Currently it reports three things:
The location of the pixel in pixel/line space.
The result of a LocationInfo metadata query against the datasource - currently this is only implemented for VRT files which will report the file(s) used to satisfy requests for that pixel.
The raster pixel value of that pixel for all or a subset of the bands.
The unscaled pixel value if a Scale and/or Offset apply to the band.
The pixel selected is requested by x/y coordinate on the commandline, or read from stdin. More than one coordinate pair can be supplied when reading coordinatesis from stdin. By default pixel/line coordinates are expected. However with use of the -geoloc, -wgs84, or -l_srs switches it is possible to specify the location in other coordinate systems.
The default report is in a human readable text format. It is possible to instead request xml output with the -xml switch.
For scripting purposes, the -valonly and -lifonly switches are provided to restrict output to the actual pixel values, or the LocationInfo files identified for the pixel.
It is anticipated that additional reporting capabilities will be added to gdallocationinfo in the future.
This function assumes the user has a working GDAL on their system. If the
"gdalUtils_gdalPath" option has been set (usually by gdal_setInstallation),
the GDAL found in that path will be used. If nothing is found, gdal_setInstallation
will be executed to attempt to find a working GDAL.