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

dodgr graph to sf function #7

Closed
mpadge opened this issue Aug 22, 2017 · 6 comments
Closed

dodgr graph to sf function #7

mpadge opened this issue Aug 22, 2017 · 6 comments
Labels
must do Critically important

Comments

@mpadge
Copy link
Member

mpadge commented Aug 22, 2017

thanks @karpfen! this must be implemented.

@mpadge mpadge added the must do Critically important label Aug 22, 2017
@mpadge mpadge mentioned this issue Oct 7, 2017
@mpadge
Copy link
Member Author

mpadge commented Oct 7, 2017

This will need an edge map so that contracted edges can be re-expanded to full edges subsequently used to constrcted sf::LINESTRING objects, but otherwise should now be fairly straightforward.

@mpadge
Copy link
Member Author

mpadge commented Oct 11, 2017

See this silicate issue for the importance of implementing this

@mpadge
Copy link
Member Author

mpadge commented Dec 13, 2017

was actually far from straightforward, but final work has been implemented in this commit. It seems very slow, so could maybe be sped up a bit, but works so closing for now

@mpadge mpadge closed this as completed Dec 13, 2017
@mpadge
Copy link
Member Author

mpadge commented Dec 13, 2017

This commit provides most of the infrastructure necessary for this to be parallelised, so this has been re-opened as flag to finish that. Remaining tasks:

  • Convert the current idvec to a vector of integers using a std::unordered_map between vertices and their positions in vert_map
  • Pre-calculate the longest sequence of nodes and use this to construct an RcppParalllel::RMatrix <int> object to hold results
  • Parallel fill the latter with integer values obtained from the former
  • Convert the result parallel-calculated matrix into Rcpp::List of Rcpp::CharacterVector objects containing the actual nodal ID values.

Note that the time consuming part of it all is creating the vertex maps (idmap and idmap_rev), and there's no real way this can be avoided.

@mpadge mpadge reopened this Dec 13, 2017
@mpadge
Copy link
Member Author

mpadge commented Dec 14, 2017

Now runs in a fraction of a second anyway, so no real need to parallel. Most of the time is spent (re-)calculating the contracted graph, so that's the thing that needs to be parallelized.

@mpadge mpadge closed this as completed Dec 14, 2017
@mpadge
Copy link
Member Author

mpadge commented Mar 17, 2019

Re-opened for #86

@mpadge mpadge reopened this Mar 17, 2019
@mpadge mpadge closed this as completed in 5d5bcac Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
must do Critically important
Projects
None yet
Development

No branches or pull requests

1 participant