.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Geo::GDAL::FFI::Band 3pm" .TH Geo::GDAL::FFI::Band 3pm 2024-05-24 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Geo::GDAL::FFI::Band \- A GDAL raster band .SH SYNOPSIS .IX Header "SYNOPSIS" .SH DESCRIPTION .IX Header "DESCRIPTION" A band (channel) in a raster dataset. Use the Band method of a dataset object to obtain a band object. .SH METHODS .IX Header "METHODS" .SS GetDataType .IX Subsection "GetDataType" .Vb 1 \& my $datatype = $band\->GetDataType; .Ve .SS GetSize .IX Subsection "GetSize" .Vb 1 \& my @size = $band\->GetSize; .Ve .SS GetBlockSize .IX Subsection "GetBlockSize" .Vb 1 \& my @size = $band\->GetBlockSize; .Ve .SS GetNoDataValue .IX Subsection "GetNoDataValue" .Vb 1 \& my $nodata = $band\->GetNoDataValue; .Ve .SS SetNoDataValue .IX Subsection "SetNoDataValue" .Vb 1 \& $band\->SetNoDataValue($value); .Ve .PP Calling the method without arguments deletes the nodata value. .PP .Vb 1 \& $band\->SetNoDataValue; .Ve .SS Read .IX Subsection "Read" .Vb 1 \& my $data = $band\->Read($xoff, $yoff, $xsize, $ysize, $bufxsize, $bufysize); .Ve .PP All arguments are optional. If no arguments are given, reads the whole raster band into a 2D Perl array. The returned array is an array of references to arrays of row values. .SS ReadBlock .IX Subsection "ReadBlock" .Vb 1 \& my $data = $band\->ReadBlock($xoff, $yoff, @blocksize, $datatype); .Ve .PP Reads a block of data from the band and returns it as a Perl 2D array. \f(CW@blocksize\fR and \f(CW$datatype\fR (an integer) are optional and obtained from the GDAL raster object if not given. .SS Write .IX Subsection "Write" .Vb 1 \& $band\->Write($data, $xoff, $yoff, $xsize, $ysize); .Ve .SS WriteBlock .IX Subsection "WriteBlock" .Vb 1 \& $band\->WriteBlock($data, $xoff, $yoff); .Ve .SS SetPiddle .IX Subsection "SetPiddle" .Vb 1 \& $band\->SetPiddle($pdl, $xoff, $yoff, $xsize, $ysize); .Ve .PP Read data from a piddle into this Band. .SS GetPiddle .IX Subsection "GetPiddle" .Vb 1 \& $band\->GetPiddle($xoff, $yoff, $xsize, $ysize, $xdim, $ydim); .Ve .PP Read data from this Band into a piddle. .SS GetColorInterpretation .IX Subsection "GetColorInterpretation" .Vb 1 \& my $ci = $band\->GetColorInterpretation; .Ve .SS SetColorInterpretation .IX Subsection "SetColorInterpretation" .Vb 1 \& $band\->SetColorInterpretation($ci); .Ve .SS GetColorTable .IX Subsection "GetColorTable" .Vb 1 \& my $color_table = $band\->GetColorTable; .Ve .PP Returns the color table as an array of arrays. The inner tables are colors [c1...c4]. .SS SetColorTable .IX Subsection "SetColorTable" .Vb 1 \& $band\->SetColorTable($color_table); .Ve .SH LICENSE .IX Header "LICENSE" This software is released under the Artistic License. See perlartistic. .SH AUTHOR .IX Header "AUTHOR" Ari Jolma \- Ari.Jolma at gmail.com .SH "SEE ALSO" .IX Header "SEE ALSO" Geo::GDAL::FFI .PP Alien::gdal, FFI::Platypus,