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

Bugfix show #177

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
# But not if geom is already a WrapperGeometry
convert(::Type{$geomtype}, ::$trait, geom::$geomtype) = geom

function Base.show(io::IO, ::MIME"text/plain", geom::$geomtype{Z, M, T, E, C};

Check warning on line 175 in src/wrappers.jl

View check run for this annotation

Codecov / codecov/patch

src/wrappers.jl#L175

Added line #L175 was not covered by tests
show_mz::Bool = true, screen_ncols::Int = displaysize(io)[2]
) where {Z, M, T, E <: Union{Nothing,Extents.Extent}, C}
compact = get(io, :compact, false)
Expand All @@ -190,7 +190,7 @@
end
end

str = string($geomtype)

Check warning on line 193 in src/wrappers.jl

View check run for this annotation

Codecov / codecov/patch

src/wrappers.jl#L193

Added line #L193 was not covered by tests
if show_mz
str *= "{$Z,$(spacing)$M}"
end
Expand Down Expand Up @@ -236,7 +236,7 @@

str *= "]"
else
str *= _nice_geom_str(parent(geom), false, compact, screen_ncols - currently_used_space)

Check warning on line 239 in src/wrappers.jl

View check run for this annotation

Codecov / codecov/patch

src/wrappers.jl#L239

Added line #L239 was not covered by tests
end

str *= extent_str
Expand Down Expand Up @@ -451,7 +451,7 @@
end
Base.:(!=)(g1::Point, g2::Point) = !(g1 == g2)

function Base.show(io::IO, ::MIME"text/plain", point::Point{Z, M, T, C}; show_mz::Bool = true) where {Z,M,T,C}
function Base.show(io::IO, ::MIME"text/plain", point::Point{Z, M, T, C}; show_mz::Bool = true, screen_ncols::Int = displaysize(io)[2]) where {Z,M,T,C}

Check warning on line 454 in src/wrappers.jl

View check run for this annotation

Codecov / codecov/patch

src/wrappers.jl#L454

Added line #L454 was not covered by tests
rafaqz marked this conversation as resolved.
Show resolved Hide resolved
print(io, "Point")
this_crs = crs(point)

Expand Down Expand Up @@ -654,9 +654,9 @@
isfeaturecollection(fc::Type{<:FeatureCollection}) = true
trait(fc::FeatureCollection) = FeatureCollectionTrait()

nfeature(t::FeatureCollectionTrait, fc::FeatureCollection) =

Check warning on line 657 in src/wrappers.jl

View check run for this annotation

Codecov / codecov/patch

src/wrappers.jl#L657

Added line #L657 was not covered by tests
_parent_is_fc(fc) ? nfeature(t, parent(fc)) : length(parent(fc))
getfeature(t::FeatureCollectionTrait, fc::FeatureCollection) =

Check warning on line 659 in src/wrappers.jl

View check run for this annotation

Codecov / codecov/patch

src/wrappers.jl#L659

Added line #L659 was not covered by tests
_parent_is_fc(fc) ? getfeature(t, parent(fc)) : parent(fc)
getfeature(t::FeatureCollectionTrait, fc::FeatureCollection, i::Integer) =
_parent_is_fc(fc) ? getfeature(t, parent(fc), i) : parent(fc)[i]
Expand All @@ -667,4 +667,4 @@

_parent_is_fc(x) = isfeaturecollection(parent(x))

end # module
end # module
Loading