Inheritance diagram for Geo::GDAL::Dataset:
Public Class Methods | |
Geo::GDAL::Dataset | Open (scalar name, scalar access='ReadOnly') |
Geo::GDAL::Dataset | OpenShared (scalar name, scalar access='ReadOnly') |
Public Object Methods | |
list | GetFileList () |
list | Size () |
Geo::GDAL::Driver | GetDriver () |
Geo::GDAL::Band | Band (scalar index) |
list | Bands () |
scalar | Projection (scalar projection) |
scalar | GetProjection () |
scalar | SetProjection (scalar proj) |
list | GeoTransform (list geo_transform) |
listref | GetGeoTransform () |
SetGeoTransform (listref GeoTransform) | |
BuildOverviews (scalar resampling, listref overviews, scalar callback, scalar callback_data) | |
list | GCPs (list GCPs, scalar GCPProjection) |
scalar | GetGCPCount () |
scalar | GetGCPProjection () |
listref | GetGCPs () |
SetGCPs (listref GCPs, scalar GCPProjection) | |
FlushCache () | |
AddBand (scalar datatype= 'Byte', hashref options=0) | |
WriteRaster (scalar xoff, scalar yoff, scalar xsize, scalar ysize, scalar buf, scalar buf_xsize=undef, scalar buf_ysize=undef, scalar buf_type=undef, listref band_list=undef) | |
scalar | ReadRaster (scalar xoff, scalar yoff, scalar xsize, scalar ysize, scalar buf_xsize=undef, scalar buf_ysize=undef, scalar buf_type=undef, listref band_list=undef) |
CreateMaskBand () | |
Public Attributes | |
RasterXSize | |
RasterYSize | |
RasterCount |
Geo::GDAL::Dataset::AddBand | ( | scalar | datatype = 'Byte' , |
|
hashref | options = 0 | |||
) |
Add a new band to the dataset. The driver must support the action.
datatype | Data type string. The data type must be supported by the driver of this dataset. GDAL raster data types are Byte UInt16 Int16 UInt32 Int32 Float32 Float64 CInt16 CInt32 CFloat32 CFloat64. | |
options | A reference to a hash of format specific key=>value options. |
Geo::GDAL::Band Geo::GDAL::Dataset::Band | ( | scalar | index | ) |
Create a band object for the band within the dataset.
index | 1...RasterCount |
list Geo::GDAL::Dataset::Bands | ( | ) |
Geo::GDAL::Dataset::BuildOverviews | ( | scalar | resampling, | |
listref | overviews, | |||
scalar | callback, | |||
scalar | callback_data | |||
) |
resampling | Either 'NEAREST', 'AVERAGE', or 'AVERAGE_MAGPHASE'. | |
overviews | The list of overview decimation factors to build. For example [2,4,8]. | |
callback | [optional] a reference to a subroutine, which will be called with parameters (number progress, string msg, callback_data) | |
callback_data | [optional] |
Geo::GDAL::Dataset::CreateMaskBand | ( | ) |
Geo::GDAL::Dataset::FlushCache | ( | ) |
Write cached data to disk. There is usually no need to call this method.
list Geo::GDAL::Dataset::GCPs | ( | list | GCPs, | |
scalar | GCPProjection | |||
) |
Get or set the GCPs and their projection.
GCPs | [optional] a list of Geo::GDAL::GCP objects | |
GCPProjection | [optional] Projection string. |
list Geo::GDAL::Dataset::GeoTransform | ( | list | geo_transform | ) |
Transformation from pixel coordinates (x,y) to projection coordinates (Xp, Yp)
Xp = geo_transform[0] + x*geo_transform[1] + y*geo_transform[2] Yp = geo_transform[3] + x*geo_transform[4] + y*geo_transform[5]
geo_transform | [optional] |
Geo::GDAL::Driver Geo::GDAL::Dataset::GetDriver | ( | ) |
list Geo::GDAL::Dataset::GetFileList | ( | ) |
scalar Geo::GDAL::Dataset::GetGCPCount | ( | ) |
scalar Geo::GDAL::Dataset::GetGCPProjection | ( | ) |
listref Geo::GDAL::Dataset::GetGCPs | ( | ) |
listref Geo::GDAL::Dataset::GetGeoTransform | ( | ) |
scalar Geo::GDAL::Dataset::GetProjection | ( | ) |
Geo::GDAL::Dataset Geo::GDAL::Dataset::Open | ( | scalar | name, | |
scalar | access = 'ReadOnly' | |||
) |
An example:
use Geo::GDAL; $ds = Geo::GDAL::Dataset::Open('/data/dem.tiff', 'Update');
name | ||
access | Either 'ReadOnly' or 'Update'. |
Reimplemented from Geo::GDAL.
Geo::GDAL::Dataset Geo::GDAL::Dataset::OpenShared | ( | scalar | name, | |
scalar | access = 'ReadOnly' | |||
) |
name | ||
access | Either ReadOnly or Update. |
Reimplemented from Geo::GDAL.
scalar Geo::GDAL::Dataset::Projection | ( | scalar | projection | ) |
Get or set the projection.
projection | [optional] as WKT |
scalar Geo::GDAL::Dataset::ReadRaster | ( | scalar | xoff, | |
scalar | yoff, | |||
scalar | xsize, | |||
scalar | ysize, | |||
scalar | buf_xsize = undef , |
|||
scalar | buf_ysize = undef , |
|||
scalar | buf_type = undef , |
|||
listref | band_list = undef | |||
) |
Read a buffer from the raster.
xoff | ||
yoff | ||
xsize | ||
ysize | ||
buf_xsize | ||
buf_ysize | ||
buf_type | ||
band_list |
Geo::GDAL::Dataset::SetGCPs | ( | listref | GCPs, | |
scalar | GCPProjection | |||
) |
GCPs | ||
GCPProjection |
Geo::GDAL::Dataset::SetGeoTransform | ( | listref | GeoTransform | ) |
GeoTransform |
scalar Geo::GDAL::Dataset::SetProjection | ( | scalar | proj | ) |
proj | projection as WKT |
list Geo::GDAL::Dataset::Size | ( | ) |
Geo::GDAL::Dataset::WriteRaster | ( | scalar | xoff, | |
scalar | yoff, | |||
scalar | xsize, | |||
scalar | ysize, | |||
scalar | buf, | |||
scalar | buf_xsize = undef , |
|||
scalar | buf_ysize = undef , |
|||
scalar | buf_type = undef , |
|||
listref | band_list = undef | |||
) |
Write a buffer into the raster. Create the buffer with pack function of Perl. Entry in GDAL docs (method RasterIO)
xoff | ||
yoff | ||
xsize | ||
ysize | ||
buf | ||
buf_xsize | ||
buf_ysize | ||
buf_type | ||
band_list |
scalar (access as $dataset->{RasterCount})
scalar (access as $dataset->{RasterXSize})
scalar (access as $dataset->{RasterYSize})