## @class Geo::GDAL
# @brief GDAL utility functions and a root class for raster classes.
#
# Geo::GDAL wraps many GDAL utility functions and acts as a root class
# for all GDAL raster classes. A "raster" is a dataset, whose core is
# a rectagular grid or grids of pixels, called a "band" in GDAL. Each
# pixel contains a numeric value of a specific data type

## @ignore FileFromMemBuffer
## @ignore GDALDestroyDriverManager
## @ignore HasThreadSupport
## @ignore TermProgress
## @ignore TermProgress_nocb

## @ignore PopErrorHandler
## @ignore PushErrorHandler
## @ignore SetErrorHandler
## @ignore Error
## @ignore ErrorReset
## @ignore GetLastErrorMsg
## @ignore GetLastErrorNo
## @ignore GetLastErrorType

## @ignore GeneralCmdLineProcessor

## @ignore GetDataTypeName
## @ignore GetDataTypeByName
## @ignore GetColorInterpretationName
## @ignore GetPaletteInterpretationName

## @ignore VSIFOpenL
## @ignore VSIFWriteL
## @ignore VSIFCloseL
## @ignore VSIFReadL
## @ignore VSIFSeekL
## @ignore VSIFTellL
## @ignore VSIFTruncateL
## @ignore Mkdir
## @ignore ReadDir
## @ignore ReadDirRecursive
## @ignore Rename
## @ignore RmDir
## @ignore Rmdir
## @ignore Stat
## @ignore Unlink

## @ignore FillNodata
## @ignore ContourGenerate
## @ignore RegenerateOverviews
## @ignore RegenerateOverview

## @cmethod $VersionInfo($request = 'VERSION_NUM')
# @param request A string specifying the request. Currently either
# "VERSION_NUM", "RELEASE_DATE", "RELEASE_NAME", or
# "--version". Default is "VERSION_NUM".
# @return Requested information.

## @cmethod PushFinderLocation($path)
# Add a path to the set of paths from where GDAL support files are
# sought.

## @cmethod PopFinderLocation()
# Remove the latest addition from the set of support file search
# paths.

## @cmethod FinderClean()
# Clear the set of support file search paths.

## @cmethod $FindFile($class, $basename)
# Search for GDAL support files.
#
# An example:
# \code
# use Geo::GDAL;
# $a = Geo::GDAL::FindFile('gdal', 'pcs.csv');
# print STDERR "$a\n";
# \endcode
# Prints (for example):
# \code
# c:\msys\1.0\local\share\gdal\pcs.csv
# \endcode
#
# @param class The class of files to search for. For example 'gdal'.
# @param basename The basename of the file to search for. For example
#  'pcs.csv'.
# @return the path to the searched file or undef.

## @cmethod SetConfigOption($key, $value)
# @param key A GDAL config option. Possible values include
# 'GDAL_FORCE_CACHING', 'USE_RRD', GDAL_DATA', 'GDAL_SKIP',
# 'GDAL_DRIVER_PATH', 'GDAL_IGNORE_AXIS_ORIENTATION',
# 'GMLJP2OVERRIDE', 'GDAL_DISABLE_READDIR_ON_OPEN',
# 'GDAL_PAM_ENABLED', 'GDAL_PAM_MODE', 'GDAL_PAM_PROXY_DIR',
# 'GDAL_MAX_DATASET_POOL_SIZE', 'GDAL_FORCE_CACHING', 'GDAL_CACHEMAX',
# 'GDAL_SWATH_SIZE', 'PROJSO', 'CENTER_LONG',
# 'OGR_DEBUG_ORGANIZE_POLYGONS', 'OGR_ORGANIZE_POLYGONS',
# and 'GDAL_JP2K_ALT_OFFSETVECTOR_ORDER'.
# Consult the GDAL main documentation for the semantics of config options.
# @param value A value for the option, typically 'YES', 'NO',
# undef, a path, or a filename.

## @cmethod $GetConfigOption($key, $default)
# @param key A GDAL config option.
# @param default A default value for the option.
# @return the value of the GDAL config option or the value of the
# default parameter.

## @ignore ApplyGeoTransform
## @ignore InvGeoTransform
## @ignore GCPsToGeoTransform

## @cmethod $GetCacheMax()
# @return maximum amount of memory (as bytes) for caching within GDAL.

## @cmethod SetCacheMax($Bytes)
# @param Bytes New maximum amount of memory for caching within GDAL.
#

## @cmethod $GetCacheUsed()
# @return the amount of memory currently used for caching within GDAL.

## @cmethod @DataTypes()
# @return a list of GDAL pixel data types. These are currently:
# +list Geo::GDAL::Const GDT_ TypeCount

## @cmethod $GetDataTypeSize($DataType)
# @param DataType A GDAL pixel data type (one of those listed by Geo::GDAL::DataTypes).
# @return the size as the number of bits.

## @cmethod @DataTypeValueRange($DataType)
# @param DataType Data type (one of those listed by Geo::GDAL::DataTypes).
# @note Some returned values are inaccurate.
#
# @return the minimum, maximum range of the data type.

## @cmethod $DataTypeIsComplex($DataType)
# @param DataType A GDAL pixel data type (one of those listed by Geo::GDAL::DataTypes).
# @return true if the data type is a complex number.

## @cmethod @AccessTypes()
# @return a list of GDAL data set open modes. These are currently:
# +list Geo::GDAL::Const GA_

## @cmethod @ResamplingTypes()
# @return a list of GDAL resampling methods.

## @cmethod @RIOResamplingTypes()
# @return a list of GDAL raster IO resampling methods.

## @cmethod $DecToDMS($angle, $axis, $precision=2)
# Convert decimal degrees to degrees, minutes, and seconds string
# @param angle A number
# @param axis A string specifying latitude or longitude ('Long').
# @param precision
# @return a string nndnn'nn.nn'"L where n is a number and L is either
# N or E

## @cmethod $PackedDMSToDec($packed)
# @param packed DMS as a number DDDMMMSSS.SS
# @return decimal degrees

## @cmethod $DecToPackedDMS($dec)
# @param dec Decimal degrees
# @return packed DMS, i.e., a number DDDMMMSSS.SS

## @cmethod @NodeTypes()
# @return a list of GDAL XML parser node types. These are currently:
# +list Geo::GDAL::Const CXT_

## @cmethod $NodeType($type)
# Convert between integer and string expressions of CPLXMLNodeTypes
# @param type (as integer)
# @return type (as string)

## @cmethod \@ParseXMLString($XML)
# Parses a given XML into an array of arrays and returns a reference
# to that. An array in the structure is: (CPLXMLNodeType, value,
# child, child, ...). CPLXMLNodeType is an integer.
# @param XML
# @return an XMLTree.
#
# Example:
# \code
open FILE, "data.xml" or die "Couldn't open file: $!"; 
my $xml = join("", <FILE>); 
close FILE;
my $tree = Geo::GDAL::ParseXMLString($xml);
traverse($tree);
print Geo::GDAL::SerializeXMLTree($tree),"\n";
 
sub traverse {
.    my $node = shift;
.    my $type = shift @$node;
.    my $data = shift @$node;
.    $type = Geo::GDAL::NodeType($type); 
.    print "$type, $data\n";
.    for my $child (@$node) {
.        traverse($child);
.    }
}
# \endcode

## @cmethod @NodeData($node)
# @param node
# @return ($NodeType, $value)

## @cmethod @Children($node)
# @param node
# @return

## @cmethod @Child($node, $i)
# @param node
# @param i 0 .. number of children - 1
# @return

## @cmethod $SerializeXMLTree(arrayref XMLTree)
# @param XMLTree
# @return XML

## @ignore Drivers
## @ignore GetDriverCount

## @cmethod @GetDriverNames()
# @return a list of the named of all (available and registered) GDAL
# raster drivers.

## @ignore Driver
## @ignore GetDriverByName

## @cmethod Geo::GDAL::Driver GetDriver($name)
# Create a driver object for the internal GDAL driver.
# @param name the (short) name of the driver.
# @return a Geo::GDAL::Driver object, which represents the internal driver.

## @cmethod Geo::GDAL::Driver IdentifyDriver($path, $siblings)
# @param path a dataset path.
# @param siblings [optional] A list of names of files in the directory
# specified by the path.
# @return a Geo::GDAL::Driver object, which represents an internal driver.

## @cmethod ComputeMedianCutPCT(Geo::GDAL::Band red, Geo::GDAL::Band green, Geo::GDAL::Band blue, $num_colors, $colors, subref progress, $progress_data)
# Compute an "optimal" color table for a three band image.
# @param red a Geo::GDAL::Band object
# @param green a Geo::GDAL::Band object
# @param blue a Geo::GDAL::Band object
# @param num_colors the desired number of colors 
# @param colors an empty Geo::GDAL::ColorTable object
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data)
# @param progress_data [optional]
#
# <a href="http://www.gdal.org/gdal__alg_8h.html">Documentation for GDAL algorithms</a>

## @cmethod DitherRGB2PCT($red, $green, $blue, $target, $colors, subref progress, $progress_data)
# Dither a three band image into one band using a color table.
# @param red a Geo::GDAL::Band object
# @param green a Geo::GDAL::Band object
# @param blue a Geo::GDAL::Band object
# @param target a Geo::GDAL::Band object
# @param colors a Geo::GDAL::ColorTable object
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data)
# @param progress_data [optional]
#
# <a href="http://www.gdal.org/gdal__alg_8h.html">Documentation for GDAL algorithms</a>

## @cmethod ReprojectImage($src_ds, $dst_ds, $src_wkt=undef, $dst_wkt=undef, $ResampleAlg='NearestNeighbour', $WarpMemoryLimit=0, $maxerror=0.0, subref progress, $progress_data)
# @param src_ds Source dataset.
# @param dst_ds Destination dataset.
# @param src_wkt Source projection as a WKT.
# @param dst_wkt Destination projection as a WKT.
# @param ResampleAlg One of NearestNeighbour Bilinear Cubic or CubicSpline.
# @param WarpMemoryLimit The amount of memory allowed for caching. Default is 0, i.e., no limit.
# @param maxerror Maximum error measured in input pixels that is
# allowed in approximating the transformation. Default is 0.0, i.e.,
# exact calculations.
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data).
# Reprojection is terminated if the progress function returns 0.
# @param progress_data [optional]
#
# <a href="http://www.gdal.org/gdalwarper_8h.html">Documentation for GDAL warper</a>

## @cmethod Geo::GDAL::Dataset AutoCreateWarpedVRT(Geo::GDAL::Dataset src, Geo::OSR::SpatialReference src_srs=undef, Geo::OSR::SpatialReference dst_srs=undef, $ResampleAlg='NearestNeighbour', $maxerror=0.0)
# @param src
# @param src_srs source projection.
# @param dst_srs destination projection.
# @param ResampleAlg one of Geo::GDAL::ResamplingTypes().
# @param maxerror
# @return a new Geo::GDAL::Dataset object
#
# <a href="http://www.gdal.org/gdalwarper_8h.html">Documentation for GDAL warper</a>

## @cmethod ComputeProximity(Geo::GDAL::Band src, Geo::GDAL::Band proximity, hashref options, subref progress, $progress_data)
# @param src The raster from which the proximities are computed from.
# @param proximity The raster to which the proximities are computed to.
# @param options Options. Supported key, value pairs are 
# - VALUES => n[,n]* A list of target pixel values to measure the
# distance from.  If this option is not provided proximity will be
# computed from non-zero pixel values.  Currently pixel values are
# internally processed as integers.
# - DISTUNITS => PIXEL|GEO Indicates whether distances will be
# computed in pixel units or in georeferenced units.  The default is
# pixel units.  This also determines the interpretation of MAXDIST.
# - MAXDIST => n The maximum distance to search.  Proximity distances
# greater than this value will not be computed.  Instead output pixels
# will be set to a nodata value.
# - NODATA => n The NODATA value to use on the output band for pixels
# that are beyond MAXDIST.  If not provided, the hProximityBand will
# be queried for a nodata value.  If one is not found, 65535 will be
# used.
# - FIXED_BUF_VAL => n If this option is set, all pixels within the
# MAXDIST threadhold are set to this fixed value instead of to a
# proximity distance.
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data)
# @param progress_data [optional]
#
# <a href="http://www.gdal.org/gdal__alg_8h.html">Documentation for GDAL algorithms</a>

## @cmethod RasterizeLayer(Geo::GDAL::Dataset ds, arrayref bands, Geo::OGR::Layer layer, $transformer, $arg, arrayref burn_values, hashref options, subref progress, $progress_data)
# @param ds
# @param bands A reference to a list of bands to be updated.
# @param layer
# @param transformer Not supported, must be undef.
# @param arg Transformer argument, must be undef.
# @param burn_values Values to be used for burning the geometries. One for each layer.
# @param options Not used.
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data)
# @param progress_data [optional]
#
# <a href="http://www.gdal.org/gdal__alg_8h.html">Documentation for GDAL algorithms</a>

## @cmethod Polygonize(Geo::GDAL::Band src, Geo::GDAL::Band mask, Geo::OGR::Layer out, $PixValField, hashref options, subref progress, $progress_data)
# @param src
# @param mask All pixels in the mask band with a value other than zero
# will be considered suitable for collection as polygons. Must be
# undef if not used.
# @param out
# @param PixValField The index (or name) of the field in output layer
# into which the pixel value of the polygon should be written.
# @param options Not used.
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data)
# @param progress_data [optional]
#
# <a href="http://www.gdal.org/gdal__alg_8h.html">Documentation for GDAL algorithms</a>

## @cmethod SieveFilter(Geo::GDAL::Band src, Geo::GDAL::Band mask, Geo::GDAL::Band dst, $threshold, $connectedness, hashref options, subref progress, $progress_data)
# Removes small raster polygons.
# @param src
# @param mask
# @param dst
# @param threshold An integer.
# @param connectedness 4 or 8
# @param options Not used.
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data)
# @param progress_data [optional]
#
# <a href="http://www.gdal.org/gdal__alg_8h.html">Documentation for GDAL algorithms</a>

## @cmethod \@GeneralCmdLineProcessor(arrayref argv, $options = 0)
# @param argv
# @param options integer
# @return arrayref

## @cmethod $PackCharacter($DataType)
# Get the character that is needed for Perl's pack and unpack when
# they are used with Geo::GDAL::Band::ReadRaster and
# Geo::GDAL::Band::WriteRaster. Note that Geo::GDAL::Band::ReadTile
# and Geo::GDAL::Band::WriteTile have simpler interfaces that do not
# require pack and unpack.
# @param DataType A GDAL pixel data type (typically from $band->{DataType}).
# @return a character which can be used in Perl's pack and unpack.

## @cmethod Geo::GDAL::Dataset Open($name, $access = 'ReadOnly')
# An example
# \code
# use Geo::GDAL;
# $ds = Geo::GDAL::Open('existing.tiff', 'Update');
# \endcode
# @param name
# @param access Access type (one of those listed by Geo::GDAL::AccessTypes).
# @return a new Geo::GDAL::Dataset object.

## @cmethod Geo::GDAL::Dataset OpenShared($name, $access = 'ReadOnly')
# @param name
# @param access Access type (one of those listed by Geo::GDAL::AccessTypes).
# @return a new Geo::GDAL::Dataset object.

## @cmethod Geo::GDAL::Dataset OpenEx($name, $open_flags = 0, array reference allowed_drivers = undef, array reference open_options = undef, array reference sibling_files = undef);
# @return a new Geo::GDAL::Dataset object.




## @class Geo::GDAL::AsyncReader
# @brief Enable asynchronous requests.
# @isa (Geo::GDAL)
# @todo Test and document.
#
# This class is not yet documented nor tested in the GDAL Perl wrappers




## @class Geo::GDAL::MajorObject
# @brief An object, which holds meta data.
# @isa (Geo::GDAL)

## @cmethod Domains
# @return the class specific DOMAINS list

## @method $Description($description)
# @param description [optional]
# @return the description in a non-void context.

## @method $GetDescription()
# @return

## @method SetDescription($NewDesc)
# @param NewDesc
#

## @ignore SetMetadataItem
## @ignore GetMetadataItem

## @method \%Metadata(hashref metadata = undef, $domain = '')
# @param metadata
# @param domain
# @return the metadata in a non-void context.

## @method \%GetMetadata($domain = "")
# @note see Metadata
# @param domain
# @return

## @method SetMetadata(hashref metadata, $domain = "")
# @note see Metadata
# @param metadata
# @param domain
#




## @class Geo::GDAL::Driver
# @brief A raster format driver.
# @isa (Geo::GDAL::MajorObject Geo::GDAL)

## @ignore Register
## @ignore Deregister

## @attr ShortName
# $driver->{ShortName}

## @attr LongName
# $driver->{LongName}

## @attr HelpTopic
# $driver->{HelpTopic}

## @method Rename($NewName, $OldName)
# Rename (move) a GDAL dataset.
# @param NewName String.
# @param OldName String.

## @method Copy($NewName, $OldName)
# Copy the files of a dataset.
# @param NewName String.
# @param OldName String.

# @method $Name
# @return The short name of the driver.

## @method @Capabilities()
# @return A list of capabilities. When executed as a class method
# returns a list of all potential capabilities a driver may have. When
# executed as an object method returns a list of all capabilities the
# driver has.
#
# Currently capabilities are:
# +list Geo::GDAL::Const DCAP_
#
# Examples.
# \code
# @all_capabilities = Geo::GDAL::Driver::Capabilities;
# @capabilities_of_the_geotiff_driver = Geo::GDAL::Driver('GTiff')->Capabilities;
# \endcode

## @method $TestCapability($cap)
# Test whether the driver has the specified capability.
# @param cap A capability string (one of those returned by Capabilities).
# @return a boolean value.

## @method $Extension()
# @return a suggested extension or extensions (e.g., ext1/ext2) for
# datasets.

## @method $MIMEType()
# @return a suggested MIME type for datasets.

## @method @CreationOptionList()
# @return a list of options, each option is a hashref, the keys are
# name, type and description or Value. Value is a listref.

## @method @CreationDataTypes()
# @return a list of data types that can be used for new datasets.

## @ignore CreateDataset

## @method Geo::GDAL::Dataset Create(%params)
# Create a GDAL dataset using this driver.
# @note a.k.a. CreateDataset
#
# @note As a list the parameters are: Name, Width, Height, NumberOfBands, PixelDataType, Options
#
# Create a new Geo::GDAL::Dataset
# @param params named parameters:
# - \a Name the name of the dataset (default is 'unnamed').
# - \a Width the width of the dataset (default is 256).
# - \a Height the height of the dataset (default is 256).
# - \a Bands number of bands in the dataset (default is 1).
# - \a Type the data type of the pixels the dataset (default is 'Byte'). One of Geo::OGR::Driver::CreationDataTypes.
# - \a Options creation options as a reference to a hash (default is {}).
#
# @return a new Geo::GDAL::Dataset object.

## @ignore CreateCopy

## @method Geo::GDAL::Dataset Copy($name, $src, $strict = 1, hashref options = undef)
# Create a new Geo::GDAL::Dataset as a copy of an existing dataset.
# @note a.k.a. CreateCopy 
# @param name
# @param src A Geo::GDAL::Dataset object.
# @param strict
# @param options An anonymous hash of driver specific parameters.
# @return a new Geo::GDAL::Dataset object.

## @method Delete($name)
# @param name




## @class Geo::GDAL::GCP
# @brief A ground control point for georeferencing images.
# @isa (Geo::GDAL)

## @cmethod $new($x = 0.0, $y = 0.0, $z = 0.0, $column = 0.0, $row = 0.0, $info = "", $id = "")
# @param x projection coordinate
# @param y projection coordinate
# @param z projection coordinate
# @param column pixel x coordinate
# @param row pixel y coordinate
# @param info informational message
# @param id unique identifier (string)
# @return a new Geo::GDAL::GCP object

## @attr X
# projection coordinate (access as $gcp->{X})

## @attr Y
# projection coordinate (access as $gcp->{Y})

## @attr Z
# projection coordinate (access as $gcp->{Z})

## @attr Column
# pixel x coordinate (access as $gcp->{Column})
# @note Pixel is deprecated.
#

## @attr Row
# pixel y coordinate (access as $gcp->{Row})
# @note Line is deprecated.
#

## @attr Info
# informational message (access as $gcp->{Info})

## @attr Id
# unique identifier (string) (access as $gcp->{Id})




## @class Geo::GDAL::Dataset
# @brief A set of associated raster bands.
# @isa (Geo::GDAL::MajorObject Geo::GDAL)

## @ignore FlushCache

## @attr RasterXSize
# scalar (access as $dataset->{RasterXSize})

## @attr RasterYSize
# scalar (access as $dataset->{RasterYSize})

## @attr RasterCount
# scalar (access as $dataset->{RasterCount})

## @cmethod Geo::GDAL::Dataset Open($name, $access='ReadOnly')
# An example:
# \code
# use Geo::GDAL;
# $ds = Geo::GDAL::Dataset::Open('/data/dem.tiff', 'Update');
# \endcode
# @param name
# @param access Access type (one of those listed by Geo::GDAL::AccessTypes).
# @return a new Geo::GDAL::Dataset object.

## @cmethod Geo::GDAL::Dataset OpenShared($name, $access='ReadOnly')
# @param name
# @param access Access type (one of those listed by Geo::GDAL::AccessTypes).
# @return a new Geo::GDAL::Dataset object.

## @method @GetFileList()
# @return list of files GDAL believes to be part of this dataset.

## @method @Size()
# @return (width, height)

## @method Geo::GDAL::Driver GetDriver()
# @return a new Geo::GDAL::Driver object

## @ignore GetRasterBand

## @method Geo::GDAL::Band Band($index)
# Create a band object for the band within the dataset.
# @note a.k.a. GetRasterBand
# @param index 1...RasterCount
# @return a new Geo::GDAL::Band object

## @method @Bands()
# @return a list of new Geo::GDAL::Band objects

## @ignore GetProjectionRef
## @ignore GetProjection
## @ignore SetProjection
## @ignore Projection

## @method Geo::OSR::SpatialReference SpatialReference(Geo::OSR::SpatialReference sr)
# Get or set the projection of this dataset.
# @param sr [optional] a Geo::OSR::SpatialReference object,
# which replaces the existing projection definition of this dataset.
# @return a Geo::OSR::SpatialReference object, which represents the
# projection of this dataset.
# @note Methods GetProjection, SetProjection, and Projection return WKT strings.

## @ignore GetGeoTransform
## @ignore SetGeoTransform

## @method Geo::GDAL::GeoTransform GeoTransform(Geo::GDAL::GeoTransform $geo_transform)
# Transformation from pixel coordinates (column,row) to projection
# coordinates (x,y)
# \code
# x = geo_transform[0] + column*geo_transform[1] + row*geo_transform[2]
# y = geo_transform[3] + column*geo_transform[4] + row*geo_transform[5]
# \endcode
# @param geo_transform [optional]
# @return the geo transform in a non-void context.

## @method BuildOverviews($resampling, arrayref overviews, subref progress, $progress_data)
# @param resampling the resampling method, one of Geo::GDAL::RIOResamplingTypes.
# @param overviews The list of overview decimation factors to
# build. For example [2,4,8].
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data)
# @param progress_data [optional]

## @ignore GetGCPCount
## @ignore GetGCPs
## @ignore SetGCPs

## @method @GCPs(@GCPs, Geo::OSR::SpatialReference sr)
# Get or set the GCPs and their projection.
# @param GCPs [optional] a list of Geo::GDAL::GCP objects
# @param sr [optional] the projection of the GCPs.
# @return a list of Geo::GDAL::GCP objects followed by a Geo::OSR::SpatialReference object.

## @method $GetGCPProjection()
# @return projection string.

## @method FlushCache()
# Write cached data to disk. There is usually no need to call this
# method.

## @method AddBand($datatype = 'Byte', hashref options = 0)
# Add a new band to the dataset. The driver must support the action.
# @param datatype GDAL pixel data type (one of those listed by Geo::GDAL::DataTypes).
# @param options reference to a hash of format specific key=>value options.

## @method WriteRaster(%params)
# Write data into the dataset. 
#
# @param params named parameters. These are
# - \a XOff x offset (pixel coordinates) (default is 0)
# - \a YOff y offset (pixel coordinates) (default is 0)
# - \a XSize width of the area to write (default is the width of the dataset)
# - \a YSize height of the area to write (default is the height of the dataset)
# - \a Buf a buffer containing the data. Create the buffer with \a pack function of Perl. See Geo::GDAL::Band::PackCharacter.
# - \a BufXSize (default is undef, i.e., the same as XSize)
# - \a BufYSize (default is undef, i.e., the same as YSize)
# - \a BufType data type of the buffer (default is the data type of the first band)
# - \a BandList a reference to an array of band indeces (default is [1])
# - \a BufPixelSpace (default is 0)
# - \a BufLineSpace (default is 0)
# - \a BufBandSpace (default is 0)
#
# If the parameters are given as a list the order is as above.
# <a href="http://www.gdal.org/classGDALDataset.html">Entry in GDAL docs (method RasterIO)</a>

## @method $ReadRaster(%params)
# Read data from the dataset.
#
# @param params named parameters. These are
# - \a XOff x offset (pixel coordinates) (default is 0)
# - \a YOff y offset (pixel coordinates) (default is 0)
# - \a XSize width of the area to read (default is the width of the dataset)
# - \a YSize height of the area to read (default is the height of the dataset)
# - \a BufXSize (default is undef, i.e., the same as XSize)
# - \a BufYSize (default is undef, i.e., the same as YSize)
# - \a BufType data type of the buffer (default is the data type of the first band)
# - \a BandList a reference to an array of band indeces (default is [1])
# - \a BufPixelSpace (default is 0)
# - \a BufLineSpace (default is 0)
# - \a BufBandSpace (default is 0)
# - \a ResampleAlg one of Geo::GDAL::RIOResamplingTypes (default is 'NearestNeighbour'),
# - \a Progress reference to a progress function (default is undef)
# - \a ProgressData (default is undef)
#
# If the parameters are given as a list the order is as above.
# <a href="http://www.gdal.org/classGDALDataset.html">Entry in GDAL docs (method RasterIO)</a>
# @return a buffer, open the buffer with \a unpack function of Perl. See Geo::GDAL::Band::PackCharacter.

## @method CreateMaskBand()
# Add a mask band to the dataset.




## @class Geo::GDAL::Band
# @brief A raster band.
# @isa ( Geo::GDAL::MajorObject Geo::GDAL )

## @ignore COLOR_INTERPRETATIONS 

## @cmethods ColorInterpretations
# @return a list of types of color interpretation for raster
# bands.

## @attr XSize
# Object attribute.
# scalar (access as $band->{XSize})

## @attr YSize
# Object attribute.
# scalar (access as $band->{YSize})

## @ignore GetBand

## @method $GetBandNumber()
# @note a.k.a. GetBand
# @return the number of this band.

## @method $DataType()
# @return the data type of this band (as string, one of Geo::GDAL::DataTypes).

## @method $PackCharacter()
# @return the character to use in Perl pack and unpack for the DataType of this band.

## @method @Size()
# @return the size of the band as a list (width, height).

## @method @GetBlockSize()
# @return the size of a preferred i/o raster blocks as a list (width,
# height).

## @ignore GetRasterColorInterpretation
## @ignore SetRasterColorInterpretation
## @ignore GetColorInterpretation
## @ignore SetColorInterpretation

## @method $ColorInterpretation($color_interpretation)
# @note a.k.a. GetRasterColorInterpretation and GetColorInterpretation
# (get only and returns an integer), SetRasterColorInterpretation and
# SetColorInterpretation (set only and requires an integer)
# @param color_interpretation [optional] new color interpretation, one
# of Geo::GDAL::Band::ColorInterpretations.
# @return color interpretation, one of Geo::GDAL::Band::ColorInterpretations.

## @ignore GetNoDataValue
## @ignore SetNoDataValue

## @method $NoDataValue($NoDataValue)
# @note a.k.a. GetNoDataValue (get only), SetNoDataValue (set only)
# @param NoDataValue [optional]
# Get or set the "no data" value.
# @note $band->NoDataValue(undef) sets the "no data" value to the Posix
# floating point maximum.
# @return the "no data" value in scalar context. In list context
# returns the no data value or an out of range value and a boolean
# value, which indicates which is the case (true is first, false is
# second).

## @ignore GetUnitType
## @ignore SetUnitType

## @method Unit($type)
# @param type [optional] the unit (a string).
# @note $band->Unit(undef) sets the unit value to an empty string.
# @return the unit (a string).
# @since version 1.9 of the bindings.

## @ignore GetScale
## @ignore SetScale
## @ignore GetOffset
## @ignore SetOffset

## @method ScaleAndOffset($scale, $offset)
# Scale and offset are used to transform raw pixel values into the
# units returned by GetUnits(). The conversion function is:
# \code
# Units value = (raw value * scale) + offset
# \endcode
# @return a list ($scale, $offset), the values are undefined if they
# are not set.
# @since version 1.9 of the bindings.

## @method ComputeRasterMinMax($approx_ok = 0)
# @return arrayref MinMax = [min, max]

## @method ComputeBandStats($samplestep = 1)
# @param samplestep the row increment in computing the statistics.
# @note Returns uncorrected sample standard deviation.
#
# See also Geo::GDAL::Band::ComputeStatistics.
# @return a list (mean, stddev).

## @method $GetMinimum()
# @note Call Geo::GDAL::Band::ComputeStatistics before calling
# GetMinimum to make sure the value is computed.
#
# @return statistical minimum of the band or undef if statistics are
# not kept or computed in scalar context. In list context returns the
# minimum value or a (kind of) minimum value supported by the data
# type and a boolean value, which indicates which is the case (true is
# first, false is second).

## @method $GetMaximum()
# @note Call Geo::GDAL::Band::ComputeStatistics before calling
# GetMaximum to make sure the value is computed.
#
# @return statistical minimum of the band or undef if statistics are
# not kept or computed in scalar context. In list context returns the
# maximum value or a (kind of) maximum value supported by the data
# type and a boolean value, which indicates which is the case (true is
# first, false is second).

## @method @ComputeStatistics($approx_ok, $progress = undef, $progress_data = undef)
# @param approx_ok Whether it is allowed to compute the statistics
# based on overviews or similar.
# @note Returns uncorrected sample standard deviation.
#
# See also Geo::GDAL::Band::ComputeBandStats.
# @return a list ($min, $max, $mean, $stddev).

## @method @GetStatistics($approx_ok, $force)
# @param approx_ok Whether it is allowed to compute the statistics
# based on overviews or similar.
# @param force Whether to force scanning of the whole raster.
# @note Uses Geo::GDAL::Band::ComputeStatistics internally.
#
# @return a list ($min, $max, $mean, $stddev).

## @method SetStatistics($min, $max, $mean, $stddev)
# Save the statistics of the band if possible (the format can save
# arbitrary metadata).
# @param min
# @param max
# @param mean
# @param stddev

## @method $GetOverviewCount()
# @return the number of overviews available of the band.

## @method Geo::GDAL::Band GetOverview($index)
# @param index 0..GetOverviewCount-1
# @return a Geo::GDAL::Band object, which represents the internal
# overview band, or undef.  if the index is out of bounds.

## @method HasArbitraryOverviews()
# @return true or false.

## @method $Checksum($xoff = 0, $yoff = 0, $xsize = undef, $ysize = undef)
# Computes a checksum from the raster or a part of it.
# @param xoff
# @param yoff
# @param xsize
# @param ysize
# @return the checksum.

## @method Fill($real_part, $imag_part = 0.0)
# Fill the band with a constant value.
# @param real_part Real component of fill value.
# @param imag_part Imaginary component of fill value.
#

## @method WriteTile($data, $xoff = 0, $yoff = 0)
# @param data A two-dimensional Perl array, organizes as data->[y][x], y =
# 0..height-1, x = 0..width-1.
# @param xoff
# @param yoff
#

## @method \@ReadTile($xoff = 0, $yoff = 0, $xsize = <width>, $ysize = <height>)
#
# Usage example (print the data from a band):
# \code
# print "@$_\n" for ( @{ $band->ReadTile() } );
# \endcode
# Another usage example (process the data of a large dataset that has one band):
# \code
# my($W,$H) = $dataset->Band(1)->Size();
# my($xoff,$yoff,$w,$h) = (0,0,200,200);
# while (1) {
# .    if ($xoff >= $W) {
# .        $xoff = 0;
# .        $yoff += $h;
# .        last if $yoff >= $H;
# .    }
# .    my $data = $dataset->Band(1)->ReadTile($xoff,$yoff,min($W-$xoff,$w),min($H-$yoff,$h));
# .    # add your data processing code here
# .    $dataset->Band(1)->WriteTile($data,$xoff,$yoff);
# .    $xoff += $w;
# }
#
# sub min {
# .    return $_[0] < $_[1] ? $_[0] : $_[1];
# }
# \endcode
# @param xoff
# @param yoff
# @param xsize
# @param ysize
# @return a two-dimensional Perl array, organizes as data->[y][x], y =
# 0..height-1, x = 0..width-1.

## @method WriteRaster(%params)
# Write data into the band.
#
# @param params named parameters. These are
# - \a XOff x offset (pixel coordinates) (default is 0)
# - \a YOff y offset (pixel coordinates) (default is 0)
# - \a XSize width of the area to write (default is the width of the band)
# - \a YSize height of the area to write (default is the height of the band)
# - \a Buf a buffer containing the data. Create the buffer with \a pack function of Perl. See Geo::GDAL::Band::PackCharacter.
# - \a BufXSize (default is undef, i.e., the same as XSize)
# - \a BufYSize (default is undef, i.e., the same as YSize)
# - \a BufType data type of the buffer (default is the data type of the band)
# - \a BufPixelSpace (default is 0)
# - \a BufLineSpace (default is 0)
#
# If the parameters are given as a list the order is as above.
# <a href="http://www.gdal.org/classGDALDataset.html">Entry in GDAL docs (method RasterIO)</a>

## @method $ReadRaster(%params)
# Read data from the band.
#
# @param params named parameters. These are
# - \a XOff x offset (pixel coordinates) (default is 0)
# - \a YOff y offset (pixel coordinates) (default is 0)
# - \a XSize width of the area to read (default is the width of the band)
# - \a YSize height of the area to read (default is the height of the band)
# - \a BufXSize (default is undef, i.e., the same as XSize)
# - \a BufYSize (default is undef, i.e., the same as YSize)
# - \a BufType data type of the buffer (default is the data type of the band)
# - \a BufPixelSpace (default is 0)
# - \a BufLineSpace (default is 0)
# - \a ResampleAlg one of Geo::GDAL::RIOResamplingTypes (default is 'NearestNeighbour'),
# - \a Progress reference to a progress function (default is undef)
# - \a ProgressData (default is undef)
#
# If the parameters are given as a list the order is as above.
# <a href="http://www.gdal.org/classGDALDataset.html">Entry in GDAL docs (method RasterIO)</a>
# @return a buffer, open the buffer with \a unpack function of Perl. See Geo::GDAL::Band::PackCharacter.

## @method @GetHistogram(%parameters)
# Compute histogram from the raster.
# @param parameters Named parameters:
# - \a Min the lower bound, default is -0.5
# - \a Max the upper bound, default is 255.5
# - \a Buckets the number of buckets in the histogram, default is 256
# - \a IncludeOutOfRange whether to use the first and last values in the returned list
# for out of range values, default is false;
# the bucket size is (Max-Min) / Buckets if this is false and
# (Max-Min) / (Buckets-2) if this is true
# - \a ApproxOK if histogram can be computed from overviews, default is false
# - \a Progress an optional progress function, the default is undef
# - \a ProgressData data for the progress function, the default is undef
# @return a list which contains the count of values in each bucket

## @method @GetDefaultHistogram($force = 1, subref progress = undef, $progress_data = undef)
# @param force true to force the computation
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data)
# @param progress_data [optional]
# @return a list: ($min, $max, arrayref histogram).

## @method @SetDefaultHistogram($min, $max, $histogram)
# @param min
# @param max
# @param histogram reference to an array containing the histogram
#

## @method FlushCache()
# Write cached data to disk. There is usually no need to call this
# method.

## @method Geo::GDAL::ColorTable ColorTable($ColorTable)
# Get or set the color table of this band.
# @param ColorTable [optional] a Geo::GDAL::ColorTable object
# @return a new Geo::GDAL::ColorTable object in a non-void context.

## @ignore GetRasterColorTable
## @ignore SetRasterColorTable

## @method Geo::GDAL::ColorTable GetColorTable()
# @note a.k.a. GetRasterColorTable, see also ColorTable
# @return a color table object.

## @method SetColorTable($ColorTable)
# @note a.k.a. SetRasterColorTable, see also ColorTable
# @param ColorTable A color table object.
#

## @cmethod @MaskFlags
# @return the list of mask flags. These are
# - \a AllValid: There are no invalid pixels, all mask values will be 255.
# When used this will normally be the only flag set.
# - \a PerDataset: The mask band is shared between all bands on the dataset.
# - \a Alpha: The mask band is actually an alpha band and may have values
# other than 0 and 255.
# - \a NoData: Indicates the mask is actually being generated from nodata values.
# (mutually exclusive of Alpha).

## @method CreateMaskBand(@flags)
# @note May invalidate any previous mask band obtained with Geo::GDAL::Band::GetMaskBand.
#
# @param flags one or more mask flags. The flags are Geo::GDAL::Band::MaskFlags.

## @method Geo::GDAL::Band GetMaskBand()
# @return the mask band associated with this
# band.

## @method @GetMaskFlags()
# @return th mask flags of the mask band associated with this
# band. The flags are Geo::GDAL::Band::MaskFlags.

## @ignore GetRasterCategoryNames
## @ignore SetRasterCategoryNames
## @ignore GetCategoryNames
## @ignore SetCategoryNames

## @method @CategoryNames(@names)
# @param names [optional]
# @return

## @ignore SetDefaultRAT
## @ignore GetDefaultRAT

## @method Geo::GDAL::RasterAttributeTable AttributeTable($AttributeTable)
# @param AttributeTable [optional] A Geo::GDAL::RasterAttributeTable object.
# @return a new Geo::GDAL::RasterAttributeTable object, whose data is
# contained within the band.

## @ignore ContourGenerate

## @method Geo::OGR::Layer Contours($DataSource, hashref LayerConstructor, $ContourInterval, $ContourBase, arrayref FixedLevels, $NoDataValue, $IDField, $ElevField, subref Progress, $ProgressData)
# Generate contours for this raster band. This method can also be used with named parameters.
# @note This method is a wrapper for ContourGenerate.
#
# An example:
# \code
# use Geo::GDAL;
# $dem = Geo::GDAL::Open('dem.gtiff');
# $contours = $dem->Band->Contours(ContourInterval => 10, ElevField => 'z');
# $n = $contours->GetFeatureCount;
# \endcode
#
# @param DataSource a Geo::OGR::DataSource object, default is a Memory data source
# @param LayerConstructor data for Geo::OGR::DataSource::CreateLayer, default is {Name => 'contours'}
# @param ContourInterval default is 100
# @param ContourBase default is 0
# @param FixedLevels a reference to a list of fixed contour levels, default is []
# @param NoDataValue default is undef
# @param IDField default is '', i.e., no field (the field is created if this is given)
# @param ElevField default is '', i.e., no field (the field is created if this is given)
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data)
# @param progress_data [optional]
# @return

## @method FillNodata($mask, $max_search_dist, $smoothing_iterations, $options, subref progress, $progress_data)
# Interpolate values for pixels in this raster. The pixels to fill
# should be marked in the mask band with zero.
# @note This is a wrapper for Geo::GDAL::FillNodata.
#
# @param mask [optional] a mask band indicating pixels to be interpolated (zero valued) (default is to get it with Geo::GDAL::Band::GetMaskBand).
# @param max_search_dist [optional] the maximum number of pixels to
# search in all directions to find values to interpolate from (default is 10).
# @param smoothing_iterations [optional] the number of 3x3 smoothing filter passes to run (0 or more) (default is 0).
# @param options [optional] A reference to a hash. No options have been defined so far for this algorithm (default is {}).
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data) (default is undef).
# @param progress_data [optional] (default is undef).
#
# <a href="http://www.gdal.org/gdal__alg_8h.html">Documentation for GDAL algorithms</a>

## @method RegenerateOverviews(arrayref overviews, $resampling, subref progress, $progress_data)
# @todo This is not yet available
#
# @param overviews a list of Geo::GDAL::Band objects for the overviews.
# @param resampling [optional] the resampling method (one of Geo::GDAL::RIOResamplingTypes) (default is Average).
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data)
# @param progress_data [optional]

## @method RegenerateOverview(Geo::GDAL::Band overview, $resampling, subref progress, $progress_data)
# @param overview a Geo::GDAL::Band object for the overview.
# @param resampling [optional] the resampling method (one of Geo::GDAL::RIOResamplingTypes) (default is Average).
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data)
# @param progress_data [optional]




## @class Geo::GDAL::ColorTable
# @brief A color table in a raster band.
# @isa ( Geo::GDAL::MajorObject Geo::GDAL )

## @cmethod Geo::GDAL::ColorTable new($GDALPaletteInterp = 'RGB')
#
# Usage:
# \code
# $ct = Geo::GDAL::ColorTable->new(...arguments...);
# \endcode
# @return a new Geo::GDAL::ColorTable object

## @method Geo::GDAL::ColorTable Clone()
# @return a new Geo::GDAL::ColorTable object

## @method $GetPaletteInterpretation()
# @return paletter interpretation (string)

## @method $GetCount()
# @return scalar (count of color entries as int)

## @method @ColorTable(@colortable)
# Get or set the table of color entries.
# @param colortable [optional]
# @return a table of color entries (a list of lists) in a non void context

## @method @ColorEntries(@color_entries)
# Get or set the table of color entries.
# @deprecated use Geo::GDAL::ColorTable::ColorTable
#
# @param color_entries [optional]
# @return a table of color entries (a list of lists) in a non void context

## @method @ColorEntry($i, @color)
# Get or set a color entry.
# @param i
# @param color [optional]
# @return a color entry

## @method @GetColorEntry($i)
# @param i
# @return array ColorEntry = ($c1, $c2, $c3, $c4)

## @method @GetColorEntryAsRGB($i)
# @param i
# @return array ColorEntry = ($r, $g, $b, $alpha)

## @method SetColorEntry($index, @ColorEntry)
# @param index
# @param ColorEntry a list or a reference to an array
#

## @method CreateColorRamp($start_index, arrayref start_color, $end_index, arrayref end_color)
# @param start_index
# @param start_color
# @param end_index
# @param end_color
#




## @class Geo::GDAL::RasterAttributeTable
# @brief An attribute table in a raster band.
# @isa = ( Geo::GDAL::MajorObject Geo::GDAL )

## @cmethod Geo::GDAL::RasterAttributeTable new()
# @return a new Geo::GDAL::RasterAttributeTable object

## @cmethod @FieldTypes()
# @return

## @cmethod @FieldUsages()
# @return

## @method Geo::GDAL::RasterAttributeTable Clone()
# @return a new Geo::GDAL::RasterAttributeTable object

## @method SetRowCount($count)
# @param count
#

## @method $GetRowCount()

## @method %Columns(%columns)
# A get/set method for the columns of the RAT
# @param columns optional, a the keys are column names and the values are anonymous
# hashes with keys Type and Usage
# @return a hash similar to the optional input parameter

## @method CreateColumn($name, $type, $usage)
# @param name
# @param type one of FieldTypes
# @param usage one of FieldUsages

## @method $GetColumnCount()
# @return

## @method $GetNameOfCol($column)
# @param column
# @return

## @method $GetUsageOfCol($column)
# @param column
# @return

## @method $GetTypeOfCol($column)
# @param column
# @return

## @method $GetColOfUsage($usage)
# @param usage
# @return

## @method $GetRowOfValue($value)
# @param value a pixel value
# @return row index or -1

## @method $Value($row, $column, $value)
# @param row
# @param column
# @param value [optional]
# @return

## @method $GetValueAsString($row, $column)
# @param row
# @param column
# @return

## @method $GetValueAsInt($row, $column)
# @param row
# @param column
# @return

## @method $GetValueAsDouble($row, $column)
# @param row
# @param column
# @return

## @method SetValueAsString($row, $column, $value)
# @param row
# @param column
# @param value
#

## @method SetValueAsInt($row, $column, $value)
# @param row
# @param column
# @param value
#

## @method SetValueAsDouble($row, $column, $value)
# @param row
# @param column
# @param value
#

## @ignore GetLinearBinning
## @ignore SetLinearBinning

## @method LinearBinning($Row0MinIn, $BinSizeIn)
# @param Row0MinIn [optional] the lower bound (pixel value) of the first category.
# @param BinSizeIn [optional] the width of each category (in pixel value units).
# @return ($Row0MinIn, $BinSizeIn) or an empty list if LinearBinning is not set.




## @class Geo::GDAL::Transformer
# @brief
#
# This class is not yet documented for the GDAL Perl bindings.
# @todo Test and document.




## @class Geo::GDAL::VSIF
# @brief A GDAL virtual file system.
# @isa = ( Geo::GDAL )

## @cmethod Geo::GDAL::VSIF Open($filename, $mode)
# @param filename Name of the file to open. For example "/vsimem/x".
# @param mode Access mode. 'r', 'r+', 'w', etc.
# @return A file handle on success.

## @method Close()

## @method $Read($count)
# @param count The number of bytes to read from the file.
# @return A byte string.

## @method Write($scalar)
# @param scalar The byte string to write to the file.
# @return Number of bytes written into the file.

## @method Seek($offset, $whence)

## @method $Tell()

## @method Truncate($new_size)

## @cmethod @ReadDir($dir)
# @return Contents of a directory in an anonymous array or as a list.

## @cmethod $ReadDirRecursive($dir)
# @return Contents of a directory tree in an anonymous array.

## @cmethod @Stat($filename)
# @return ($filemode, $filesize). filemode is f for a plain file, d
# for a directory, l for a symbolic link, p for a named pipe (FIFO), S
# for a socket, b for a block special file, and c for a character
# special file.

## @cmethod Unlink($filename)
# @param filename The file to delete.
# @return 0 on success and -1 on an error.

## @ignore Mkdir

## @cmethod Mkdir($path, $mode)
# Make a directory.
# @note The name of this method is VSIMkdir in GDAL.
#

## @cmethod Rmdir($path)
# Remove a directory.
# @note The name of this method is VSIRmdir in GDAL.
#

## @cmethod Rename($old, $new)
# Rename a file.
# @note The name of this method is VSIRename in GDAL.
#




## @class Geo::GDAL::GeoTransform
# @brief An array of affine transformation coefficients.
#
# The geo transformation has the form
# \code
# x = a + column * b + row * c
# y = d + column * e + row * f
# \endcode
# where<br/>
# (column,row) is the location in pixel coordinates<br/>
# (x,y) is the location in projection coordinates<br/>
# or vice versa.
# A Geo::GDAL::GeoTransform object is a reference to an anonymous array.
# @isa = ( Geo::GDAL )

## @cmethod new(@coeffs)
# @return a new Geo::GDAL::GeoTransform object.

## @method FromGCPs(@GCPs, $ApproxOK)
# Compute transformation coefficients from a list of Geo::GDAL::GCP
# objects
# @param GCPs A list of Geo::GDAL::GCP objects.
# @param ApproxOK [optional] Minimize the error in the coefficient (integer, default is true).
# @return a new Geo::GDAL::GeoTransform object.

## @method Apply(array reference x, array reference y)
# @return a list (x, y), where x and y are references to arrays of
# transformed coordinates.

## @method Inv
# @return a new Geo::GDAL::GeoTransform object, which is the inverse
# of this one (in void context changes this object).
