gdallocationinfo

raster query tool

SYNOPSIS

Usage:
Usage: gdallocationinfo [--help-general] [-xml] [-lifonly] [-valonly]
                        [-b band]* [-l_srs srs_def] [-geoloc] [-wgs84]
                        srcfile [x y]

DESCRIPTION

The gdallocationinfo utility provide a mechanism to query information about a pixel given it's location in one of a variety of coordinate systems. Several reporting options are provided.

-xml:

The output report will be XML formatted for convenient post processing.

-lifonly:

The only output is filenames production from the LocationInfo request against the database (ie. for identifying impacted file from VRT).

-valonly:

The only output is the pixel values of the selected pixel on each of the selected bands.

-b band:

Selects a band to query. Multiple bands can be listed. By default all bands are queried.

-l_srs srs def:

The coordinate system of the input x, y location.

-geoloc:

Indicates input x,y points are in the georeferencing system of the image.

-wgs84:

Indicates input x,y points are WGS84 long, lat.

srcfile:

The source GDAL raster datasource name.

x:

X location of target pixel. By default the coordinate system is pixel/line unless -l_srs, -wgs84 or -geoloc supplied.

y:

Y location of target pixel. By default the coordinate system is pixel/line unless -l_srs, -wgs84 or -geoloc supplied.

This utility is intended to provide a variety of information about a pixel. Currently it reports three things:

EXAMPLE

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>

Generated for GDAL by doxygen 1.6.3.