Skip to content

Commit

Permalink
fixes #653
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Oct 23, 2023
1 parent fd8a6d7 commit 1afb139
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/dimensions.R
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ create_dimensions_from_gdal_meta = function(dims, pr) {
lst$band$values = pr$descriptions
else if (!is.null(pr$band_meta)) {
bm = unlist(pr$band_meta)
if (any(a <- grepl("DESCRIPTION=", bm)))
if (any(a <- grepl("DESCRIPTION=", bm)) && length(which(a)) > 1)
lst$band$values = substring(bm[a], 13)
}
# set up raster:
Expand Down

0 comments on commit 1afb139

Please sign in to comment.