Skip to content

Refactor LayerCreator.profile #128

@ppinchuk

Description

@ppinchuk

LayerCreator.profile is kind of a mess, and throughout the code we have a lot of places where we do:

with xr.open_dataset(self.fp, consolidated=False, engine="zarr") as ds:
            attrs = ds.attrs
            crs = ds.rio.crs
            transform = ds.rio.transform()
            coords = ds.coords

We should refactor away the .profile method in favor of the full dataset .attrs, and make it cached. Then users can get access to both geospatial info as well as chunk size

Metadata

Metadata

Assignees

Labels

enhancementUpdate to logic or general code improvementsp-mediumPriority: mediumtopic-python-cost-builderIssues/pull requests related to python cost builder code

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions