Skip to content

Commit

Permalink
Make Band inherit from Object
Browse files Browse the repository at this point in the history
  • Loading branch information
Ari Jolma committed Jun 18, 2023
1 parent 4741fa1 commit 1ff3c70
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Geo/GDAL/FFI/Band.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use strict;
use warnings;
use Carp;
use FFI::Platypus::Buffer;
use base 'Geo::GDAL::FFI::Object';

our $VERSION = 0.0900;

Expand Down
12 changes: 12 additions & 0 deletions t/00.t
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,19 @@ if(1){
# Cannot modify tag "PhotometricInterpretation" while writing at (a line afterwards this).
# should investigate why
#$b->SetColorTable([[1,2,3,4],[5,6,7,8]]);

if(0){ # band metadata test
$b->SetMetadata({'d' => {'a' => 'b'}});
my $md = $b->GetMetadata();
for my $d (keys %$md) {
say 'domain ',$d;
for (keys %{$md->{$d}}) {
say $_, '=>', $md->{$d}{$_};
}
}
}
}

if(1){
my $dr = GetDriver('MEM');
my $ds = $dr->Create('', 10);
Expand Down
10 changes: 10 additions & 0 deletions t/dataset.t
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ dies_ok (
sub {$ds->GetLayer (-1)},
'GetLayer exception for negative index',
);
if(0) { # dataset metadata test
$ds->SetMetadata({'d' => {'a' => 'b'}});
my $md = $ds->GetMetadata();
for my $d (keys %$md) {
say 'domain ',$d;
for (keys %{$md->{$d}}) {
say $_, '=>', $md->{$d}{$_};
}
}
}


done_testing();

0 comments on commit 1ff3c70

Please sign in to comment.