Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gdallocationinfo(1) [debian man page]

gdallocationinfo(1)					      General Commands Manual					       gdallocationinfo(1)

NAME
gdallocationinfo - gdallocationinfo raster query tool SYNOPSIS
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: o The location of the pixel in pixel/line space. o 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. o The raster pixel value of that pixel for all or a subset of the bands. o 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. 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> AUTHORS
Frank Warmerdam warmerdam@pobox.com GDAL
Tue Sep 18 2012 gdallocationinfo(1)

Check Out this Related Man Page

gdal_utilities(1)					      General Commands Manual						 gdal_utilities(1)

NAME
gdal_utilities - GDAL Utilities The following utility programs are distributed with GDAL. o gdalinfo - report information about a file. o gdal_translate - Copy a raster file, with control of output format. o gdaladdo - Add overviews to a file. o gdalwarp - Warp an image into a new coordinate system. o gdaltindex - Build a MapServer raster tileindex. o gdalbuildvrt - Build a VRT from a list of datasets. o gdal_contour - Contours from DEM. o gdaldem - Tools to analyze and visualize DEMs. o rgb2pct.py - Convert a 24bit RGB image to 8bit paletted. o pct2rgb.py - Convert an 8bit paletted image to 24bit RGB. o gdal_merge.py - Build a quick mosaic from a set of images. o gdal2tiles.py - Create a TMS tile structure, KML and simple web viewer. o gdal_rasterize - Rasterize vectors into raster file. o gdaltransform - Transform coordinates. o nearblack - Convert nearly black/white borders to exact value. o gdal_retile.py - Retiles a set of tiles and/or build tiled pyramid levels. o gdal_grid - Create raster from the scattered data. o gdal_proximity - Compute a raster proximity map. o gdal_polygonize - Generate polygons from raster. o gdal_sieve.py - Raster Sieve filter. o gdal_fillnodata.py - Interpolate in nodata regions. o gdallocationinfo - Query raster at a location. o gdalsrsinfo - Report a given SRS in different formats. (GDAL >= 1.9.0) o gdal-config - Get options required to build software using GDAL. Creating New Files Access an existing file to read it is generally quite simple. Just indicate the name of the file or dataset on the commandline. However, creating a file is more complicated. It may be necessary to indicate the the format to create, various creation options affecting how it will be created and perhaps a coordinate system to be assigned. Many of these options are handled similarly by different GDAL utilities, and are introduced here. -of format Select the format to create the new file as. The formats are assigned short names such as GTiff (for GeoTIFF) or HFA (for Erdas Imagine). The list of all format codes can be listed with the --formats switch. Only formats list as '(rw)' (read-write) can be written. Many utilities default to creating GeoTIFF files if a format is not specified. File extensions are not used to guess output format, nor are extensions generally added by GDAL if not indicated in the filename by the user. -co NAME=VALUE Many formats have one or more optional creation options that can be used to control particulars about the file created. For instance, the GeoTIFF driver supports creation options to control compression, and whether the file should be tiled. The creation options available vary by format driver, and some simple formats have no creation options at all. A list of options supported for a format can be listed with the '&ndash;format <format>' commandline option but the web page for the format is the definitive source of information on driver creation options. -a_srs SRS Several utilities, (gdal_translate and gdalwarp) include the ability to specify coordinate systems with commandline options like -a_srs (assign SRS to output), -s_srs (source SRS) and -t_srs (target SRS). These utilities allow the coordinate system (SRS = spatial reference system) to be assigned in a variety of formats. o NAD27/NAD83/WGS84/WGS72: These common geographic (lat/long) coordinate systems can be used directly by these names. o EPSG:n: Coordinate systems (projected or geographic) can be selected based on their EPSG codes, for instance EPSG:27700 is the British National Grid. A list of EPSG coordinate systems can be found in the GDAL data files gcs.csv and pcs.csv. o PROJ.4 Definitions: A PROJ.4 definition string can be used as a coordinate system. For instance '+proj=utm +zone=11 +datum=WGS84'. Take care to keep the proj.4 string together as a single argument to the command (usually by double quoting). o OpenGIS Well Known Text: The Open GIS Consortium has defined a textual format for describing coordinate systems as part of the Simple Features specifications. This format is the internal working format for coordinate systems used in GDAL. The name of a file containing a WKT coordinate system definition may be used a coordinate system argument, or the entire coordinate system itself may be used as a commandline option (though escaping all the quotes in WKT is quite challenging). o ESRI Well Known Text: ESRI uses a slight variation on OGC WKT format in their ArcGIS product (ArcGIS .prj files), and these may be used in a similar manner to WKT files, but the filename should be prefixed with ESRI::. For example 'ESRI::NAD 1927 StatePlane Wyoming West FIPS 4904.prj'. o Spatial References from URLs: For example http://spatialreference.org/ref/user/north-pacific-albers-conic-equal-area/. o filename: The name of a file containing WKT, PROJ.4 strings, or XML/GML coordinate system definitions can be provided. General Command Line Switches All GDAL command line utility programs support the following 'general' options. --version Report the version of GDAL and exit. --formats List all raster formats supported by this GDAL build (read-only and read-write) and exit. The format support is indicated as follows: 'ro' is read-only driver; 'rw' is read or write (ie. supports CreateCopy); 'rw+' is read, write and update (ie. supports Create). A 'v' is appended for formats supporting virtual IO (/vsimem, /vsigzip, /vsizip, etc). Note: The valid formats for the output of gdalwarp are formats that support the Create() method (marked as rw+), not just the CreateCopy() method. --format format List detailed information about a single format driver. The format should be the short name reported in the --formats list, such as GTiff. --optfile file Read the named file and substitute the contents into the commandline options list. Lines beginning with # will be ignored. Multi-word arguments may be kept together with double quotes. --config key value Sets the named configuration keyword to the given value, as opposed to setting them as environment variables. Some common configuration keywords are GDAL_CACHEMAX (memory used internally for caching in megabytes) and GDAL_DATA (path of the GDAL 'data' directory). Individual drivers may be influenced by other configuration options. --debug value Control what debugging messages are emitted. A value of ON will enable all debug messages. A value of OFF will disable all debug messages. Another value will select only debug messages containing that string in the debug prefix code. --help-general Gives a brief usage message for the generic GDAL commandline options and exit. GDAL
Tue Sep 18 2012 gdal_utilities(1)
Man Page