Skip to content

Commit

Permalink
abbreviate crs in show
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Jan 24, 2025
1 parent 212db85 commit 6e3673c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ end

function print_geo(io, mime, A; blockwidth)
DD.print_block_separator(io, "raster", blockwidth)
printstyled(io, "\n extent: "; color=:light_black)
show(io, mime, Extents.extent(A))
if missingval(A) !== nothing
printstyled(io, "\n missingval: "; color=:light_black)
show(io, mime, missingval(A))
end
printstyled(io, "\n extent: "; color=:light_black)
show(io, mime, Extents.extent(A))
if crs(A) !== nothing
printstyled(io, "\n crs: "; color=:light_black)
print(io, convert(String, crs(A)))
str = convert(String, crs(A))
if length(str) > (blockwidth - 7)
print(io, str[1:min(blockwidth - 10, end)] * "...")
else
print(io, str)
end
end
if mappedcrs(A) !== nothing
printstyled(io, "\n mappedcrs: "; color=:light_black)
Expand Down

0 comments on commit 6e3673c

Please sign in to comment.