Skip to content

Commit

Permalink
export additional hash lists
Browse files Browse the repository at this point in the history
Updates #161
  • Loading branch information
shawnlaffan committed Aug 7, 2019
1 parent 784f638 commit 293e9ae
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/Biodiverse/Cluster.pm
Original file line number Diff line number Diff line change
Expand Up @@ -497,17 +497,16 @@ sub export_shapefile {

my @data_for_gdal_layer;
if ($list_name) {
my %list_data = $branch->get_list_values (
#element => $branch_name,
list => $list_name,
);
my $list_data = $branch->get_list_ref (list => $list_name) // {};

# write a separate shape for each label
foreach my $key (natsort keys %list_data) {
foreach my $key (natsort keys %$list_data) {
# skip text vals for now
next if !looks_like_number ($list_data->{$key} // $nodata);
my %data = (
BRANCH => $branch_name,
KEY => $key,
VALUE => ($list_data{$key} // $nodata),
VALUE => ($list_data->{$key} // $nodata),
);
push @data_for_gdal_layer, \%data;
}
Expand Down

0 comments on commit 293e9ae

Please sign in to comment.