[Gdal-dev] Changes in the Perl bindings API (should not break anything)

Ari Jolma ari.jolma at tkk.fi
Sun Nov 18 15:17:39 EST 2007


> There's still much to do, for example add code to keep parent objects 
> live when their variables go out of scope and children still exist; 
> code that would ease the transfer of data from Perl to GDAL and vice 
> versa; documentation; etc. Comments and help are welcome.

I've added some code to keep

* Datasets alive while their Bands are used
* DataSources alive while their Layers are used
* Features alive while their Geometries are used

I also fixed a bug which should keep FeatureDefns alive while Features 
that use them exist.

These fixes should keep code like:

my $band;
{
    my $dataset = Geo::GDAL::Dataset::Open('filename');
    $band = $dataset->GetRasterBand();
}
$band->something..

not crashing.

I added simpler API for moving raster data between Perl and GDAL:

$data = $band->ReadTile($xoff, $yoff, $xsize, $ysize);
$band->WriteTile($data, $xoff, $yoff);

Ari

-- 
Prof. Ari Jolma
Geoinformaatio- ja paikannustekniikka / Geoinformation and positioning
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 451 3886 address: POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma





More information about the gdal-dev mailing list