Opened 9 months ago

Closed 2 months ago

#2775 closed enhancement (fixed)

NEW - wcst_import should generate a reasonable default tiling

Reported by: Bang Pham Huu Owned by: Dimitar Misev
Priority: major Milestone: 10.3
Component: wcst_import Version: 10.2
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description (last modified by Dimitar Misev)

wcst_import should generate a reasonable default tiling for rasdaman collection in case this setting is not specified by user in the ingredients file.

Currently, for a 3D coverage, if tiling is not specified, petascope creates this tile

TILING ALIGNED [0:*,0:*,0:*] tile size 4194304

which is not good as it has these tiles in rasdaman:

 "[5:5,35136:35199,0:64999]",
        "[5:5,40320:40383,0:64999]",
        "[5:5,40384:40447,0:64999]",
        "[5:5,40448:40511,0:64999]",
        "[5:5,40512:40575,0:64999]",
        "[5:5,40576:40639,0:64999]",
        "[5:5,40640:40703,0:64999]",
...

It has to consider multiple details:

  • datacube dimension
  • which axes are spatial
  • Number of bands and types
  • What is primary access pattern: spatial slices, or across non-spatial axes, or something inbetween?
    • gdal slicer imports 2D data organized in spatial slices, so it's very likely the access will be on spatial slices and the tiling should focus on the spatial axes
    • netcdf/grib slicers probably import 3D+ data, so there can be some extension of the tiles to the non-spatial axes
  • Insitu: if original files are tiled/chunked (tiff and netcdf especially), the tiling in rasdaman should be a multiple of the chunk sizes

wcst_import should show a WARNING that no tiling was specified, and print the generated tiling.

Change History (7)

comment:1 by Bang Pham Huu, 9 months ago

Owner: set to Bang Pham Huu

comment:2 by Dimitar Misev, 9 months ago

Milestone: 10.210.3

comment:3 by Dimitar Misev, 9 months ago

Description: modified (diff)
Summary: FIX - wcst_import creates a good default tiling in case it is not specified in the ingredients fileNEW - wcst_import should generate a reasonable default tiling

comment:4 by Dimitar Misev, 9 months ago

Description: modified (diff)

comment:5 by Dimitar Misev, 5 months ago

DM will implement a function with signature:

def generate_tiling(dimension: int,
                    spatial_axes: list[int],
                    band_count: int,
                    cell_size: int,
                    chunk_size: list[int] = None)

This is then called in wcst_import to generate a tiling scheme.

wcst_import checks if the tiling parameter exists in the end, and throws error if not, with a hint for the user:

Hint: if not sure what tiling to specify in the ingredients file, the following is a reasonable default:
"options": { "tiling": "ALIGNED [0:*,0:*,0:*] tile size 4194304" }
Version 0, edited 5 months ago by Dimitar Misev (next)

comment:6 by Bang Pham Huu, 5 months ago

Owner: changed from Bang Pham Huu to Dimitar Misev

wcst_import code to throw error if tiling not specified and the call of method generate_tiling function in applications/wcst_import/master/importer/importer.py are done in wcst_import, the rest is to implement the content of function generate_tiling.

comment:7 by Bang Pham Huu, 2 months ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.