Skip to content

feat: Map coloring #130

@mszell

Description

@mszell

Is your feature request related to a problem?
After a call with @MoritzStefaner on how to visualize sb's output nicely, we agreed that it would be nice if the map coloring problem was already solved by sb. (I am though not sure if it is already solved? If so, sorry and please close this issue!)

Proposed Solution
For example, an int parameter num_colors >= 4, (4 because of https://en.wikipedia.org/wiki/Four_color_theorem) that would give each superblock its own color class, such that all adjacent superblocks have a different class. Adjacency would be defined by the rook contiguity, if we think about the blocks as polygons.

Alternative Solutions
This feature could be handy especially in succession with #106 , after too small or too big superblocks have been merged/split or discarded.

Use Cases
Describe specific use cases for this feature:

  1. As someone who wants to visualize the output of sb, I want to ensure that all adjacent superblocks have a different color, and that I can regulate how many colors to use, because the aesthetically best number might depend on the size of the city or blocks.

Additional Context
Some Python map coloring package might already exist.

Willing to Contribute?
Unfortunately I don't have enough time to develop it, and this feature suggestion is definitely not a request! More a nice to have. Happy to help test/document.

  • I'm willing to submit a PR for this feature
  • I can help test this feature
  • I can help document this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions