Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/base/display.jl
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function Base.show(io::IO, gfd::AbstractGeomFieldDefn)::Nothing
return nothing
end

function Base.show(io::IO, feature::Feature)::Nothing
function Base.show(io::IO, feature::AbstractFeature)::Nothing
if feature.ptr == C_NULL
print(io, "NULL Feature")
return nothing
Expand Down
6 changes: 3 additions & 3 deletions src/base/iterators.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
function Base.iterate(
layer::AbstractFeatureLayer,
state::Integer = 0,
)::Union{Nothing,Tuple{Feature,Int64}}
)::Union{Nothing,Tuple{IFeature,Int64}}
layer.ptr == C_NULL && return nothing
state == 0 && resetreading!(layer)
ptr = GDAL.ogr_l_getnextfeature(layer.ptr)
return if ptr == C_NULL
resetreading!(layer)
nothing
else
(Feature(ptr), state + 1)
(IFeature(ptr), state + 1)
end
end

Base.eltype(layer::AbstractFeatureLayer)::DataType = Feature
Base.eltype(layer::AbstractFeatureLayer)::DataType = IFeature

Base.IteratorSize(::Type{<:AbstractFeatureLayer}) = Base.SizeUnknown()

Expand Down
Loading