read problem: for both read and warp
Closed this issue · 3 comments
mdsumner commented
terra ok (with the NSIDCbin driver)
terra::rast("../autotest/gdrivers/data/nsidcbin/nt_20220409_f18_nrt_s.bin")
class : SpatRaster
dimensions : 332, 316, 1 (nrow, ncol, nlyr)
resolution : 25000, 25000 (x, y)
extent : -3950000, 3950000, -3950000, 4350000 (xmin, xmax, ymin, ymax)
coord. ref. : WGS 84 / NSIDC Sea Ice Polar Stereographic South (EPSG:3976)
source : nt_20220409_f18_nrt_s.bin
name : nt_20220409_f18_nrt_s
but not vapour
vapour::vapour_raster_info("../autotest/gdrivers/data/nsidcbin/nt_20220409_f18_nrt_s.bin")$dimension
[1] 316 332
> str(vapour::vapour_read_raster("../autotest/gdrivers/data/nsidcbin/nt_20220409_f18_nrt_s.bin", window = c(0,0, 316, 332)))
we have a problem at RasterIO
List of 1
$ Band1: num [1:104912] 0 0 0 0 0 0 0 0 0 0 ...
Warning messages:
1: Failed to read scanline 331. (GDAL error 3)
2: /perm_storage/home/gdalbuilder/gdal/autotest/gdrivers/data/nsidcbin/nt_20220409_f18_nrt_s.bin, band 1: IReadBlock failed at X offset 0, Y offset 331: Failed to read scanline 331. (GDAL error 1)
> str(vapour::vapour_read_raster("../autotest/gdrivers/data/nsidcbin/nt_20220409_f18_nrt_s.bin", native = TRUE))
we have a problem at RasterIO
List of 1
$ Band1: num [1:104912] 0 0 0 0 0 0 0 0 0 0 ...
Warning messages:
1: Failed to read scanline 331. (GDAL error 3)
2: /perm_storage/home/gdalbuilder/gdal/autotest/gdrivers/data/nsidcbin/nt_20220409_f18_nrt_s.bin, band 1: IReadBlock failed at X offset 0, Y offset 331: Failed to read scanline 331. (GDAL error 1)
> str(vapour::vapour_warp_raster("../autotest/gdrivers/data/nsidcbin/nt_20220409_f18_nrt_s.bin", extent = c(-3950000, 3950000, -3950000, 4350000 ), dimension = c(332, 316), projection = "EPSG:3031"))
Error in warp_in_memory_gdal_cpp(x, source_WKT = source_projection, target_WKT = projection, :
something went wrong!
In addition: Warning messages:
1: Failed to read scanline 331. (GDAL error 3)
2: ../autotest/gdrivers/data/nsidcbin/nt_20220409_f18_nrt_s.bin, band 1: IReadBlock failed at X offset 0, Y offset 331: Failed to read scanline 331. (GDAL error 1)
why was this not showing up before? Specific to Raw drivers?
mdsumner commented
mdsumner commented
this was a bug in someone's GDAL driver PR ... not a vapour problem
mdsumner commented
was fixed in this commit mdsumner/gdal@32a00e2