JuliaDataCubes / JuliaDataCubes/YAXArrays.jl

getindex with Extent hits non-lazy DimensionalData path

Open
#490 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
132
Forks
25
PR merge metrics
No merged PRs in 30d

Description

indexing into an YAXArray with an Extent hits some non-lazy DD path.

lia> cube[ext]
^CERROR: InterruptException:
Stacktrace:
  [1] maybe_throw()
    @ GDAL ~/.julia/packages/GDAL/R5iZD/src/error.jl:40
  [2] aftercare
    @ ~/.julia/packages/GDAL/R5iZD/src/error.jl:59 [inlined]
  [3] gdalrasterioex(hRBand::ArchGDAL.IRasterBand{…}, eRWFlag::ArchGDAL.GDALRWFlag, nDSXOff::Int64, nDSYOff::Int64, nDSXSize::Int64, nDSYSize::Int64, pBuffer::Ptr{…}, nBXSize::Int64, nBYSize::Int64, eBDataType::ArchGDAL.GDALDataType, nPixelSpace::Int64, nLineSpace::Int64, psExtraArg::Ptr{…})
    @ GDAL ~/.julia/packages/GDAL/R5iZD/src/libgdal.jl:9847
  [4] rasterio!(rasterband::ArchGDAL.IRasterBand{…}, buffer::SubArray{…}, xoffset::Int64, yoffset::Int64, xsize::Int64, ysize::Int64, access::ArchGDAL.GDALRWFlag, pxspace::Int64, linespace::Int64, extraargs::Ptr{…})
    @ ArchGDAL /mnt/felix1/worldmap/dev/ArchGDAL/src/raster/rasterio.jl:239
  [5] rasterio!
    @ /mnt/felix1/worldmap/dev/ArchGDAL/src/raster/rasterio.jl:237 [inlined]
  [6] read!
    @ /mnt/felix1/worldmap/dev/ArchGDAL/src/raster/rasterio.jl:274 [inlined]
  [7] readblock!
    @ /mnt/felix1/worldmap/dev/ArchGDAL/src/raster/array.jl:171 [inlined]
  [8] readblock!(::RQADeforestation.BufferGDALBand{…}, ::SubArray{…}, ::UnitRange{…}, ::UnitRange{…})
    @ RQADeforestation /mnt/felix1/worldmap/dev/RQADeforestation/src/auxil.jl:32
  [9] #4
    @ ~/.julia/packages/DiskArrayTools/141OI/src/DiskArrayTools.jl:39 [inlined]
 [10] foreach
    @ ./abstractarray.jl:3187 [inlined]
 [11] readblock!(::DiskArrayTools.DiskArrayStack{…}, ::Array{…}, ::UnitRange{…}, ::UnitRange{…}, ::Base.Slice{…})
    @ DiskArrayTools ~/.julia/packages/DiskArrayTools/141OI/src/DiskArrayTools.jl:36
 [12] readblock_sizecheck!(::DiskArrayTools.DiskArrayStack{…}, ::Array{…}, ::UnitRange{…}, ::Vararg{…})
    @ DiskArrays ~/.julia/packages/DiskArrays/ny95C/src/diskarray.jl:337
 [13] getindex_disk_nobatch!(out::Nothing, a::DiskArrayTools.DiskArrayStack{…}, i::Tuple{…})
    @ DiskArrays ~/.julia/packages/DiskArrays/ny95C/src/diskarray.jl:244
 [14] getindex_disk!
    @ ~/.julia/packages/DiskArrays/ny95C/src/diskarray.jl:260 [inlined]
 [15] getindex_disk
    @ ~/.julia/packages/DiskArrays/ny95C/src/diskarray.jl:218 [inlined]
 [16] getindex
    @ ~/.julia/packages/DiskArrays/ny95C/src/diskarray.jl:370 [inlined]
 [17] readblock!(::DiskArrayTools.CFDiskArray{…}, ::Array{…}, ::UnitRange{…}, ::UnitRange{…}, ::Base.Slice{…})
    @ DiskArrayTools ~/.julia/packages/DiskArrayTools/141OI/src/DiskArrayTools.jl:268
 [18] readblock_sizecheck!(::DiskArrayTools.CFDiskArray{…}, ::Array{…}, ::UnitRange{…}, ::Vararg{…})
    @ DiskArrays ~/.julia/packages/DiskArrays/ny95C/src/diskarray.jl:337
 [19] getindex_disk_nobatch!(out::Nothing, a::DiskArrayTools.CFDiskArray{…}, i::Tuple{…})
    @ DiskArrays ~/.julia/packages/DiskArrays/ny95C/src/diskarray.jl:244
 [20] getindex_disk!
    @ ~/.julia/packages/DiskArrays/ny95C/src/diskarray.jl:260 [inlined]
 [21] getindex_disk
    @ ~/.julia/packages/DiskArrays/ny95C/src/diskarray.jl:218 [inlined]
 [22] getindex
    @ ~/.julia/packages/DiskArrays/ny95C/src/diskarray.jl:370 [inlined]
 [23] getindex
    @ ~/.julia/packages/DimensionalData/uMSYt/src/array/indexing.jl:130 [inlined]
 [24] getindex(A::YAXArray{Union{…}, 3, DiskArrayTools.CFDiskArray{…}, Tuple{…}, Dict{…}}, extent::Extent{(:X, :Y), Tuple{…}})
    @ DimensionalData ~/.julia/packages/DimensionalData/VxDQB/src/array/indexing.jl:12
 [25] top-level scope
    @ REPL[47]:1
Some type information was truncated. Use `show(err)` to see complete types.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing cube[ext] with the YAXArray and Extent shown in the issue, then trace the call through DimensionalData src/array/indexing.jl:12 and the DiskArrays stack in the trace. Done means Extent indexing completes through the intended lazy path instead of hanging in GDAL, but the expected result and a repository test are not specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.