Skip to main content
deleted 11 characters in body
Source Link

Still didn't manage to get the partialload AOI/partial data upload work.

Still didn't manage to get the partial data upload work.

Still didn't manage to load AOI/partial data.

added 961 characters in body
Source Link

UPDATE for @Robbi Bishop-Taylor: Hi, I tried the query you posted below, but no joy. So, I cleared the ODC DB and started from the beginning with a new dataset, please see the image below on google map and the red mark is the coordinate I used in the query enter image description here

I can also confirm that the data is indexed correctly on datacube-explorer enter image description here

The new query parameters are as follows:

lat, lon = 22.821, 28.518
buffer = 0.05

query = {
    'time': ('2021-07-24', '2021-07-27'),
    'x': (lon - buffer, lon + buffer),
    'y': (lat + buffer, lat - buffer),
    'output_crs': 'epsg:6933',
    'resolution':(-10,10),
}

Still didn't manage to get the partial data upload work.

NOTE: Sentinel-2 data I have used is S2A_MSIL2A_20210725T083601_N0301_R064_T35QPF_20210725T115425.SAFE

UPDATE for @Robbi Bishop-Taylor: Hi, I tried the query you posted below, but no joy. So, I cleared the ODC DB and started from the beginning with a new dataset, please see the image below on google map and the red mark is the coordinate I used in the query enter image description here

I can also confirm that the data is indexed correctly on datacube-explorer enter image description here

The new query parameters are as follows:

lat, lon = 22.821, 28.518
buffer = 0.05

query = {
    'time': ('2021-07-24', '2021-07-27'),
    'x': (lon - buffer, lon + buffer),
    'y': (lat + buffer, lat - buffer),
    'output_crs': 'epsg:6933',
    'resolution':(-10,10),
}

Still didn't manage to get the partial data upload work.

NOTE: Sentinel-2 data I have used is S2A_MSIL2A_20210725T083601_N0301_R064_T35QPF_20210725T115425.SAFE

Source Link

Partial data loading from the Open Data Cube is not working

I have deployed the cube in a box docker in our local environment and managed to index a couple of Sentinel-2 level 2 data. However, when I tried to load my AOI from those datasets I receive an empty list. The code used is copied below:

# Create a query object
lat, lon = 22.821, 28.518
buffer = 0.05

query = {
    'time': ('2020-12-11', '2020-12-13'),
    'x': (lon - buffer, lon + buffer),
    'y': (lat + buffer, lat - buffer),
    'output_crs': 'epsg:3857',
    'resolution':(-10,10),
}

# Load an image, I am loading a Senitnel2 Level1 data from the datacube
bands = ['B02_10m', 'B03_10m', 'B04_10m']

ds = dc.load(product='s2a_sen2cor_granule',
             measurements=bands,
             dask_chunks={},
             **query)

print(ds)

If I ignore the longitude and latitude then it works okay

# Create a query object
lat, lon = 22.821, 28.518
buffer = 0.05

query = {
    'time': ('2020-12-11', '2020-12-13'),
    'output_crs': 'epsg:3857',
    'resolution':(-10,10),
}

#load data
ds = dc.load(product='s2_l2a',
             dask_chunks={},
             **query)

print(ds)

And the output I receive is as follows:

<xarray.Dataset>
Dimensions:      (time: 2, x: 484, y: 591)
Coordinates:
  * time         (time) datetime64[ns] 2021-07-10T08:53:55 2021-07-10T08:54:10
  * y            (y) float64 2.814e+06 2.814e+06 ... 2.803e+06 2.803e+06
  * x            (x) float64 2.765e+06 2.765e+06 ... 2.775e+06 2.775e+06
    spatial_ref  int32 6933
Data variables:
    B01          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    B02          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    B03          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    B04          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    B05          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    B06          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    B07          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    B08          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    B8A          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    B09          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    B11          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    B12          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    SCL          (time, y, x) uint8 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    AOT          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
    WVP          (time, y, x) uint16 dask.array<chunksize=(1, 591, 484), meta=np.ndarray>
Attributes:
    crs:           epsg:6933
    grid_mapping:  spatial_ref

What could be the possible reason?