gdallocationinfo(1) | General Commands Manual | gdallocationinfo(1) |
gdallocationinfogdallocationinfo
- raster query tool
Usage: gdallocationinfo [--help-general] [-xml] [-lifonly] [-valonly]
[-b band]* [-overview overview_level]
[-l_srs srs_def] [-geoloc] [-wgs84]
[-oo NAME=VALUE]* srcfile [x y]
The gdallocationinfo utility provide a mechanism to query information about a pixel given its location in one of a variety of coordinate systems. Several reporting options are provided.
This utility is intended to provide a variety of information about a pixel. Currently it reports three things:
The pixel selected is requested by x/y coordinate on the command line, or read from stdin. More than one coordinate pair can be supplied when reading coordinates 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.
Simple example reporting on pixel (256,256) on the file utm.tif.
$ gdallocationinfo utm.tif 256 256 Report:
Location: (256P,256L)
Band 1:
Value: 115
Query a VRT file providing the location in WGS84, and getting the result in xml.
$ gdallocationinfo -xml -wgs84 utm.vrt -117.5 33.75 <Report pixel="217" line="282">
<BandReport band="1">
<LocationInfo>
<File>utm.tif</File>
</LocationInfo>
<Value>16</Value>
</BandReport> </Report>
Frank Warmerdam warmerdam@pobox.com
Sun Jan 13 2019 | GDAL |