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

Adaptation: output gdf returns results on wrong links #664

Open
2 tasks done
MatthiasHauthDeltares opened this issue Dec 17, 2024 · 1 comment · May be fixed by #668
Open
2 tasks done

Adaptation: output gdf returns results on wrong links #664

MatthiasHauthDeltares opened this issue Dec 17, 2024 · 1 comment · May be fixed by #668
Assignees
Labels
bug Something isn't working triage required Issues without priority assessment or milestone.

Comments

@MatthiasHauthDeltares
Copy link
Contributor

MatthiasHauthDeltares commented Dec 17, 2024

Ra2ce version checks

  • I have checked that this issue has not already been reported.
  • I have checked that this bug exists on the latest version of Ra2ce in master here.

Reproducible example

See Jupyter example on adaptation

Current behaviour

analysis/adaptation/adaptation.py

_orig_gdf = self.graph_file_hazard.get_graph()
benefit_gdf.set_geometry(_orig_gdf.geometry, inplace=True)
for _col in ["length", "highway", "infra_type", "link_id", "rfid"]:
      copy_column(_orig_gdf, _col)

_origin_gdf is segment-based (len = N) while benefit_gdf is link-based (len = p <N)
Therefore, when setting the geometry, things go terribly wrong and the geometry are assigned incorrectly to the links.

cost_gdf is also currently segment-based (len =N)

Desired behaviour

The geometry should be correctly assigned, just like it is done in the result wrapper of damage.

Additional context

No response

@MatthiasHauthDeltares MatthiasHauthDeltares added bug Something isn't working triage required Issues without priority assessment or milestone. labels Dec 17, 2024
@ArdtK ArdtK self-assigned this Dec 19, 2024
@ArdtK
Copy link
Contributor

ArdtK commented Dec 19, 2024

@MatthiasHauthDeltares currently all gdfs used are link-based. The problem is some rows get lost during the losses analysis (#666), and apparently the order of not preserved.
I'll look into this.

@ArdtK ArdtK added this to the Sprint 2024 Q4.4 milestone Dec 20, 2024
@ArdtK ArdtK linked a pull request Dec 20, 2024 that will close this issue
7 tasks
@ArdtK ArdtK linked a pull request Dec 20, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage required Issues without priority assessment or milestone.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants