Geo::GDAL  2.4
Geo::GDAL Class Reference

GDAL utility functions and a root class for raster classes.
More...

+ Inheritance diagram for Geo::GDAL:

Classes

class  AsyncReader
 Enable asynchronous requests.
More...
 
class  Band
 A raster band.
More...
 
class  ColorTable
 A color table from a raster band or a color table, which can be used for a band.
More...
 
class  Dataset
 A set of associated raster bands or vector layer source.
More...
 
class  Driver
 A driver for a specific dataset format.
More...
 
class  Extent
 A rectangular area in projection coordinates: xmin, ymin, xmax, ymax.

More...
 
class  GCP
 A ground control point for georeferencing rasters.
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
 
More...
 
class  VSIF
 A GDAL virtual file system.
More...
 
class  VSILFILE
 
class  XML
 A simple XML parser
More...
 

Public Member Functions

public method ApplyVerticalShiftGrid ()
 
public method BuildVRT ()
 
public method CPLBinaryToHex ()
 
public method CPLHexToBinary ()
 
public method CreatePansharpenedVRT ()
 
public scalar DataTypeIsComplex (scalar DataType)
 
public list DataTypeValueRange (scalar DataType)
 
public list DataTypes ()
 
public scalar DecToDMS (scalar angle, scalar axis, scalar precision=2)
 
public scalar DecToPackedDMS (scalar dec)
 
public method DontUseExceptions ()
 
public Geo::GDAL::Driver Driver (scalar Name)
 
public list DriverNames ()
 
public list Drivers ()
 
public method EscapeString ()
 
public scalar FindFile (scalar basename)
 
public method FinderClean ()
 
public method GOA2GetAccessToken ()
 
public method GOA2GetAuthorizationURL ()
 
public method GOA2GetRefreshToken ()
 
public method GetActualURL ()
 
public scalar GetCacheMax ()
 
public scalar GetCacheUsed ()
 
public scalar GetConfigOption (scalar key)
 
public scalar GetDataTypeSize (scalar DataType)
 
public method GetErrorCounter ()
 
public method GetFileSystemOptions ()
 
public method GetFileSystemsPrefixes ()
 
public method GetJPEG2000StructureAsString ()
 
public method GetSignedURL ()
 
public Geo::GDAL::Driver IdentifyDriver (scalar path, scalar siblings)
 
public method IdentifyDriverEx ()
 
public method MkdirRecursive ()
 
public Geo::GDAL::Dataset Open (hash params)
 
public Geo::GDAL::Dataset OpenEx (hash params)
 
public list OpenFlags ()
 
public scalar PackCharacter (scalar DataType)
 
public scalar PackedDMSToDec (scalar packed)
 
public method PopFinderLocation ()
 
public method PushFinderLocation (scalar path)
 
public list RIOResamplingTypes ()
 
public list ResamplingTypes ()
 
public method RmdirRecursive ()
 
public method SetCacheMax (scalar Bytes)
 
public method SetConfigOption (scalar key, scalar value)
 
public method UseExceptions ()
 
public method VSICurlClearCache ()
 
public method VSIFEofL ()
 
public method VSIFOpenExL ()
 
public method VSIGetLastErrorMsg ()
 
public method VSIGetLastErrorNo ()
 
public scalar VersionInfo (scalar request= 'VERSION_NUM')
 
public scalar errstr ()
 

Detailed Description

GDAL utility functions and a root class for raster classes.

Geo::GDAL wraps many GDAL utility functions and is as a root class
for all GDAL raster classes. A "raster" is an object, whose core is
a rectagular grid of cells, called a "band" in GDAL. Each cell
contains a numeric value of a specific data type.

Definition at line 14 of file all.dox.

Member Function Documentation

public method Geo::GDAL::ApplyVerticalShiftGrid ( )


Code:
click to view

public method Geo::GDAL::BuildVRT ( )


Code:
click to view

public method Geo::GDAL::CPLBinaryToHex ( )


Code:
click to view

public method Geo::GDAL::CPLHexToBinary ( )


Code:
click to view

public method Geo::GDAL::CreatePansharpenedVRT ( )


Code:
click to view

public scalar Geo::GDAL::DataTypeIsComplex ( scalar  DataType)

Package subroutine.

Parameters
DataTypeA GDAL raster cell data type (one of those listed by Geo::GDAL::DataTypes).
Returns
true if the data type is a complex number.

Code:
click to view

public list Geo::GDAL::DataTypes ( )

Package subroutine.

Returns
a list of GDAL raster cell data types. These are currently:
Byte, CFloat32, CFloat64, CInt16, CInt32, Float32, Float64, Int16, Int32, UInt16, UInt32, and Unknown.

Code:
click to view

public list Geo::GDAL::DataTypeValueRange ( scalar  DataType)

Package subroutine.

Parameters
DataTypeData type (one of those listed by Geo::GDAL::DataTypes).
Note
Some returned values are inaccurate.

Returns
the minimum, maximum range of the data type.

Code:
click to view

public scalar Geo::GDAL::DecToDMS ( scalar  angle,
scalar  axis,
scalar  precision = 2 
)

Package subroutine.
Convert decimal degrees to degrees, minutes, and seconds string

Parameters
angleA number
axisA string specifying latitude or longitude ('Long').
precision
Returns
a string nndnn'nn.nn'"L where n is a number and L is either
N or E

Code:
click to view

public scalar Geo::GDAL::DecToPackedDMS ( scalar  dec)

Package subroutine.

Parameters
decDecimal degrees
Returns
packed DMS, i.e., a number DDDMMMSSS.SS

Code:
click to view

public method Geo::GDAL::DontUseExceptions ( )

Package subroutine.
Do not use the Perl exception mechanism for GDAL messages. Instead
the messages are printed to standard error.

Code:
click to view

public Geo::GDAL::Driver Geo::GDAL::Driver ( scalar  Name)

Package subroutine.
Access a format driver.

Parameters
NameThe short name of the driver. One of
Geo::GDAL::DriverNames or Geo::OGR::DriverNames.
Note
This subroutine is imported into the main namespace if Geo::GDAL
is used with qw/:all/.
Returns
a Geo::GDAL::Driver object.

Code:
click to view

public list Geo::GDAL::DriverNames ( )

Package subroutine.
Available raster format drivers.

<br>perl -MGeo::GDAL -e '@d=Geo::GDAL::DriverNames;print "@d\n"'
<br>


Note
Use Geo::OGR::DriverNames for vector drivers.
Returns
a list of the short names of all available GDAL raster drivers.

Code:
click to view

public list Geo::GDAL::Drivers ( )

Package subroutine.

Note
Use Geo::OGR::Drivers for vector drivers.
Returns
a list of all available GDAL raster drivers.

Code:
click to view

public scalar Geo::GDAL::errstr ( )

Package subroutine.
Clear the error stack and return all generated GDAL error messages in one (possibly multiline) string.

Returns
the chomped error stack joined with newlines.

Code:
click to view

public method Geo::GDAL::EscapeString ( )


Code:
click to view

public method Geo::GDAL::FinderClean ( )

Package subroutine.
Clear the set of support file search paths.

Code:
click to view

public scalar Geo::GDAL::FindFile ( scalar  basename)

Package subroutine.
Search for GDAL support files.

An example:

<br>use Geo::GDAL;
<br>$a = Geo::GDAL::FindFile('pcs.csv');
<br>print STDERR "$a\n";
<br>


Prints (for example):

<br>c:\msys\1.0\local\share\gdal\pcs.csv
<br>



Parameters
basenameThe name of the file to search for. For example
'pcs.csv'.
Returns
the path to the searched file or undef.

Code:
click to view

public method Geo::GDAL::GetActualURL ( )


Code:
click to view

public scalar Geo::GDAL::GetCacheMax ( )

Package subroutine.

Returns
maximum amount of memory (as bytes) for caching within GDAL.

Code:
click to view

public scalar Geo::GDAL::GetCacheUsed ( )

Package subroutine.

Returns
the amount of memory currently used for caching within GDAL.

Code:
click to view

public scalar Geo::GDAL::GetConfigOption ( scalar  key)

Package subroutine.

Parameters
keyA GDAL config option. Consult <a
href="https://trac.osgeo.org/gdal/wiki/ConfigOptions">the GDAL
documentation for available options and their use.
Returns
the value of the GDAL config option.

Code:
click to view

public scalar Geo::GDAL::GetDataTypeSize ( scalar  DataType)

Package subroutine.

Parameters
DataTypeA GDAL raster cell data type (one of those listed by Geo::GDAL::DataTypes).
Returns
the size as the number of bits.

Code:
click to view

public method Geo::GDAL::GetErrorCounter ( )


Code:
click to view

public method Geo::GDAL::GetFileSystemOptions ( )


Code:
click to view

public method Geo::GDAL::GetFileSystemsPrefixes ( )


Code:
click to view

public method Geo::GDAL::GetJPEG2000StructureAsString ( )


Code:
click to view

public method Geo::GDAL::GetSignedURL ( )


Code:
click to view

public method Geo::GDAL::GOA2GetAccessToken ( )


Code:
click to view

public method Geo::GDAL::GOA2GetAuthorizationURL ( )


Code:
click to view

public method Geo::GDAL::GOA2GetRefreshToken ( )


Code:
click to view

public Geo::GDAL::Driver Geo::GDAL::IdentifyDriver ( scalar  path,
scalar  siblings 
)

Package subroutine.

Parameters
patha dataset path.
siblings[optional] A list of names of files that belong to the data format.
Returns
a Geo::GDAL::Driver.

Code:
click to view

public method Geo::GDAL::IdentifyDriverEx ( )


Code:
click to view

public method Geo::GDAL::MkdirRecursive ( )


Code:
click to view

public Geo::GDAL::Dataset Geo::GDAL::Open ( hash  params)

Package subroutine.
Open a dataset.
An example, which opens an existing raster dataset for editing:

<br>use Geo::GDAL qw/:all/;
<br>$ds = Open(Name => 'existing.tiff', Access => 'Update');
<br>


Parameters
paramsNamed parameters:
- Name Dataset string (typically a filename). Default is '.'.
- Access Access type, either 'ReadOnly' or 'Update'. Default is 'ReadOnly'.
- Type Dataset type, either 'Raster', 'Vector', or 'Any'. Default is 'Any'.
- Options A hash of GDAL open options passed to candidate drivers. Default is {}.
- Files A list of names of files that are auxiliary to the main file. Default is [].

Note
This subroutine is imported into the main namespace if Geo::GDAL
is use'd with qw/:all/.

Some datasets / dataset strings do not explicitly imply the
dataset type (for example a PostGIS database). If the type is not
specified in such a case the returned dataset may be of either type.

Returns
a new Geo::GDAL::Dataset object if success.

Code:
click to view

public Geo::GDAL::Dataset Geo::GDAL::OpenEx ( hash  params)

Package subroutine.
The generic dataset open method, used internally by all Open and OpenShared methods.

Parameters
paramsNamed parameters:
- Name The name of the data set or source to open. (Default is '.')
- Flags A list of access mode flags. Available flags are listed by Geo::GDAL::OpenFlags(). (Default is [])
- Drivers A list of short names of drivers that may be used. Empty list means all. (Default is [])
- Options A hash of GDAL open options passed to candidate drivers. (Default is {})
- Files A list of names of files that are auxiliary to the main file. (Default is [])

An example
<br>$ds = Geo::GDAL::OpenEx(Name => 'existing.tiff', Flags => [qw/RASTER UPDATE/]);
<br>

Returns
a new Geo::GDAL::Dataset object.

Code:
click to view

public list Geo::GDAL::OpenFlags ( )

Package subroutine.

Returns
a list of GDAL data set open modes. These are currently:
ALL, GNM, RASTER, READONLY, SHARED, UPDATE, VECTOR, and VERBOSE_ERROR.

Code:
click to view

public scalar Geo::GDAL::PackCharacter ( scalar  DataType)

Package subroutine.
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.

Parameters
DataTypeA GDAL raster cell data type, typically from $band->DataType.
Returns
a character which can be used in Perl's pack and unpack.

Code:
click to view

public scalar Geo::GDAL::PackedDMSToDec ( scalar  packed)

Package subroutine.

Parameters
packedDMS as a number DDDMMMSSS.SS
Returns
decimal degrees

Code:
click to view

public method Geo::GDAL::PopFinderLocation ( )

Package subroutine.
Remove the latest addition from the set of support file search
paths. Note that calling this subroutine may remove paths GDAL put
into the finder.

Code:
click to view

public method Geo::GDAL::PushFinderLocation ( scalar  path)

Package subroutine.
Add a path to the set of paths from where GDAL support files are
sought. Note that GDAL puts initially into the finder the current
directory and value of GDAL_DATA environment variable (if it
exists), installation directory (prepended with '/share/gdal' or
'/Resources/gdal'), or '/usr/local/share/gdal'. It is usually only
needed to add paths to the finder if using an alternate set of data
files or a non-installed GDAL is used (as in testing).

Code:
click to view

public list Geo::GDAL::ResamplingTypes ( )

Package subroutine.

Returns
a list of GDAL resampling methods. These are currently:
Average, Bilinear, Cubic, CubicSpline, Lanczos, Max, Med, Min, Mode, NearestNeighbour, Q1, and Q3.

Code:
click to view

public list Geo::GDAL::RIOResamplingTypes ( )

Package subroutine.

Returns
a list of GDAL raster IO resampling methods. These are currently:
Average, Bilinear, Cubic, CubicSpline, Gauss, Lanczos, Mode, and NearestNeighbour.

Code:
click to view

public method Geo::GDAL::RmdirRecursive ( )


Code:
click to view

public method Geo::GDAL::SetCacheMax ( scalar  Bytes)

Package subroutine.

Parameters
BytesNew maximum amount of memory for caching within GDAL.

Code:
click to view

public method Geo::GDAL::SetConfigOption ( scalar  key,
scalar  value 
)

Package subroutine.

Parameters
keyA GDAL config option. Consult <a
href="https://trac.osgeo.org/gdal/wiki/ConfigOptions">the GDAL
documentation for available options and their use.
valueA value for the option, typically 'YES', 'NO',
undef, path, numeric value, or a filename.

Code:
click to view

public method Geo::GDAL::UseExceptions ( )

Package subroutine.
Use the Perl exception mechanism for GDAL messages (failures are
confessed and warnings are warned) and collect the messages
into @Geo::GDAL::error. This is the default.

Code:
click to view

public scalar Geo::GDAL::VersionInfo ( scalar  request = 'VERSION_NUM')

Package subroutine.

Parameters
requestA string specifying the request. Currently either
"VERSION_NUM", "RELEASE_DATE", "RELEASE_NAME", or
"--version". Default is "VERSION_NUM".
Returns
Requested information.

Code:
click to view

public method Geo::GDAL::VSICurlClearCache ( )


Code:
click to view

public method Geo::GDAL::VSIFEofL ( )


Code:
click to view

public method Geo::GDAL::VSIFOpenExL ( )


Code:
click to view

public method Geo::GDAL::VSIGetLastErrorMsg ( )


Code:
click to view

public method Geo::GDAL::VSIGetLastErrorNo ( )


Code:
click to view


The documentation for this class was generated from the following file: