Skip to content

Datacube VerticalSpatialDimension enforces optional extent #1593

@fmigneault

Description

@fmigneault

Contrary to Horizontal Spatial Raster Dimension Object, the Vertical Spatial Dimension Object does NOT require an extent.

However, given the following dependency:

class VerticalSpatialDimension(SpatialDimension):

And the definition:

class SpatialDimension(Dimension):
@property
def extent(self) -> list[float]:
"""Extent (lower and upper bounds) of the dimension as two-dimensional array.
Open intervals with ``None`` are not allowed."""
return get_required(
self.properties.get(DIM_EXTENT_PROP), "cube:dimension", DIM_EXTENT_PROP
)

It is not possible to omit extent.

As a workaround, one has to set a extent=[None, None] definition, which does not provide much information, and looks more like an error than anything else for users. It would be more natural to omit the field entirely, especially when no specific range is known in advance.

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