Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CostDistance handling of narrow blocking features (like streams) #421

Open
djohnson729 opened this issue Feb 3, 2017 · 0 comments
Open

Comments

@djohnson729
Copy link
Contributor

djohnson729 commented Feb 3, 2017

The use case where we saw a problem was in being able to cross streams. An example of the problem scenario is the following. Each cell represents a pixel in a friction surface where "o" symbolizes a good friction value, and "x" symbolizes a nodata value (e.g. impassible).

c1 c2 c3
x o
o x o

The cost distance algorithm prevents travelling between east and west across the nodata pixel. However, it allows travelling diagonally between the "x" pixels. When the o pixels represent a rasterized stream for example, this is not the effect we want. The stream should be untraversable diagonally too.

We should look into modifying the cost distance algorithm to prevent diagonal traversal if the neighboring pixels are nodata values. However, the question is whether we should always do this or control it with a parameter so that caller can tell us what they want. It's possible that there are some friction surfaces where the diagonal traversal should be allowed.

One downside to this approach is that it's possible that a friction surface could have pixels with values like in the above diagram where the diagonal should be passable within the same data set where in other areas they should not be passable - maybe if there are narrow streams in addition to bodies of water that are really close together, or more likely a narrow bridge across water. So this approach could cause problems too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant