Geo::GDAL
2.0
|
GDAL utility functions and a root class for raster classes. More...
Classes | |
class | AsyncReader |
Enable asynchronous requests. More... | |
class | Band |
A raster band. More... | |
class | ColorTable |
A color table in a raster band. More... | |
class | Dataset |
A set of associated raster bands. More... | |
class | Driver |
A raster format driver. More... | |
class | GCP |
A ground control point for georeferencing images. More... | |
class | GeoTransform |
An array of affine transformation coefficients. More... | |
class | MajorObject |
An object, which holds meta data. More... | |
class | RasterAttributeTable |
An attribute table in a raster band. More... | |
class | Transformer |
This class is not yet documented for the GDAL Perl bindings. More... | |
class | VSIF |
A GDAL virtual file system. More... | |
Public Member Functions | |
public list | AccessTypes () |
public Geo::GDAL::Dataset | AutoCreateWarpedVRT (Geo::GDAL::Dataset src, Geo::OSR::SpatialReference src_srs=undef, Geo::OSR::SpatialReference dst_srs=undef, scalar ResampleAlg='NearestNeighbour', scalar maxerror=0.0) |
public method | CPLBinaryToHex () |
public method | CPLHexToBinary () |
public list | Child (scalar node, scalar i) |
public list | Children (scalar node) |
public method | ComputeMedianCutPCT (Geo::GDAL::Band red, Geo::GDAL::Band green, Geo::GDAL::Band blue, scalar num_colors, scalar colors, subref progress, scalar progress_data) |
public method | ComputeProximity (Geo::GDAL::Band src, Geo::GDAL::Band proximity, hashref options, subref progress, scalar progress_data) |
public scalar | DataTypeIsComplex (scalar DataType) |
public list | DataTypeValueRange (scalar DataType) |
public list | DataTypes () |
public method | Debug () |
public scalar | DecToDMS (scalar angle, scalar axis, scalar precision=2) |
public scalar | DecToPackedDMS (scalar dec) |
public method | DitherRGB2PCT (scalar red, scalar green, scalar blue, scalar target, scalar colors, subref progress, scalar progress_data) |
public method | EscapeString () |
public scalar | FindFile (scalar class, scalar basename) |
public method | FinderClean () |
public method | GOA2GetAccessToken () |
public method | GOA2GetAuthorizationURL () |
public method | GOA2GetRefreshToken () |
public scalar | GetCacheMax () |
public scalar | GetCacheUsed () |
public scalar | GetConfigOption (scalar key, scalar default) |
public scalar | GetDataTypeSize (scalar DataType) |
public Geo::GDAL::Driver | GetDriver (scalar name) |
public list | GetDriverNames () |
public method | GetJPEG2000StructureAsString () |
public Geo::GDAL::Driver | IdentifyDriver (scalar path, scalar siblings) |
public list | NodeData (scalar node) |
public scalar | NodeType (scalar type) |
public list | NodeTypes () |
public Geo::GDAL::Dataset | Open (scalar name, scalar access= 'ReadOnly') |
public Geo::GDAL::Dataset | OpenEx (scalar name, scalar open_flags=0, array reference allowed_drivers=undef, array reference open_options=undef, array reference sibling_files=undef) |
public Geo::GDAL::Dataset | OpenShared (scalar name, scalar access= 'ReadOnly') |
public scalar | PackCharacter (scalar DataType) |
public scalar | PackedDMSToDec (scalar packed) |
public array reference | ParseXMLString (scalar XML) |
public method | Polygonize (Geo::GDAL::Band src, Geo::GDAL::Band mask, Geo::OGR::Layer out, scalar PixValField, hashref options, subref progress, scalar progress_data) |
public method | PopFinderLocation () |
public method | PushFinderLocation (scalar path) |
public list | RIOResamplingTypes () |
public method | RasterizeLayer (Geo::GDAL::Dataset ds, arrayref bands, Geo::OGR::Layer layer, scalar transformer, scalar arg, arrayref burn_values, hashref options, subref progress, scalar progress_data) |
public method | ReprojectImage (scalar src_ds, scalar dst_ds, scalar src_wkt=undef, scalar dst_wkt=undef, scalar ResampleAlg='NearestNeighbour', scalar WarpMemoryLimit=0, scalar maxerror=0.0, subref progress, scalar progress_data) |
public list | ResamplingTypes () |
public scalar | SerializeXMLTree (arrayref XMLTree) |
public method | SetCacheMax (scalar Bytes) |
public method | SetConfigOption (scalar key, scalar value) |
public method | SieveFilter (Geo::GDAL::Band src, Geo::GDAL::Band mask, Geo::GDAL::Band dst, scalar threshold, scalar connectedness, hashref options, subref progress, scalar progress_data) |
public scalar | VersionInfo (scalar request= 'VERSION_NUM') |
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
public list Geo::GDAL::AccessTypes | ( | ) |
Class method.
public Geo::GDAL::Dataset Geo::GDAL::AutoCreateWarpedVRT | ( | Geo::GDAL::Dataset | src, |
Geo::OSR::SpatialReference | src_srs = undef , |
||
Geo::OSR::SpatialReference | dst_srs = undef , |
||
scalar | ResampleAlg = 'NearestNeighbour' , |
||
scalar | maxerror = 0.0 |
||
) |
Class method.
src | |
src_srs | source projection. |
dst_srs | destination projection. |
ResampleAlg | one of Geo::GDAL::ResamplingTypes(). |
maxerror |
public list Geo::GDAL::Child | ( | scalar | node, |
scalar | i | ||
) |
Class method.
node | |
i | 0 .. number of children - 1 |
public list Geo::GDAL::Children | ( | scalar | node | ) |
Class method.
node |
public method Geo::GDAL::ComputeMedianCutPCT | ( | Geo::GDAL::Band | red, |
Geo::GDAL::Band | green, | ||
Geo::GDAL::Band | blue, | ||
scalar | num_colors, | ||
scalar | colors, | ||
subref | progress, | ||
scalar | progress_data | ||
) |
Class method. Compute an "optimal" color table for a three band image.
red | a Geo::GDAL::Band object |
green | a Geo::GDAL::Band object |
blue | a Geo::GDAL::Band object |
num_colors | the desired number of colors |
colors | an empty Geo::GDAL::ColorTable object |
progress | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, progress_data) |
progress_data | [optional] |
Documentation for GDAL algorithms
public method Geo::GDAL::ComputeProximity | ( | Geo::GDAL::Band | src, |
Geo::GDAL::Band | proximity, | ||
hashref | options, | ||
subref | progress, | ||
scalar | progress_data | ||
) |
Class method.
src | The raster from which the proximities are computed from. |
proximity | The raster to which the proximities are computed to. |
options | Options. Supported key, value pairs are
|
progress | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, progress_data) |
progress_data | [optional] |
Documentation for GDAL algorithms
public method Geo::GDAL::CPLBinaryToHex | ( | ) |
public method Geo::GDAL::CPLHexToBinary | ( | ) |
public scalar Geo::GDAL::DataTypeIsComplex | ( | scalar | DataType | ) |
Class method.
DataType | A GDAL pixel data type (one of those listed by Geo::GDAL::DataTypes). |
public list Geo::GDAL::DataTypes | ( | ) |
Class method.
public list Geo::GDAL::DataTypeValueRange | ( | scalar | DataType | ) |
Class method.
DataType | Data type (one of those listed by Geo::GDAL::DataTypes). |
public method Geo::GDAL::Debug | ( | ) |
public scalar Geo::GDAL::DecToDMS | ( | scalar | angle, |
scalar | axis, | ||
scalar | precision = 2 |
||
) |
Class method. Convert decimal degrees to degrees, minutes, and seconds string
angle | A number |
axis | A string specifying latitude or longitude ('Long'). |
precision |
public scalar Geo::GDAL::DecToPackedDMS | ( | scalar | dec | ) |
Class method.
dec | Decimal degrees |
public method Geo::GDAL::DitherRGB2PCT | ( | scalar | red, |
scalar | green, | ||
scalar | blue, | ||
scalar | target, | ||
scalar | colors, | ||
subref | progress, | ||
scalar | progress_data | ||
) |
Class method. Dither a three band image into one band using a color table.
red | a Geo::GDAL::Band object |
green | a Geo::GDAL::Band object |
blue | a Geo::GDAL::Band object |
target | a Geo::GDAL::Band object |
colors | a Geo::GDAL::ColorTable object |
progress | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, progress_data) |
progress_data | [optional] |
Documentation for GDAL algorithms
public method Geo::GDAL::EscapeString | ( | ) |
public method Geo::GDAL::FinderClean | ( | ) |
Class method. Clear the set of support file search paths.
public scalar Geo::GDAL::FindFile | ( | scalar | class, |
scalar | basename | ||
) |
Class method. Search for GDAL support files.
An example:
Prints (for example):
class | The class of files to search for. For example 'gdal'. |
basename | The basename of the file to search for. For example 'pcs.csv'. |
public scalar Geo::GDAL::GetCacheMax | ( | ) |
Class method.
public scalar Geo::GDAL::GetCacheUsed | ( | ) |
Class method.
public scalar Geo::GDAL::GetConfigOption | ( | scalar | key, |
scalar | default | ||
) |
public scalar Geo::GDAL::GetDataTypeSize | ( | scalar | DataType | ) |
Class method.
DataType | A GDAL pixel data type (one of those listed by Geo::GDAL::DataTypes). |
public Geo::GDAL::Driver Geo::GDAL::GetDriver | ( | scalar | name | ) |
Class method. Create a driver object for the internal GDAL driver.
name | the (short) name of the driver. |
public list Geo::GDAL::GetDriverNames | ( | ) |
Class method.
public method Geo::GDAL::GetJPEG2000StructureAsString | ( | ) |
public method Geo::GDAL::GOA2GetAccessToken | ( | ) |
public method Geo::GDAL::GOA2GetAuthorizationURL | ( | ) |
public method Geo::GDAL::GOA2GetRefreshToken | ( | ) |
public Geo::GDAL::Driver Geo::GDAL::IdentifyDriver | ( | scalar | path, |
scalar | siblings | ||
) |
Class method.
path | a dataset path. |
siblings | [optional] A list of names of files in the directory specified by the path. |
public list Geo::GDAL::NodeData | ( | scalar | node | ) |
Class method.
node |
public scalar Geo::GDAL::NodeType | ( | scalar | type | ) |
Class method. Convert between integer and string expressions of CPLXMLNodeTypes
type | (as integer) |
public list Geo::GDAL::NodeTypes | ( | ) |
Class method.
public Geo::GDAL::Dataset Geo::GDAL::Open | ( | scalar | name, |
scalar | access = 'ReadOnly' |
||
) |
Class method. An example
name | |
access | Access type (one of those listed by Geo::GDAL::AccessTypes). |
public Geo::GDAL::Dataset Geo::GDAL::OpenEx | ( | scalar | name, |
scalar | open_flags = 0 , |
||
array reference | allowed_drivers = undef , |
||
array reference | open_options = undef , |
||
array reference | sibling_files = undef |
||
) |
public Geo::GDAL::Dataset Geo::GDAL::OpenShared | ( | scalar | name, |
scalar | access = 'ReadOnly' |
||
) |
Class method.
name | |
access | Access type (one of those listed by Geo::GDAL::AccessTypes). |
public scalar Geo::GDAL::PackCharacter | ( | scalar | DataType | ) |
Class method. 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.
DataType | A GDAL pixel data type (typically from $band->{DataType}). |
public scalar Geo::GDAL::PackedDMSToDec | ( | scalar | packed | ) |
Class method.
packed | DMS as a number DDDMMMSSS.SS |
public array reference Geo::GDAL::ParseXMLString | ( | scalar | XML | ) |
Class method. 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.
XML |
Example:
public method Geo::GDAL::Polygonize | ( | Geo::GDAL::Band | src, |
Geo::GDAL::Band | mask, | ||
Geo::OGR::Layer | out, | ||
scalar | PixValField, | ||
hashref | options, | ||
subref | progress, | ||
scalar | progress_data | ||
) |
Class method.
src | |
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. |
out | |
PixValField | The index (or name) of the field in output layer into which the pixel value of the polygon should be written. |
options | Not used. |
progress | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, progress_data) |
progress_data | [optional] |
Documentation for GDAL algorithms
public method Geo::GDAL::PopFinderLocation | ( | ) |
Class method. Remove the latest addition from the set of support file search paths.
public method Geo::GDAL::PushFinderLocation | ( | scalar | path | ) |
Class method. Add a path to the set of paths from where GDAL support files are sought.
public method Geo::GDAL::RasterizeLayer | ( | Geo::GDAL::Dataset | ds, |
arrayref | bands, | ||
Geo::OGR::Layer | layer, | ||
scalar | transformer, | ||
scalar | arg, | ||
arrayref | burn_values, | ||
hashref | options, | ||
subref | progress, | ||
scalar | progress_data | ||
) |
Class method.
ds | |
bands | A reference to a list of bands to be updated. |
layer | |
transformer | Not supported, must be undef. |
arg | Transformer argument, must be undef. |
burn_values | Values to be used for burning the geometries. One for each layer. |
options | Not used. |
progress | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, progress_data) |
progress_data | [optional] |
Documentation for GDAL algorithms
public method Geo::GDAL::ReprojectImage | ( | scalar | src_ds, |
scalar | dst_ds, | ||
scalar | src_wkt = undef , |
||
scalar | dst_wkt = undef , |
||
scalar | ResampleAlg = 'NearestNeighbour' , |
||
scalar | WarpMemoryLimit = 0 , |
||
scalar | maxerror = 0.0 , |
||
subref | progress, | ||
scalar | progress_data | ||
) |
Class method.
src_ds | Source dataset. |
dst_ds | Destination dataset. |
src_wkt | Source projection as a WKT. |
dst_wkt | Destination projection as a WKT. |
ResampleAlg | One of NearestNeighbour Bilinear Cubic or CubicSpline. |
WarpMemoryLimit | The amount of memory allowed for caching. Default is 0, i.e., no limit. |
maxerror | Maximum error measured in input pixels that is allowed in approximating the transformation. Default is 0.0, i.e., exact calculations. |
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. |
progress_data | [optional] |
public list Geo::GDAL::ResamplingTypes | ( | ) |
public list Geo::GDAL::RIOResamplingTypes | ( | ) |
public scalar Geo::GDAL::SerializeXMLTree | ( | arrayref | XMLTree | ) |
Class method.
XMLTree |
public method Geo::GDAL::SetCacheMax | ( | scalar | Bytes | ) |
Class method.
Bytes | New maximum amount of memory for caching within GDAL. |
public method Geo::GDAL::SetConfigOption | ( | scalar | key, |
scalar | value | ||
) |
Class method.
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. |
value | A value for the option, typically 'YES', 'NO', undef, a path, or a filename. |
public method Geo::GDAL::SieveFilter | ( | Geo::GDAL::Band | src, |
Geo::GDAL::Band | mask, | ||
Geo::GDAL::Band | dst, | ||
scalar | threshold, | ||
scalar | connectedness, | ||
hashref | options, | ||
subref | progress, | ||
scalar | progress_data | ||
) |
Class method. Removes small raster polygons.
src | |
mask | |
dst | |
threshold | An integer. |
connectedness | 4 or 8 |
options | Not used. |
progress | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, progress_data) |
progress_data | [optional] |
Documentation for GDAL algorithms
public scalar Geo::GDAL::VersionInfo | ( | scalar | request = 'VERSION_NUM' | ) |
Class method.
request | A string specifying the request. Currently either "VERSION_NUM", "RELEASE_DATE", "RELEASE_NAME", or "--version". Default is "VERSION_NUM". |