Skip to content

Trimming links with length less than scene pixel resolution #11

@Lvulis

Description

@Lvulis

I ran into the following issue. There is a link present which is so small that when I rasterize my links json in R that it literally has no points (some kind of interpolation issue probably). It's visible in the image below. So the link is caused because there are an excess number of links here in part due to these small islands. It has a length of 30sqrt(2), so basically 2 nodes which are diagonally adjacent on a 30-m resolution grid. I found 4 total links like this on the scene.

I see two solutions:

  • better CN mask (remove small islands!) which will prevent this from occurring in the first place
  • Some kind of link length checker in the prune_nodes? If you can compute length of line features and the length is < 1 or 2 pix or something should be merged with nearest link? Generally the algorithm would go:
    Compute all link lengths
    For all link lengths < cutoff (say 2 pix) {
    remove the link. Combine the two nodes to be one node
    Connections of new node will be downstream/upstream neighbors (should max be 4 neighbors?)

image

More examples below:
image

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions