Skip to content

Improving RasterLayer #120

@wang-boyu

Description

@wang-boyu

What's the problem this feature will solve?

As mentioned in the docstrings, some methods in RasterLayer are copied from mesa.space.Grid, including:

__getitem__
__iter__
coord_iter
iter_neighborhood
get_neighborhood
iter_neighbors
get_neighbors  # copied and renamed to `get_neighboring_cells`
out_of_bounds  # copied into `RasterBase`
iter_cell_list_contents
get_cell_list_contents

Recently mesa.space.Grid has received some improvements (refactoring, performance improvements, and so on) but these are not reflected in RasterLayer.

Describe the solution you'd like

Wait until some pending PRs get merged and copy these changes over, until we figure out a better way to incorporate these changes automatically (like mentioned at #75 (comment)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions