Skip to content

Raster API Info does not return the info #156

Closed

Description

@Leon-Carto

Problem description

I have added the item from digital africa s2_l2a. It shows the boundary on the index.html but when it does not show the image on viewer page and raise the error {"detail":"'/vsis3/deafrica-sentinel-2/sentinel-s2-l2a-cogs/35/Q/RA/2017/1/S2A_35QRA_20170101_1_L2A/AOT.tif' does not exist in the file system, and is not recognized as a supported dataset name."}
Screen Shot 2023-11-10 at 00 59 36
Screen Shot 2023-11-10 at 01 01 08

Expected Output

It should return the image on the map
Screen Shot 2023-11-10 at 01 02 39

Environment Information

Ubuntu 22-04
Docker version 24.0.6
python 3.10.12
EoAPI release: 0.1.0 (TBD)

Activity

  1. vincentsarago commented on Nov 9, 2023

    @vincentsarago
    Member

    @Leon-Carto did you allowed deafrica-sentinel-2 bucket in you IAM role for the lambdas?

    By default it's * but maybe you changed it https://github.com/developmentseed/eoAPI/blob/main/infrastructure/aws/cdk/config.py#L87-L91

  2. vincentsarago commented on Nov 9, 2023

    @vincentsarago
    Member
    aws s3 ls --region af-south-1 --no-sign-request s3://deafrica-sentinel-2/sentinel-s2-l2a-cogs/35/Q/RA/2017/1/S2A_35QRA_20170101_1_L2A/AOT.tif
    2020-10-13 12:41:52     102737 AOT.tif
    
    rio cogeo info s3://deafrica-sentinel-2/sentinel-s2-l2a-cogs/35/Q/RA/2017/1/S2A_35QRA_20170101_1_L2A/AOT.tif
    ...
    rasterio.errors.RasterioIOError: The af-south-1 location constraint is incompatible for the region specific endpoint this request was sent to.
    

    Oo That's interesting there might be something with GDAL/Rasterio or how the env variable are set in the service.

    I guess the easiest way to fix this for now is to use https url instead of s3:// because the data is public

    https://docs.digitalearthafrica.org/en/latest/platform_tools/direct_access.html

  3. vincentsarago commented on Nov 9, 2023

    @vincentsarago
    Member

    Oo

    we have to set two env variable for this bucket in af-south-1

    AWS_S3_ENDPOINT=s3.af-south-1.amazonaws.com 
    AWS_NO_SIGN_REQUEST=YES
    
    AWS_S3_ENDPOINT=s3.af-south-1.amazonaws.com AWS_NO_SIGN_REQUEST=YES rio cogeo info s3://deafrica-sentinel-2/sentinel-s2-l2a-cogs/35/Q/RA/2017/1/S2A_35QRA_20170101_1_L2A/AOT.tif
    Driver: GTiff
    File: s3://deafrica-sentinel-2/sentinel-s2-l2a-cogs/35/Q/RA/2017/1/S2A_35QRA_20170101_1_L2A/AOT.tif
    COG: True
    Compression: DEFLATE
    ColorSpace: None
    
    Profile
        Width:            1830
        Height:           1830
        Bands:            1
        Tiled:            True
        Dtype:            uint16
        NoData:           0.0
        Alpha Band:       False
        Internal Mask:    False
        Interleave:       BAND
        ColorMap:         False
        ColorInterp:      ('gray',)
        Scales:           (1.0,)
        Offsets:          (0.0,)
    
    Geo
        Crs:              EPSG:32635
        Origin:           (799980.0, 2100000.0)
        Resolution:       (60.0, -60.0)
        BoundingBox:      (799980.0, 1990200.0, 909780.0, 2100000.0)
        MinZoom:          8
        MaxZoom:          11
    
    Image Metadata
        AREA_OR_POINT: Area
        OVR_RESAMPLING_ALG: MODE
    
    Image Structure
        COMPRESSION: DEFLATE
        INTERLEAVE: BAND
        PREDICTOR: 2
    
    Band 1
        ColorInterp: gray
    
    IFD
        Id      Size           BlockSize     Decimation           
        0       1830x1830      256x256       0
        1       915x915        128x128       2
        2       458x458        128x128       4
        3       229x229        128x128       8
    
  4. locked and limited conversation to collaborators on Nov 9, 2023
  5. converted this issue into a discussion #157 on Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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