Skip to content

gdal_raster_data option to not unscale #226

@mdsumner

Description

@mdsumner

why?

dsn <- "/vsicurl/https://e84-earth-search-sentinel-data.s3.us-west-2.amazonaws.com/sentinel-2-c1-l2a/60/K/WC/2023/12/S2A_T60KWC_20231229T221935_L2A/B04.tif"
ref <- vapour::gdal_raster_data(sprintf("/vsicurl/%s", srcs$red[1]), bands = c(1, 1, 1), target_dim = c(1280, 0), 
                                target_crs = "+proj=laea +lon_0=179 +lat_0=-16.5", target_ext = c(-312000,  398000, -392000,  164000), 
                                options = c("-wo", "NUM_THREADS=ALL_CPUS", "-multi"))
str(na.omit(ref[[1]]))
 num [1:2635] 0.0283 0.0538 0.048 0.0488 0.048 ...
 - attr(*, "na.action")= 'omit' int [1:1279925] 1 2 3 4 5 6 7 8 9 10 ...

workaround with band_output_type, but this shouldn't be happening

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions