\endif
*/
*******************************************************************************
/*! \page gdalwarp gdalwarp
simple image reprojection and warping utility
\section wsynopsis SYNOPSIS
\htmlonly
Usage:
\endhtmlonly
\verbatim
gdalwarp
[-s_srs srs_def] [-t_srs srs_def] [-order n] ] [-tps] [-et err_threshold]
[-te xmin ymin xmax ymax] [-tr xres yres] [-ts width height]
[-wo "NAME=VALUE"] [-ot Byte/Int16/...] [-wt Byte/Int16]
[-srcnodata "value [value...]"] [-dstnodata "value [value...]"] -dstalpha
[-r resampling_method] [-wm memory_in_mb] [-multi] [-q]
[-of format] [-co "NAME=VALUE"]* srcfile* dstfile
\endverbatim
\section wdescription DESCRIPTION
The gdalwarp utility is an image mosaicing, reprojection and warping
utility. The program can reproject to any supported projection,
and can also apply GCPs stored with the image if the image is "raw"
with control information.
- -s_srs srs def:
- source spatial reference set.
The coordinate systems that can be passed are anything supported by the
OGRSpatialReference.SetFromUserInput() call, which includes EPSG PCS and GCSes
(ie. EPSG:4296), PROJ.4 declarations (as above), or the name of a .prf file
containing well known text.
- -t_srs srs_def:
- target spatial reference set.
The coordinate systems that can be passed are anything supported by the
OGRSpatialReference.SetFromUserInput() call, which includes EPSG PCS and GCSes
(ie. EPSG:4296), PROJ.4 declarations (as above), or the name of a .prf file
containing well known text.
- -order n:
- order of polynomial used for warping
(1 to 3). The default is to select a polynomial order based on the number of
GCPs.
- -tps
- Enable use of thin plate spline transformer based on
available GCPs. Use this instead of the -order switch.
- -et err_threshold:
- error threshold for
transformation approximation (in pixel units - defaults to 0.125).
- -te xmin ymin xmax ymax:
- set georeferenced
extents of output file to be created.
- -tr xres yres:
- set output file resolution (in
target georeferenced units)
- -ts width height:
- set output file size in
pixels and lines
- -wo "NAME=VALUE":
- Set a warp options. The
GDALWarpOptions::papszWarpOptions docs show all options. Multiple
-wo options may be listed.
- -ot type:
- For the output bands to be of the
indicated data type.
- -wt type:
- Working pixel data type. The data type
of pixels in the source image and destination image buffers.
- -r resampling_method:
- Resampling method to use. Available methods are:
- near
: - nearest neighbour resampling (default, fastest
algorithm, worst interpolation quality).
- bilinear
: - bilinear resampling.
- cubic
: - cubic resampling.
- cubicspline
: - cubic spline resampling.
- lanczos
: - Lanczos windowed sinc resampling.
- -srcnodata value [value...]:
- Set nodata masking
values for input bands (different values can be supplied for each band). If
more than one value is supplied all values should be quoted to keep them
together as a single operating system argument. Masked values will not be
used in interpolation. Use a value of None to ignore intrinsic nodata settings on the source dataset.
- -dstnodata value [value...]:
- Set nodata values
for output bands (different values can be supplied for each band). If more
than one value is supplied all values should be quoted to keep them together
as a single operating system argument. New files will be initialized to this
value and if possible the nodata value will be recorded in the output
file.
- -dstalpha:
- Create an output alpha band to identify
nodata (unset/transparent) pixels.
- -wm memory_in_mb:
- Set the amount of memory (in
megabytes) that the warp API is allowed to use for caching.
- -multi:
- Use multithreaded warping implementation.
Multiple threads will be used to process chunks of image and perform
input/output operation simultaneously.
- -q:
- Be quiet.
- -of format:
- Select the output format. The default is GeoTIFF (GTiff). Use the short format name.
- -co "NAME=VALUE":
- passes a creation option to
the output format driver. Multiple -co options may be listed. See
format specific documentation for legal creation options for each format.
- srcfile:
- The source file name(s).
- dstfile:
- The destination file name.
Mosaicing into an existing output file is supported if the output file
already exists.
\section wexample EXAMPLE
For instance, an eight bit spot scene stored in GeoTIFF with
control points mapping the corners to lat/long could be warped to a UTM
projection with a command like this:
\verbatim
gdalwarp -t_srs '+proj=utm +zone=11 +datum=WGS84' raw_spot.tif utm11.tif
\endverbatim
For instance, the second channel of an ASTER image stored in HDF with
control points mapping the corners to lat/long could be warped to a UTM
projection with a command like this:
\verbatim
gdalwarp HDF4_SDS:ASTER_L1B:"pg-PR1B0000-2002031402_100_001":2 pg-PR1B0000-2002031402_100_001_2.tif
\endverbatim
\if man
\section wauthor AUTHORS
Frank Warmerdam , Silke Reimer
\endif
*/
*******************************************************************************
/*! \page gdaltindex gdaltindex
builds a shapefile as a raster tileindex
\section isynopsis SYNOPSIS
\verbatim
gdaltindex [-tileindex field_name] [-write_absolute_path] [-skip_different_projection] index_file [gdal_file]*
\endverbatim
\section idescription DESCRIPTION
This program builds a shapefile with a record for each input raster file,
an attribute containing the filename, and a polygon geometry outlining the
raster. This output is suitable for use with UMN MapServer as a raster
tileindex.
- The shapefile (index_file) will be created if it doesn't already exist,
otherwise it will append to the existing file.
- The default tile index field is 'location'.
- Raster filenames will be put in the file exactly as they are specified
on the commandline unless the option -write_absolute_path is used.
- If -skip_different_projection is specified, only files with same projection ref
as files already inserted in the tileindex will be inserted.
- Simple rectangular polygons are generated in the same
coordinate system as the rasters.
\section iexample EXAMPLE
\htmlonly
Example:
\endhtmlonly
\verbatim
gdaltindex doq_index.shp doq/*.tif
\endverbatim
\if man
\section wauthor AUTHOR
Frank Warmerdam
\endif
*/
*******************************************************************************
/*! \page gdal_contour gdal_contour
builds vector contour lines from a raster elevation model
\section isynopsis SYNOPSIS
\verbatim
Usage: gdal_contour [-b ] [-a ] [-3d] [-inodata]
[-snodata n] [-f ] [-i ]
[-off ] [-fl ...]
\endverbatim
\section idescription DESCRIPTION
This program generates a vector contour file from the input raster elevation
model (DEM).
- -s_srs srs def:
- source spatial reference
set. The coordinate systems that can be passed are anything supported
by the OGRSpatialReference.SetFromUserInput() call, which includes
EPSG PCS and GCSes (ie. EPSG:4296), PROJ.4 declarations (as above),
or the name of a .prf file containing well known text.
-b band: picks a particular band to get the DEM from. Defaults to band 1.
-a name:provides a name for the attribute in which to put the elevation. If not provided no elevation attribute is attached.
-3d:
Force production of 3D vectors instead of 2D. Includes elevation at
every vertex.
-inodata: Ignore any nodata value implied in the dataset - treat all values as valid.
-snodata value:
Input pixel value to treat as "nodata".
-f format:
create output in a particular format, default is shapefiles.
-i interval:
elevation interval between contours.
-off offset:
Offset from zero relative to which to interpret intervals.
-fl level:
Name one or more "fixed levels" to extract.
\section iexample EXAMPLE
This would create 10meter contours from the DEM data in dem.tif and produce
a shapefile in contour.shp/shx/dbf with the contour elevations in the "elev"
attribute.
\verbatim
gdal_contour -a elev dem.tif contour.shp -i 10.0
\endverbatim
\if man
\section iauthor AUTHORS
Frank Warmerdam , Silke Reimer
\endif
*/
*******************************************************************************
/*! \page gdal_rasterize gdal_rasterize
burns vector polygons into a raster
\section zsynopsis SYNOPSIS
\verbatim
Usage: gdal_rasterize [-b band] [-i]
[-burn value] | [-a attribute_name] | [-3d]
[-l layername]* [-where expression] [-sql select_statement]
\endverbatim
\section zdescription DESCRIPTION
This program burns vector polygons into the raster band(s) of a raster
image. Vectors are read from OGR supported vector formats.
- -b band:
-
The band(s) to burn values into. Multiple -b arguments may be used to burn
into a list of bands. The default is to burn into band 1.
- -i:
-
Invert rasterization. Burn the fixed burn value, or the burn value associated
with the first feature into all parts of the image not iside a
polygon.
- -burn value:
-
A fixed value to burn into a band for all objects. A list of -burn options
can be supplied, one per band being written to.
- -a attribute_name:
-
Identifies an attribute field on the features to be used for a burn in value.
The value will be burned into all output bands.
- -3d:
-
Indicates that a burn value should be extracted from the "Z" values of the
feature (not yet implemented).
- -l layername:
-
Indicates the layer(s) from the datasource that will be used for input
features. May be specified multiple times, but at least one layer name or a -sql option must be specified.
- -where expression:
-
An optional SQL WHERE style query expression to be applied to select features
to burn in from the input layer(s).
- -sql select_statement:
-
An SQL statement to be evaluated against the datasource to produce a
virtual layer of features to be burned in.
- src_datasource:
-
Any OGR supported readable datasource.
- dst_filename:
-
The GDAL supported output file. Must support update mode access. Currently
gdal_rasterize cannot create new output files though that may be added eventually.
\section zexample EXAMPLE
The following would burn all polygons from mask.shp into the RGB TIFF
file work.tif with the color red (RGB = 255,0,0).
\verbatim
gdal_rasterize -b 1 -b 2 -b 3 -burn 255 -burn 0 -burn 0 -l mask mask.shp work.tif
\endverbatim
The following would burn all "class A" buildings into the output elevation
file, pulling the top elevation from the ROOF_H attribute.
\verbatim
gdal_rasterize -a ROOF_H -where 'class="A"' -l footprints footprints.shp city_dem.tif
\endverbatim
\if man
\section zauthor AUTHORS
Frank Warmerdam
\endif
*/
*******************************************************************************
/*! \page rgb2pct rgb2pct.py
converts an image into a pseudo-colored image
\section rsynopsis SYNOPSIS
\verbatim
rgb2pct.py [-n colors] [-of format] source_file dest_file
\endverbatim
\section rdescription DESCRIPTION
This utility will compute an optimal pseudo-color table for a given RGB image
using a median cut algorithm on a downsampled RGB histogram. Then it
converts the image into a pseudo-colored image using the color table.
This conversion utilizes Floyd-Steinberg dithering (error diffusion) to
maximize output image visual quality.
- -n colors:
- Select the number of colors in the generated
color table. Defaults to 256. Must be between 2 and 256.
- -of format:
- Format to generated (defaults to GeoTIFF). Same
semantics as the -of flag for gdal_translate. Only output formats
supporting pseudocolor tables should be used.
- source_file:
- The input RGB file.
- dest_file:
- The output pseudo-colored file that will be
created.
NOTE: rgb2pct.py is a Python script, and will only work if GDAL was built
with Python support.
\if man
\section iauthor AUTHOR
Frank Warmerdam
\endif
*/
*******************************************************************************
/*! \page pct2rgb pct2rgb.py
converts an image into a pseudo-colored image
\section psynopsis SYNOPSIS
\htmlonly
Usage:
\endhtmlonly
\verbatim
pct2rgb.py [-of format] [-b band] source_file dest_file
\endverbatim
\section pdescription DESCRIPTION
This utility will convert a pseudocolor band on the input file into an output
RGB file of the desired format.
- -of format:
- Format to generated (defaults to GeoTIFF).
- -b band:
-
Band to convert to RGB, defaults to 1.
- source_file:
- The input file.
- dest_file:
- The output RGB file that will be
created.
NOTE: pct2rgb.py is a Python script, and will only work if GDAL was built
with Python support.
\if man
\section pauthor AUTHORS
Frank Warmerdam , Silke Reimer
\endif
*/
*******************************************************************************
/*! \page gdaltransform gdaltransform
transforms coordinates
\section fsynopsis SYNOPSIS
\verbatim
gdaltransform [--help-general]
[i] [-s_srs srs_def] [-t_srs srs_def] [-order n] ] [-tps]
[-gcp pixel line easting northing [elevation]]*
[srcfile [dstfile]]
\endverbatim
\section fdescription DESCRIPTION
The gdaltransform utility reprojects a list of coordinates into any supported
projection,including GCP-based transformations.
- -s_srs srs def:
- source spatial reference set.
The coordinate systems that can be passed are anything supported by the
OGRSpatialReference.SetFromUserInput() call, which includes EPSG PCS and GCSes
(ie. EPSG:4296), PROJ.4 declarations (as above), or the name of a .prf file
containing well known text.
- -t_srs srs_def:
- target spatial reference set.
The coordinate systems that can be passed are anything supported by the
OGRSpatialReference.SetFromUserInput() call, which includes EPSG PCS and GCSes
(ie. EPSG:4296), PROJ.4 declarations (as above), or the name of a .prf file
containing well known text.
- -order n:
- order of polynomial used for warping
(1 to 3). The default is to select a polynomial order based on the number of
GCPs.
- -tps
- Enable use of thin plate spline transformer based on
available GCPs. Use this instead of the -order switch.
- -i
- Inverse transformation: from destination to source.
- srcfile:
- File with source projection definition or GCP's. If
not given, source projection is read from the command-line -s_srs or -gcp parameters
- dstfile:
- File with destination projection definition.
Coordinates are read as pairs (or triples) of numbers per line from standard
input, transformed, and written out to standard output in the same way. All
transformations offered by gdalwarp are handled, including gcp-based ones.
Note that input and output must always be in decimal form. There is currently
no support for DMS input or output.
\section fexample EXAMPLE
\verbatim
gdaltransform -s_srs epsg:28992 -t_srs epsg:31370
177502 311865
244510.77404604 166154.532871342 -1046.79270555763
\endverbatim
\if man
\section fauthor AUTHORS
Frank Warmerdam , Jan Hartmann
\endif
*/
*******************************************************************************
/*! \page nearblack nearblack
convert nearly black/white borders to black
\section msynopsis SYNOPSIS
\verbatim
nearblack [-white] [-near dist] [-nb non_black_pixels]
[-o outfile] infile
\endverbatim
\section mdescription DESCRIPTION
This utility will scan an image and try to set all pixels that are nearly
black (or nearly white) around the collar to exactly black (or white). This
is often used to "fix up" lossy compressed airphotos so that color pixels
can be treated as transparent when mosaicing.
- -o outfile:
- The name of the output file to be
created. Newly created files are currently always created with the HFA driver
(Erdas Imagine - .img)
- -white:
-
Search for nearly white (255) pixels instead of nearly black pixels.
- -near dist:
-
Select how far from black (or white) the pixel values can be and still considered near black (white). Defaults to 15.
- -nb non_black_pixels:
-
number of non-black pixels that can be encountered before the giving up search inwards. Defaults to 2.
- infile:
-
The input file. Any GDAL supported format, any number of bands, normally 8bit
Byte bands.
The algorithm processes the image one scanline at a time. A scan "in" is done
from either end setting pixels to black (white) until at least
"non_black_pixels" pixels that are more than "dist" gray levels away from
black (white) have been encountered at which point the scan stops. The nearly
black (white) pixels are set to black (white).
Note that this algorithm is only applied to horizontal scanlines, so a photo
with an indentation in the top or bottom will not have that indentation
identified. The processing is all done in 8bit (Bytes).
If the output file is omitted, the processed results will be written back
to the input file - which must support update.
\if man
\section mauthor AUTHORS
Frank Warmerdam
\endif
*/
*******************************************************************************
/*! \page gdal_merge gdal_merge.py
mosaics a set of images
\section gsynopsis SYNOPSIS
\verbatim
gdal_merge.py [-o out_filename] [-of out_format] [-co NAME=VALUE]*
[-ps pixelsize_x pixelsize_y] [-separate] [-v] [-pct]
[-ul_lr ulx uly lrx lry] [-n nodata_value] [-init value]
[-ot datatype] [-createonly] input_files
\endverbatim
\section gdescription DESCRIPTION
This utility will automatically mosaic a set of images. All the images must
be in the same coordinate system and have a matching number of bands, but
they may be overlapping, and at different resolutions.
- -o out_filename:
- The name of the output file to be
created.
- -of format:
-
Output format, defaults to GeoTIFF (GTiff).
- -co NAME=VALUE:
-
Creation option for output file. Multiple options can be specified.
- -ot datatype:
-
Force the output image bands to have a specific type. Use type names (ie. Byte, Int16,...)
- -ps pixelsize_x pixelsize_y:
- Pixel size to be used for the
output file. If not specified the resolution of the first input file will
be used.
- -ul_lr ulx uly lrx lry:
- The extents of the output file.
If not specified the aggregate extents of all input files will be
used.
-
- -v:
- Generate verbose output of mosaicing operations as they are done.
- -separate:
-
Place each input file into a separate stacked band.
- -pct:
-
Grab a pseudocolor table from the first input image, and use it for the output.
Merging pseudocolored images this way assumes that all input files use the same
color table.
- -n nodata_value:
-
Ignore pixels from files being merged in with this pixel value.
- -init value:
-
Pre-initialize the output file with this value. However, it is not marked
as the nodata value in the output file.
- -createonly:
-
The output file is created (and potentially pre-initialized) but no input
image data is copied into it.
NOTE: gdal_merge.py is a Python script, and will only work if GDAL was built
with Python support.
\if man
\section gauthor AUTHORS
Frank Warmerdam , Silke Reimer
\endif
*/
*******************************************************************************
/*! \page gdal2tiles gdal2tiles.py
generates directory with TMS tiles, KMLs and simple web viewers
\section gdal2tiles_synopsis SYNOPSIS
\verbatim
gdal2tiles.py [-title "Title"] [-publishurl http://yourserver/dir/]
[-nogooglemaps] [-noopenlayers] [-nokml]
[-googlemapskey KEY] [-forcekml] [-v]
input_file [output_dir]
\endverbatim
\section gdal2tiles_description DESCRIPTION
This utility generates a directory with small tiles and metadata, following
OSGeo Tile Map Service Specification. Simple web pages with viewers based on
Google Maps and OpenLayers are generated as well - so anybody can comfortably
explore your maps on-line and you do not need to install or configure any
special software (like mapserver) and the map displays very fast in the
webbrowser. You only need to upload generated directory into a web server.
GDAL2Tiles creates also necessary metadata for Google Earth (KML
SuperOverlay), in case the supplied map uses EPSG:4326 projection.
World files and embedded georeference is used during tile generation, but you
can publish a picture without proper georeference too.
- -title "Title":
- Title used for generated metadata, web viewers and KML files.
- -publishurl http://yourserver/dir/:
- Address of a directory into which you are going to upload the result. It should end with slash.
- -nogooglemaps:
- Do not generate Google Maps based html page.
- -noopenlayers:
- Do not generate OpenLayers based html page.
- -nokml:
- Do not generate KML files for Google Earth.
- -googlemapskey KEY:
- Key for your domain generated on Google Maps API web page (http://www.google.com/apis/maps/signup.html).
- -forcekml
- Force generating of KML files. Input file must use EPSG:4326 coordinates!
- -v
- Generate verbose output of tile generation.
NOTE: gdal2tiles.py is a Python script, and will only work if GDAL was built
with Python support.
\if man
\section gdal2tiles_author AUTHORS
Klokan Petr Pridal as a Google SoC 2007 Project.
\endif
*/
*******************************************************************************
/*! \page gdal-config gdal-config
determines various information about a GDAL installation
\section csynopsis SYNOPSIS
\verbatim
gdal-config [OPTIONS]
Options:
[--prefix[=DIR]]
[--libs]
[--cflags]
[--version]
[--ogr-enabled]
[--formats]
\endverbatim
\section cdescription DESCRIPTION
This utility script (available on Unix systems) can be used to determine
various information about a GDAL installation. It is normally just used
by configure scripts for applications using GDAL but can be queried by an
end user.
- --prefix:
- the top level directory for the GDAL
installation.
- --libs:
- The libraries and link directives required to
use GDAL.
- --cflags:
- The include and macro definition required to compiled
modules using GDAL.
- --version:
- Reports the GDAL version.
- --ogr-enabled:
- Reports "yes" or "no" to standard output depending
on whether OGR is built into GDAL.
- --formats:
- Reports which formats are configured into GDAL
to stdout.
*/
*******************************************************************************
/*! \page gdal_retile gdal_retile.py
gdal_retile - gdal_retily.py retiles a set of tiles and/or build tiled pyramid
levels
\section gdal_retile_synopsis SYNOPSIS
\verbatim
gdal_retile.py [-v] [-co NAME=VALUE]* [-of out_format] [-ps pixelWidth pixelHeight]
[-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/
CInt16/CInt32/CFloat32/CFloat64}]'
[ -tileIndex tileIndexName [-tileIndexField tileIndexFieldName]]
[-s_srs srs_def] [-pyramidOnly]
[-r {near/bilinear/cubic/cubicspline}]
-levels numberoflevels
-targetDir TileDirectory input_files
\endverbatim
\section gdal_retile_description DESCRIPTION
This utility will retile a set of input tile(s). All the input tile(s) must be
georeferenced in the same coordinate system and have a matching number of
bands. Optionally pyramid levels are generated. It is possible to generate
shape file(s) for the tiled output.
If your number of input tiles exhausts the command line buffer, use the
general --optfile option
- -targetDir directory:
-
The Directory where the tile result is created. Pyramids are stored
in subdirs numbered from 1. Created tile names have a numbering
schema and contain the name of the source tiles(s)
- -of format:
-
Output format, defaults to GeoTIFF (GTiff).
- -co NAME=VALUE:
-
Creation option for output file. Multiple options can be specified.
- -ot datatype:
-
Force the output image bands to have a specific type. Use type names (ie. Byte, Int16,...)
- -ps pixelsize_x pixelsize_y:
- Pixel size to be used
for the output file. If not specified, 256 x 256 is the default
- -levels numberOfLevels:
-
Number of pyramids levels to build.
- -v:
-
Generate verbose output of tile operations as they are done.
- -pyramidOnly:
-
No retiling, build only the pyramids
- -r algorithm:
-
Resampling algorithm, default is near
- -s_srs srs_def:
- Source spatial reference to use.
The coordinate systems that can be passed are anything supported by the
OGRSpatialReference.SetFro‐mUserInput() call, which includes EPSG PCS
and GCSes (ie.EPSG:4296), PROJ.4 declarations (as above), or the name of
a .prf file containing well known text.
If no srs_def is given, the srs_def of the source tiles is used (if
there is any).
The srs_def will be propageted to created tiles (if possible) and to the
optional shape file(s).
- -tileIndex tileIndexName:
-
The name of shape file containing the result tile(s) index
- -tileIndexField tileIndexFieldName:
-
The name of the attribute containing the tile name
NOTE: gdal_merge.py is a Python script, and will only work if GDAL was built
with Python support.
\if man
\section gdal_retile_author AUTHORS
Christian Mueller
\endif
*/
*******************************************************************************
/*! \page gdal_grid gdal_grid
creates regular grid from the scattered data
\section gdal_grid_synopsis SYNOPSIS
\verbatim
Usage: gdal_grid [--help-general] [--formats]
[-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/
CInt16/CInt32/CFloat32/CFloat64}]
[-of format] [-co "NAME=VALUE"]
[-a_srs srs_def]
[-l layername]* [-where expression] [-sql select_statement]
[-txe xmin xmax] [-tye ymin ymax] [-outsize xsize ysize]
[-a algorithm[:parameter1=value1]*] [-quiet]
\endverbatim
\section gdal_grid_description DESCRIPTION
This program creates regular grid (raster) from the scattered data read from
the OGR datasource. Input data will be interpolated to fill grid nodes with
values, you can choose from various interpolation methods.
- -ot type:
- For the output bands to be of the
indicated data type.
- -of format:
- Select the output format. The default
is GeoTIFF (GTiff). Use the short format name.
- -txe xmin xmax:
- Set georeferenced
X extents of output file to be created.
- -tye ymin ymax:
- Set georeferenced
Y extents of output file to be created.
- -outsize xsize ysize:
- Set the size of the
output file in pixels and lines.
- -a_srs srs_def:
- Override the projection for the
output file. The srs_def may be any of the usual GDAL/OGR forms,
complete WKT, PROJ.4, EPSG:n or a file containing the WKT.
- -a [algorithm[:parameter1=value1][:parameter2=value2]...]:
- Set the interpolation algorithm name and (optionally) its parameters. See \ref gdal_grid_algorithms section for discussion of available options.
- -l layername:
-
Indicates the layer(s) from the datasource that will be used for input
features. May be specified multiple times, but at least one layer name or a -sql option must be specified.
- -where expression:
-
An optional SQL WHERE style query expression to be applied to select features
to burn in from the input layer(s).
- -sql select_statement:
-
An SQL statement to be evaluated against the datasource to produce a
virtual layer of features to be burned in.
- -co "NAME=VALUE":
- Passes a creation option to the
output format driver. Multiple -co options may be listed. See format
specific documentation for legal creation options for each format.
- -quiet:
- Suppress progress monitor and other non-error
output.
- src_datasource:
-
Any OGR supported readable datasource.
- dst_filename:
-
The GDAL supported output file.
\section gdal_grid_algorithms INTERPOLATION ALGORITHMS
There are number of interpolation algorithms to choose from.
- invdist:
- Inverse distance to a power. This is default
algorithm. It has following parameters:
- power:
- Weighting power (default 2.0).
- smoothing:
- Smoothing parameter (default 0.0).
- radius1:
- The first radius (X axis if rotation angle is 0)
of search ellipse. Set this parameter to zero to use whole point array.
Default is 0.0.
- radius2:
- The second radius (Y axis if rotation angle is 0)
of search ellipse. Set this parameter to zero to use whole point array.
Default is 0.0.
- angle:
- Angle of search ellipse rotation in degrees
(counter clockwise, default 0.0).
- max_points:
- Maximum number of data points to use. Do not
search for more points than this number. This is only used if search ellipse
is set (both radiuses are non-zero). Zero means that all found points should
be used. Default is 0.
- min_points:
- Minimum number of data points to use. If less
amount of points found the grid node considered empty and will be filled with
NODATA marker. This is only used if search ellipse is set (both radiuses are
non-zero). Default is 0.
- nodata:
- NODATA marker to fill empty points (default
0.0).
- average:
- Moving average algorithm. It has following
parameters:
- radius1:
- The first radius (X axis if rotation angle is 0)
of search ellipse. Set this parameter to zero to use whole point array.
Default is 0.0.
- radius2:
- The second radius (Y axis if rotation angle is 0)
of search ellipse. Set this parameter to zero to use whole point array.
Default is 0.0.
- angle:
- Angle of search ellipse rotation in degrees
(counter clockwise, default 0.0).
- min_points:
- Minimum number of data points to use. If less
amount of points found the grid node considered empty and will be filled with
NODATA marker. Default is 0.
- nodata:
- NODATA marker to fill empty points (default
0.0).
Note, that it is essential to set search ellipse for moving average method. It
is a window that will be averaged when computing grid nodes values.
- nearest:
- Moving average algorithm. It has following
parameters:
- radius1:
- The first radius (X axis if rotation angle is 0)
of search ellipse. Set this parameter to zero to use whole point array.
Default is 0.0.
- radius2:
- The second radius (Y axis if rotation angle is 0)
of search ellipse. Set this parameter to zero to use whole point array.
Default is 0.0.
- angle:
- Angle of search ellipse rotation in degrees
(counter clockwise, default 0.0).
- nodata:
- NODATA marker to fill empty points (default
0.0).
\section gdal_grid_csv READING COMMA SEPARATED VALUES
Often you have a text file with a list of comma separated XYZ values to work
with (so called CSV file). You can easily use that kind of data source in \ref
gdal_grid. All you need is create a virtual dataset header (VRT) for you CSV
file and use it as input datasource for \ref gdal_grid. You can find details
on VRT format at Virtual Format description
page.
Here is a small example. Let we have a CSV file called dem.csv
containing
\verbatim
Easting,Northing,Elevation
86943.4,891957,139.13
87124.3,892075,135.01
86962.4,892321,182.04
87077.6,891995,135.01
...
\endverbatim
For above data we will create dem.vrt header with the following
content:
\verbatim
dem.csv
wkbPoint
\endverbatim
Now you can use dem.vrt with all OGR programs (start with \ref ogrinfo
to test that everything works fine). The datasource will contain single layer
called "dem" filled with point features constructed from values in CSV
file. Using this technique you can handle CSV files with more than three
columns, switch columns, etc.
If your CSV file does not contain column headers then it can be handled in the
following way:
\verbatim
\endverbatim
Comma Separated Value description page contains
details on CSV format supported by GDAL/OGR.
\section gdal_grid_example EXAMPLE
The following would create raster TIFF file from VRT datasource described in
\ref gdal_grid_csv section using the inverse distance to a power method.
\verbatim
gdal_grid -a invdist:power=2.0:smoothing=1.0 -txe 85000 89000 -tye 894000 890000 -outsize 400 400 -of GTiffG -ot Float64 -l dem dem.vrt dem.tiff
\endverbatim
\if man
\section gdal_grid_author AUTHORS
Andrey Kiselev
\endif
*/