hotspot_path = "zoneforhotspot.geojson"
d = ArchGDAL.read(hotspot_path)
layer = ArchGDAL.getlayer(d, 0)
fs = ArchGDAL.getfeature(layer, 1) do f
ArchGDAL.getgeom(f)
end
fs
d = ArchGDAL.read(hotspot_path)
layer = ArchGDAL.getlayer(d, 0)
f = ArchGDAL.getfeature(layer, 1) # error here
fs = ArchGDAL.getgeom(f)
There is error if I do not use do block.
The error message is as following.
MethodError: no method matching getfeature(::ArchGDAL.IFeatureLayer, ::Int64)
Closest candidates are:
getfeature(!Matched::Function, ::Any...; kwargs...) at /home/liye/.julia/packages/ArchGDAL/ohMpc/src/context.jl:213
Stacktrace:
[1] top-level scope at In[52]:3
Can anyone tell the reason of the error?