OnWorks favicon

gdallocationinfo - Online in the Cloud

Run gdallocationinfo in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command gdallocationinfo that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



gdallocationinfo - gdallocationinfo raster query tool


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


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

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

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

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

-b band:
Selects a band to query. Multiple bands can be listed. By default all bands are

-overview overview_level:
Query the (overview_level)th overview (overview_level=1 is the 1st overview), instead
of the base band. Note that the x,y location (if the coordinate system is pixel/line)
must still be given with respect to the base band.

-l_srs srs def:
The coordinate system of the input x, y location.

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

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

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:

· 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.


Simple example reporting on pixel (256,256) on the file utm.tif.
$ gdallocationinfo utm.tif 256 256
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">


Frank Warmerdam [email protected]

Use gdallocationinfo online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    FreeRTOS Real Time Kernel (RTOS)
    FreeRTOS Real Time Kernel (RTOS)
    FreeRTOS is a market-leading real-time
    operating system (RTOS) for
    microcontrollers and small
    microprocessors. Distributed freely
    under the MIT open source lice...
    Download FreeRTOS Real Time Kernel (RTOS)
  • 2
    Avogadro is an advanced molecular
    editor designed for cross-platform use
    in computational chemistry, molecular
    modeling, bioinformatics, materials
    science and ...
    Download Avogadro
  • 3
    Strikr Free Software project. Artifacts
    released under a 'intent based'
    dual license: AGPLv3 (community) and
    CC-BY-NC-ND 4.0 international
    Download strikr
  • 5
    giflib is a library for reading and
    writing gif images. It is API and ABI
    compatible with libungif which was in
    wide use while the LZW compression
    algorithm was...
    Download GIFLIB
  • 6
    With Hugin you can assemble a mosaic of
    photographs into a complete immersive
    panorama, stitch any series of
    overlapping pictures and much more..
    Audience: Sci...
    Download Hugin
  • 7
    Alt-F provides a free and open source
    alternative firmware for the DLINK
    DNS-320/320L/321/323/325/327L and
    DNR-322L. Alt-F has Samba and NFS;
    supports ext2/3/4...
    Download Alt-F
  • More »

Linux commands