[Gdal-dev] Using geo::GDAL:

wqual wolfgang.qual at gmx.net
Thu Mar 16 08:01:55 EST 2006


Hi list,
I would like to write a small script in perl which should extract some 
information (like color tables, number of categories) of my GRASS raster 
file.

I installed the module geo::GDAL from [1],

my $data = 
Geo::GDAL::Open("/home/wqual/grassdata/spearfish60/PERMANENT/cellhd/aspect", 
GA_ReadOnly);
use Data::Dumper; 
print Dumper($data);

But everything I get is:

$VAR1 = bless( do{\(my $o = 136387672)}, 'Geo::GDAL::Dataset' );

Afterwards, I tried this: 
my $colors = $data->GetRasterColorTable;
use Data::Dumper; 
print Dumper($colors);

But I receive the following error message: "Can't locate object method 
"GetRasterColorTable" via package "Geo::GDAL::Dataset" at Dateiauslesen.pl 
line 36.

Hmm. I just do not know how to use this module for my purpose. Any ideas?


Best regards,

Wolfgang

[1] http://search.cpan.org/~sderle/Geo-GDAL-0.11/GDAL.pm



More information about the Gdal-dev mailing list