Skip to content

The clipper_scale_factor passed in **conf_extra is not forwarded to the metafile output #44

@tik65536

Description

@tik65536

Carry forward from the issues at LandscapeGeoinformatics/pydggsapi#67 and sahrk/DGGRID#97.

To generate zones at the refinement level of 18, the parameter clipper_scale_factor of DGGRID has to increase to 100_000_000 to generate the correct number of zones. However, when I pass the setting to those grid_cell_xxx functions in the extra_config parameter, the setting doesn't carry forward to the dggs when invoking the update function.

tmp_id = uuid.uuid4()
tmp_dir = self.working_dir
dggs = dgselect(dggs_type = dggs_type, res= resolution, mixed_aperture_level=mixed_aperture_level)
dggs.update(**conf_extra, strict=True)

def update(self, strict=False, **kwargs):
"""
Back propagate keyword parameters if they can be mapped to an attribute handled by this class.
:param strict:
If True, only keys that match existing attributes will be set.
If False, unknown keys will be set with provided name.
"""
for key, value in kwargs.items():
found = self._resolve_key(key, strict=strict)
if found:
self.set_par(found, value)

The issue is that the setting clipper_scale_factor is not defined in the Dggs data class, so when the update is set with strict=True, it will skip the setting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions