Skip to content

Commit f345100

Browse files
authored
abbreviate crs in show (#873)
1 parent 99e2b52 commit f345100

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/show.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,20 @@ end
1717

1818
function print_geo(io, mime, A; blockwidth)
1919
DD.print_block_separator(io, "raster", blockwidth)
20-
printstyled(io, "\n extent: "; color=:light_black)
21-
show(io, mime, Extents.extent(A))
2220
if missingval(A) !== nothing
2321
printstyled(io, "\n missingval: "; color=:light_black)
2422
show(io, mime, missingval(A))
2523
end
24+
printstyled(io, "\n extent: "; color=:light_black)
25+
show(io, mime, Extents.extent(A))
2626
if crs(A) !== nothing
2727
printstyled(io, "\n crs: "; color=:light_black)
28-
print(io, convert(String, crs(A)))
28+
str = convert(String, crs(A))
29+
if length(str) > (blockwidth - 7)
30+
print(io, str[1:min(blockwidth - 10, end)] * "...")
31+
else
32+
print(io, str)
33+
end
2934
end
3035
if mappedcrs(A) !== nothing
3136
printstyled(io, "\n mappedcrs: "; color=:light_black)

0 commit comments

Comments
 (0)