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

SimulationEdge lenght (int) vs edge.shape.length (double) #50

Open
schaemar opened this issue Sep 26, 2017 · 4 comments
Open

SimulationEdge lenght (int) vs edge.shape.length (double) #50

schaemar opened this issue Sep 26, 2017 · 4 comments
Assignees

Comments

@schaemar
Copy link
Member

Possibly inconsistent values

@praveale
Copy link
Collaborator

Values from SimulationEdge and corresponding EdgeShape are different

@F-I-D-O F-I-D-O assigned matalukes and unassigned praveale Jun 26, 2019
@matalukes
Copy link
Collaborator

SimulationEdge lenght is calculated in roadmap-processing/roadmaptools/calculate_curvature.py in function get_distance_between_coords from original coordinates, then its saved to geojson file and from that file it is parsed to java memory.
However edge.shape.length is calculated in geographtools/util/DistanceUtil.java by function computeEuclideanDistance from coordinates, that are transformed by geographtools/util/Transformer.java class and then rounded.
That causes different values

@F-I-D-O F-I-D-O assigned F-I-D-O and unassigned matalukes Jul 3, 2019
@F-I-D-O
Copy link
Member

F-I-D-O commented Jul 3, 2019

We now have to decide how to deal with the discrepancy.

@marekcuchy
Copy link
Collaborator

marekcuchy commented Jul 20, 2020

I think that the distance used for all the calculations should be taken directly from the graph source and it should not be calculated again from the coordinates which basically force us to use precise EdgeShapes even if we don't care about the shape at all because it is used by the core functionalities like Move activity. (I was currently forced to basically mock EdgeShape by extending it to return the length I needed).

Therefore, I suggest to remove the shapeLength parameter completely or at least force it to be equal with Edge.length and do not calculate it.

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

5 participants