Geo::GDAL  2.0
Geo::GDAL::Dataset Class Reference

A set of associated raster bands. More...

+ Inheritance diagram for Geo::GDAL::Dataset:
+ Collaboration diagram for Geo::GDAL::Dataset:

Public Member Functions

public method AddBand (scalar datatype= 'Byte', hashref options=0)
 
public Geo::GDAL::Band Band (scalar index)
 
public list Bands ()
 
public method BuildOverviews (scalar resampling, arrayref overviews, subref progress, scalar progress_data)
 
public method CommitTransaction ()
 
public method Domains ()
 
public list GCPs (array GCPs, Geo::OSR::SpatialReference sr)
 
public Geo::GDAL::GeoTransform GeoTransform (Geo::GDAL::GeoTransform scalar geo_transform)
 
public Geo::GDAL::Driver GetDriver ()
 
public list GetFileList ()
 
public scalar GetGCPProjection ()
 
public Geo::GDAL::Dataset Open (scalar name, scalar access='ReadOnly')
 
public Geo::GDAL::Dataset OpenShared (scalar name, scalar access='ReadOnly')
 
public scalar ReadRaster (hash params)
 
public method RollbackTransaction ()
 
public list Size ()
 
public Geo::OSR::SpatialReference SpatialReference (Geo::OSR::SpatialReference sr)
 
public method StartTransaction ()
 
public method WriteRaster (hash params)
 
- Public Member Functions inherited from Geo::GDAL::MajorObject
public scalar Description (scalar description)
 
public method Domains ()
 
public scalar GetDescription ()
 
public hash reference GetMetadata (scalar domain="")
 
public method GetMetadataDomainList ()
 
public hash reference Metadata (hashref metadata=undef, scalar domain= '')
 
public method SetDescription (scalar NewDesc)
 
public method SetMetadata (hashref metadata, scalar domain="")
 
- Public Member Functions inherited from Geo::GDAL
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')
 

Public Attributes

scalar RasterCount
 scalar (access as $dataset->{RasterCount})
 
scalar RasterXSize
 scalar (access as $dataset->{RasterXSize})
 
scalar RasterYSize
 scalar (access as $dataset->{RasterYSize})
 

Detailed Description

A set of associated raster bands.

Definition at line 3062 of file all.pm.

Member Function Documentation

public method Geo::GDAL::Dataset::AddBand ( scalar  datatype = 'Byte',
hashref  options = 0 
)

Add a new band to the dataset. The driver must support the action.

Parameters
datatypeGDAL pixel data type (one of those listed by Geo::GDAL::DataTypes).
optionsreference to a hash of format specific key=>value options.
Code:
click to view
public Geo::GDAL::Band Geo::GDAL::Dataset::Band ( scalar  index)

Create a band object for the band within the dataset.

Note
a.k.a. GetRasterBand
Parameters
index1...RasterCount
Returns
a new Geo::GDAL::Band object
Code:
click to view
public list Geo::GDAL::Dataset::Bands ( )
Returns
a list of new Geo::GDAL::Band objects
Code:
click to view
public method Geo::GDAL::Dataset::BuildOverviews ( scalar  resampling,
arrayref  overviews,
subref  progress,
scalar  progress_data 
)
Parameters
resamplingthe resampling method, one of Geo::GDAL::RIOResamplingTypes.
overviewsThe list of overview decimation factors to build. For example [2,4,8].
progress[optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, progress_data)
progress_data[optional]
Code:
click to view
public method Geo::GDAL::Dataset::CommitTransaction ( )
Code:
click to view
public method Geo::GDAL::Dataset::Domains ( )
Code:
click to view
public list Geo::GDAL::Dataset::GCPs ( array  GCPs,
Geo::OSR::SpatialReference  sr 
)

Get or set the GCPs and their projection.

Parameters
GCPs[optional] a list of Geo::GDAL::GCP objects
sr[optional] the projection of the GCPs.
Returns
a list of Geo::GDAL::GCP objects followed by a Geo::OSR::SpatialReference object.
Code:
click to view

Transformation from pixel coordinates (column,row) to projection coordinates (x,y)

x = geo_transform[0] + column*geo_transform[1] + row*geo_transform[2]
y = geo_transform[3] + column*geo_transform[4] + row*geo_transform[5]
Parameters
geo_transform[optional]
Returns
the geo transform in a non-void context.
Code:
click to view
public Geo::GDAL::Driver Geo::GDAL::Dataset::GetDriver ( )
Returns
a new Geo::GDAL::Driver object
Code:
click to view
public list Geo::GDAL::Dataset::GetFileList ( )
Returns
list of files GDAL believes to be part of this dataset.
Code:
click to view
public scalar Geo::GDAL::Dataset::GetGCPProjection ( )
Returns
projection string.
Code:
click to view
public Geo::GDAL::Dataset Geo::GDAL::Dataset::Open ( scalar  name,
scalar  access = 'ReadOnly' 
)

Class method. An example:

use Geo::GDAL;
$ds = Geo::GDAL::Dataset::Open('/data/dem.tiff', 'Update');
Parameters
name
accessAccess type (one of those listed by Geo::GDAL::AccessTypes).
Returns
a new Geo::GDAL::Dataset object.
Code:
click to view
public Geo::GDAL::Dataset Geo::GDAL::Dataset::OpenShared ( scalar  name,
scalar  access = 'ReadOnly' 
)

Class method.

Parameters
name
accessAccess type (one of those listed by Geo::GDAL::AccessTypes).
Returns
a new Geo::GDAL::Dataset object.
Code:
click to view
public scalar Geo::GDAL::Dataset::ReadRaster ( hash  params)

Read data from the dataset.

Parameters
paramsnamed parameters. These are
  • XOff x offset (pixel coordinates) (default is 0)
  • YOff y offset (pixel coordinates) (default is 0)
  • XSize width of the area to read (default is the width of the dataset)
  • YSize height of the area to read (default is the height of the dataset)
  • BufXSize (default is undef, i.e., the same as XSize)
  • BufYSize (default is undef, i.e., the same as YSize)
  • BufType data type of the buffer (default is the data type of the first band)
  • BandList a reference to an array of band indeces (default is [1])
  • BufPixelSpace (default is 0)
  • BufLineSpace (default is 0)
  • BufBandSpace (default is 0)
  • ResampleAlg one of Geo::GDAL::RIOResamplingTypes (default is 'NearestNeighbour'),
  • Progress reference to a progress function (default is undef)
  • ProgressData (default is undef)

If the parameters are given as a list the order is as above. Entry in GDAL docs (method RasterIO)

Returns
a buffer, open the buffer with unpack function of Perl. See Geo::GDAL::Band::PackCharacter.
Code:
click to view
public method Geo::GDAL::Dataset::RollbackTransaction ( )
Code:
click to view
public list Geo::GDAL::Dataset::Size ( )
Returns
(width, height)
Code:
click to view
public Geo::OSR::SpatialReference Geo::GDAL::Dataset::SpatialReference ( Geo::OSR::SpatialReference  sr)

Get or set the projection of this dataset.

Parameters
sr[optional] a Geo::OSR::SpatialReference object, which replaces the existing projection definition of this dataset.
Returns
a Geo::OSR::SpatialReference object, which represents the projection of this dataset.
Note
Methods GetProjection, SetProjection, and Projection return WKT strings.
Code:
click to view
public method Geo::GDAL::Dataset::StartTransaction ( )
Code:
click to view
public method Geo::GDAL::Dataset::WriteRaster ( hash  params)

Write data into the dataset.

Parameters
paramsnamed parameters. These are
  • XOff x offset (pixel coordinates) (default is 0)
  • YOff y offset (pixel coordinates) (default is 0)
  • XSize width of the area to write (default is the width of the dataset)
  • YSize height of the area to write (default is the height of the dataset)
  • Buf a buffer containing the data. Create the buffer with pack function of Perl. See Geo::GDAL::Band::PackCharacter.
  • BufXSize (default is undef, i.e., the same as XSize)
  • BufYSize (default is undef, i.e., the same as YSize)
  • BufType data type of the buffer (default is the data type of the first band)
  • BandList a reference to an array of band indeces (default is [1])
  • BufPixelSpace (default is 0)
  • BufLineSpace (default is 0)
  • BufBandSpace (default is 0)

If the parameters are given as a list the order is as above. Entry in GDAL docs (method RasterIO)

Code:
click to view

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