Symptom
Loading SRTM via Raster(SRTM; extent=…) over a buffered extent that triggers the multi-tile concat path fails with:
TypeError: in AbstractBasicDimArray, in D, expected D<:Tuple{Vararg{Dimension}},
got Type{Tuple{Vector{Any}, Y{Projected{Float64, …}}}}
preceded by:
Warning: `cat` cannot concatenate `Dimension`s, falling back to `parent` type:
step sizes 0.0008333333333333334 and 0.0008333333333333335 do not match on dimension X.
Both values are valid Float64 representations of 1/1200 — they differ by 1 ULP.
Cause
DimensionalData's cat over Dimension lookups requires step sizes to be exactly equal; it rejects the 1-ULP difference and falls back to plain-array cat.
_tiled_raster (ext/RastersRasterDataSourcesExt/constructors.jl:100) continues past that warning and reconstructs the Raster with a Vector{Any} where the X dim should be, which Raster then rejects with the TypeError above.
Reproduce
using Rasters, RasterDataSources
import ArchGDAL
using Rasters.Extents: Extent
# Buffer 0.5° around X=(6,9), Y=(46,49) — triggers the tile concat path
Raster(SRTM; extent = Extent(X=(5.5, 9.5), Y=(45.5, 49.5)),
lazy = true, missingval = Int16(0))
Buffers of 0.05° / 0.3° on the same area don't trigger the concat path and succeed.
Suggested fix
- Tolerate ULP-level step rounding when concatenating Dimension lookups (compare within a small tolerance, or canonicalise via rational like
1//1200).
- Or: have
_tiled_raster detect the failed-cat fallback (the Vector{Any} placeholder) and error early with a clearer message instead of letting Raster throw the cryptic TypeError.
Symptom
Loading SRTM via
Raster(SRTM; extent=…)over a buffered extent that triggers the multi-tile concat path fails with:preceded by:
Both values are valid Float64 representations of
1/1200— they differ by 1 ULP.Cause
DimensionalData'scatover Dimension lookups requires step sizes to be exactly equal; it rejects the 1-ULP difference and falls back to plain-arraycat._tiled_raster(ext/RastersRasterDataSourcesExt/constructors.jl:100) continues past that warning and reconstructs theRasterwith aVector{Any}where the X dim should be, whichRasterthen rejects with theTypeErrorabove.Reproduce
Buffers of 0.05° / 0.3° on the same area don't trigger the concat path and succeed.
Suggested fix
1//1200)._tiled_rasterdetect the failed-cat fallback (theVector{Any}placeholder) and error early with a clearer message instead of lettingRasterthrow the crypticTypeError.