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

Refactor hydrofabric3D FEMA extender code #143

Closed
anguswg-ucsb opened this issue Jul 25, 2024 · 1 comment
Closed

Refactor hydrofabric3D FEMA extender code #143

anguswg-ucsb opened this issue Jul 25, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@anguswg-ucsb
Copy link
Contributor

hydrofabric3D::extend_transects_to_polygons() needs to be refactored into 3 separate functions/steps:

  1. Determine transects that need extending given a polygon
  2. Retrieve the distances to extend each transect in left and right directions
  3. Apply extension distances to transects with flowlines

Right now these 3 steps are all under a single function and making maintaining/improving for performance tougher. Its hard to pinpoint slow points when so many steps are going on, particularly when the slowpoints are memory related

@anguswg-ucsb anguswg-ucsb added the enhancement New feature or request label Jul 25, 2024
@anguswg-ucsb anguswg-ucsb added this to the 3D Channel Approximation milestone Jul 25, 2024
@anguswg-ucsb anguswg-ucsb self-assigned this Jul 25, 2024
@anguswg-ucsb
Copy link
Contributor Author

Closing this issue as hydrofabric3D::extend_transects_to_polygons() has been heavily refactored

  • Changes can be see here and were brought in from this PR
  • Updated the utility functions that go into hydrofabric3D::extend_transects_to_polygons()
  • Made the code more maintainable by breaking logic in hydrofabric3D::extend_transects_to_polygons() into multiple self contained sub functions
  • BIG speed/memory optimization gain from changing a geos::geos_intersects() call into geos::geos_intersects_matrix() call in the hydrofabric3D::geos_bs_distance() function which run on every transect and thus gets a lot of use

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

No branches or pull requests

1 participant