Skip to content

Adapt D8 flow routing to use new interface #223

@wkearn

Description

@wkearn

Following #222, we now have a more modular way to implement flow routing. We should convert the D8 flow routing and least cost auxiliary topography carving to use the modular system. This should break up flow_routing_d8_carve into

  • flow_routing_d8_directions: compute direction of maximum downstream gradient
  • flow_routing_d8_weights: compute weights for D8 (they are all 1s)
  • resolve_flats_lcat: Use the least cost auxiliary topography to resolve flats and append edges to the flow network
  • resolve_flats_lcat_weights: Compute weights for LCAT carving (they are also all 1s).

You should then be able to run these functions in sequence, followed by flow_routing_tsort to reproduce the combined effects of flow_routing_d8_carve and flow_routing_d8_edgelist.

A test should ensure that the new implementation matches the old one.

Once this is implemented, we can deprecate and remove flow_routing_d8_carve and flow_routing_d8_edgelist. This will require changes to downstream packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions