Skip to content

Commit

Permalink
fix filename show (#628)
Browse files Browse the repository at this point in the history
* fix filename show

* roll back

* fix type params
  • Loading branch information
rafaqz committed Apr 9, 2024
1 parent 9026079 commit 0eb5bbb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ function print_geo(io, mime, A; blockwidth)
print(io, convert(String, mappedcrs(A)))
end
if isdisk(A)
printstyled(io, "\n filename: "; color=:light_black)
print(io, filename(A))
fn = filename(A)
if !(fn == "")
printstyled(io, "\n filename: "; color=:light_black)
print(io, )
end
end
println(io)
end
Expand Down
3 changes: 2 additions & 1 deletion src/stack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ subset without loading the whole array.
abstract type AbstractRasterStack{L} <: AbstractDimStack{L} end

missingval(stack::AbstractRasterStack) = getfield(stack, :missingval)
filename(stack::AbstractRasterStack) = map(s -> filename(s), stack)
missingval(s::AbstractRasterStack, key::Symbol) = _singlemissingval(missingval(s), key)
filename(stack::AbstractRasterStack{<:NamedTuple}) = map(s -> filename(s), stack)
filename(stack::AbstractRasterStack{<:Union{FileStack,OpenStack}}) = filename(parent(stack))

isdisk(st::AbstractRasterStack) = isdisk(layers(st, 1))

Expand Down

0 comments on commit 0eb5bbb

Please sign in to comment.