Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix filename show #628

Merged
merged 4 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading