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

circumvent-land-for-travel-distance #162

Open
Paul-Carvalho opened this issue Aug 20, 2024 · 3 comments
Open

circumvent-land-for-travel-distance #162

Paul-Carvalho opened this issue Aug 20, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request high priority Things that should be addressed ASAP

Comments

@Paul-Carvalho
Copy link
Collaborator

Currently don't account for land in the patch of travel distance, but we should account for this and calculate distance when circumventing land in distance.

@Paul-Carvalho Paul-Carvalho added enhancement New feature or request high priority Things that should be addressed ASAP labels Aug 20, 2024
@mle2718
Copy link
Collaborator

mle2718 commented Aug 21, 2024

We did this a long time ago to get travel distances from port to any spot in the ocean using the gdistance package. The steps are:

  1. Convert the ocean to a grid.
  2. Assign grid cells that are on land a very high cost to travel though. You need to supply a polygon for land (or other no-go zones).
  3. Use the costdistance function to compute travel costs from port to any grid cell.
  4. Pull out the length of the shortest path.

I'm not sure if this is the best method. It requires an extra package. The algorithm also can take a while to crank through because it has to do some backward recursion.

I have some code that you could use to build off.

@Paul-Carvalho
Copy link
Collaborator Author

Thanks @mle2718! If you could find that code and send it over that would be great

@mle2718
Copy link
Collaborator

mle2718 commented Sep 5, 2024

email sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority Things that should be addressed ASAP
Projects
None yet
Development

No branches or pull requests

3 participants