#ifndef DOXYGEN_SKIP /* $Id: gdal_utilities.dox 10601 2007-01-12 23:17:48Z fwarmerdam $ */ #endif /* DOXYGEN_SKIP */ /*! \page gdal_utilities GDAL Utilities The following utility programs are distributed with GDAL. \section gdal_utilities_creating 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 "--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.

\section gdal_utilities_switches 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).
--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.
\htmlonly

$Id: gdal_utilities.dox 10601 2007-01-12 23:17:48Z fwarmerdam $

\endhtmlonly */ ******************************************************************************* /*! \page gdalinfo gdalinfo lists information about a raster dataset \if man \section synopsis SYNOPSIS \endif \htmlonly Usage: \endhtmlonly \verbatim gdalinfo [--help-general] [-mm] [-stats] [-nogcp] [-nomd] [-mdd domain]* datasetname \endverbatim \if man \section description DESCRIPTION \endif The gdalinfo program lists various information about a GDAL supported raster dataset.
-mm
Force computation of the actual min/max values for each band in the dataset.
-stats
Force computation and display of image statistics.
-nogcp
Suppress ground control points list printing. It may be useful for datasets with huge amount of GCPs, such as L1B AVHRR or HDF4 MODIS which contain thousands of the ones.
-nomd
Suppress metadata printing. Some datasets may contain a lot of metadata strings.
-mdd domain
Report metadata for the specified domain
The gdalinfo will report all of the following (if known): \if man \section example EXAMPLE \endif \htmlonly Example: \endhtmlonly \verbatim gdalinfo ~/openev/utm.tif Driver: GTiff/GeoTIFF Size is 512, 512 Coordinate System is: PROJCS["NAD27 / UTM zone 11N", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.978698213901]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1]] Origin = (440720.000000,3751320.000000) Pixel Size = (60.000000,-60.000000) Corner Coordinates: Upper Left ( 440720.000, 3751320.000) (117d38'28.21"W, 33d54'8.47"N) Lower Left ( 440720.000, 3720600.000) (117d38'20.79"W, 33d37'31.04"N) Upper Right ( 471440.000, 3751320.000) (117d18'32.07"W, 33d54'13.08"N) Lower Right ( 471440.000, 3720600.000) (117d18'28.50"W, 33d37'35.61"N) Center ( 456080.000, 3735960.000) (117d28'27.39"W, 33d45'52.46"N) Band 1 Block=512x16 Type=Byte, ColorInterp=Gray \endverbatim \if man \section author AUTHORS Frank Warmerdam , Silke Reimer \endif */ ******************************************************************************* /*! \page gdal_translate gdal_translate converts raster data between different formats \if man \section tsynopsis SYNOPSIS \endif \htmlonly Usage: \endhtmlonly \verbatim gdal_translate [--help-general] [-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/ CInt16/CInt32/CFloat32/CFloat64}] [-not_strict] [-of format] [-b band] [-outsize xsize[%] ysize[%]] [-scale [src_min src_max [dst_min dst_max]]] [-srcwin xoff yoff xsize ysize] [-projwin ulx uly lrx lry] [-a_srs srs_def] [-a_ullr ulx uly lrx lry] [-a_nodata value] [-gcp pixel line easting northing]* [-mo "META-TAG=VALUE"]* [-quiet] [-sds] [-co "NAME=VALUE"]* src_dataset dst_dataset \endverbatim \if man \section tdescription DESCRIPTION \endif The gdal_translate utility can be used to convert raster data between different formats, potentially performing some operations like subsettings, resampling, and rescaling pixels in the process.
-ot: type
For the output bands to be of the indicated data type.
-not_strict:
Be forgiving of mismatches and lost data when translating to the output format.
-of format:
Select the output format. The default is GeoTIFF (GTiff). Use the short format name.
-b band:
Select an input band band for output. Bands are numbered from 1 Multiple -b switches may be used to select a set of input bands to write to the output file, or to reorder bands.
-outsize xsize[%] ysize[%]:
Set the size of the output file. Outsize is in pixels and lines unless '%' is attached in which case it is as a fraction of the input image size.
-scale [src_min src_max [dst_min dst_max]]:
Rescale the input pixels values from the range src_min to src_max to the range dst_min to dst_max. If omitted the output range is 0 to 255. If omitted the input range is automatically computed from the source data.
-srcwin xoff yoff xsize ysize:
Selects a subwindow from the source image for copying based on pixel/line location.
-projwin ulx uly lrx lry:
Selects a subwindow from the source image for copying (like -srcwin) but with the corners given in georeferenced coordinates.
-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_ullr ulx uly lrx lry:
Assign/override the georeferenced bounds of the output file. This assigns georeferenced bounds to the output file, ignoring what would have been derived from the source file.
-a_nodata value:
Assign a specified nodata value to output bands.
-mo "META-TAG=VALUE":
Passes a metadata key and value to set on the output dataset if possible.
-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.
-gcp pixel line easting northing:
Add the indicated ground control point to the output dataset. This option may be provided multiple times to provide a set of GCPs.
-quiet:
Suppress progress monitor and other non-error output.
-sds:
Copy all subdatasets of this file to individual output files. Use with formats like HDF or OGDI that have subdatasets.
src_dataset:
The source file name.
dst_dataset:
The destination file name.
\if man \section texample EXAMPLE \endif \htmlonly Example: \endhtmlonly \verbatim gdal_translate -of GTiff -co "TILED=YES" utm.tif utm_tiled.tif \endverbatim \if man \section tauthor AUTHORS Frank Warmerdam , Silke Reimer \endif */ ******************************************************************************* /*! \page gdaladdo gdaladdo builds or rebuilds overview images \if man \section asynopsis SYNOPSIS \endif \htmlonly Usage: \endhtmlonly \verbatim gdaladdo [-r {nearest,average,average_mp,average_magphase,mode}] filename levels \endverbatim \if man \section adescription DESCRIPTION \endif The gdaladdo utility can be used to build or rebuild overview images for most supported file formats with one over several downsampling algorithms.
-r {nearest,average,average_mp,average_magphase,mode}:
Select a resampling algorithm.
filename:
The file to build overviews for.
levels:
A list of integral overview levels to build.
Mode is not actually implemented, and average_mp is unsuitable for use. Average_magphase averages complex data in mag/phase space. Nearest and average are applicable to normal image data. Nearest applies a nearest neighbour (simple sampling) resampler, while average computes the average of all non-NODATA contributing pixels. Selecting a level value like 2 causes an overview level that is 1/2 the resolution (in each dimension) of the base layer to be computed. If the file has existing overview levels at a level selected, those levels will be recomputed and rewritten in place. Some format drivers do not support overviews at all. Many format drivers store overviews in a secondary file with the extension .ovr that is actually in TIFF format. The GeoTIFF driver stores overviews internally to the file operated on. Overviews created in TIFF format may be compressed using the COMPRESS_OVERVIEW configuration option. All compression methods, supported by the GeoTIFF driver, available here. (eg --config COMPRESS_OVERVIEW DEFLATE) Most drivers also support an alternate overview format using Erdas Imagine format. To trigger this use the USE_RRD=YES configuration option. This will place the overviews in an associated .aux file suitable for direct use with Imagine or ArcGIS as well as GDAL applications. (eg --config USE_RRD YES) \if man \section aexample EXAMPLE \endif \htmlonly Example: \endhtmlonly Create overviews, embedded in the supplied TIFF file: \verbatim gdaladdo -r average abc.tif 2 4 8 16 \endverbatim Create an external compressed GeoTIFF overview file from the ERDAS .IMG file: \verbatim gdaladdo --config COMPRESS_OVERVIEW DEFLATE erdas.img 2 4 8 16 \endverbatim Create an Erdas Imagine format overviews for the indicated JPEG file: \verbatim gdaladdo --config USE_RRD YES airphoto.jpg 3 9 27 81 \endverbatim \if man \section aauthor AUTHORS Frank Warmerdam , Silke Reimer \endif */ ******************************************************************************* /*! \page gdalwarp gdalwarp simple image reprojection and warping utility \if man \section wsynopsis SYNOPSIS \endif \htmlonly Usage: \endhtmlonly \verbatim gdalwarp [-s_srs srs_def] [-t_srs srs_def] [-order n] [-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...]"] [-rn] [-rb] [-rc] [-rcs] [-wm memory_in_mb] [-multi] [-q] [-of format] [-co "NAME=VALUE"]* srcfile dstfile \endverbatim \if man \section wdescription DESCRIPTION \endif

The gdalwarp utility is a simple image reprojection and warping utility. The program can reproject to any support 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.
-rn:
Use nearest neighbour resampling (default, fastest algorithm, worst interpolation quality).
-rb:
Use bilinear resampling.
-rc:
Use cubic resampling.
-rcs:
Use cubic spline resampling (slowest algorithm).
-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.
-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.
-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.
dstfile:
The destination file name.
Mosaicing into an existing output file is supported if the output file already exists.

\if man \section wexample EXAMPLE \endif \htmlonly Example: \endhtmlonly 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 \if man \section isynopsis SYNOPSIS \endif \htmlonly Usage: \endhtmlonly \verbatim gdaltindex [-tileindex field_name] index_file [gdal_file]* \endverbatim \if man \section idescription DESCRIPTION \endif 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.
  • Simple rectangular polygons are generated in the same coordinate system as the rasters.
\if man \section iexample EXAMPLE \endif \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 \if man \section isynopsis SYNOPSIS \endif \htmlonly Usage: \endhtmlonly \verbatim Usage: gdal_contour [-b ] [-a ] [-3d] [-inodata] [-snodata n] [-f ] [-i ] [-off ] [-fl ...] \endverbatim \if man \section idescription DESCRIPTION \endif 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.
\if man \section iexample EXAMPLE \endif \htmlonly Example: \endhtmlonly 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 \if man \section isynopsis SYNOPSIS \endif \htmlonly Usage: \endhtmlonly \verbatim Usage: gdal_rasterize [-b band] [-burn value] | [-a attribute_name] | [-3d] [-l layername]* [-where expression] [-sql select_statement] \endverbatim \if man \section idescription DESCRIPTION \endif 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.
-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.
\if man \section iexample EXAMPLE \endif \htmlonly Example: \endhtmlonly 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 iauthor AUTHORS Frank Warmerdam \endif */ ******************************************************************************* /*! \page rgb2pct rgb2pct.py converts an image into a pseudo-colored image \if man \section rsynopsis SYNOPSIS \endif \htmlonly Usage: \endhtmlonly \verbatim rgb2pct.py [-n colors] [-of format] source_file dest_file \endverbatim \if man \section rdescription DESCRIPTION \endif 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 \if man \section rsynopsis SYNOPSIS \endif \htmlonly Usage: \endhtmlonly \verbatim pct2rgb.py [-of format] [-b band] source_file dest_file \endverbatim \if man \section rdescription DESCRIPTION \endif 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 rauthor AUTHORS Frank Warmerdam , Silke Reimer \endif */ ******************************************************************************* /*! \page gdal_merge gdal_merge.py mosaics a set of images \if man \section msynopsis SYNOPSIS \endif \htmlonly Usage: \endhtmlonly \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 \if man \section mdescription DESCRIPTION \endif 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 mauthor AUTHORS Frank Warmerdam , Silke Reimer \endif */ ******************************************************************************* /*! \page gdal-config gdal-config determines various information about a GDAL installation \if man \section csynopsis SYNOPSIS \endif \htmlonly Usage: \endhtmlonly \verbatim gdal-config [OPTIONS] Options: [--prefix[=DIR]] [--libs] [--cflags] [--version] [--ogr-enabled] [--formats] \endverbatim \if man \section cdescription DESCRIPTION \endif 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.
*/