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

Small roads look "stopped", but are actually moving #24

Open
nvkelso opened this issue Mar 23, 2017 · 7 comments
Open

Small roads look "stopped", but are actually moving #24

nvkelso opened this issue Mar 23, 2017 · 7 comments

Comments

@nvkelso
Copy link
Collaborator

nvkelso commented Mar 23, 2017

Many of the smaller roads in Manila (e.g. tertiary) just don't move as fast as motorway speeds, but our colors and the speed breaks are biased for the bigger express routes. This makes the neighborhood streets look "grid locked", but in fact traffic is probably moving like "normal" there with respect to city street speed regulations. On a highway it may be 100 km/hr, but on a surface road it may be 45 km/hr max regulation speed.

Maybe we can use the same "colors", but with different speed breaks per road class, in Tilezen kind syntax:

  • highways: highway = motorway
  • major road: highway = primary, secondary, tertiary
  • minor road: highway = residential ... and most others

@patriciogonzalezvivo what do you think? 2 or 3 different shaders, or one shader with a property we can toggle per kind of road?

@patriciogonzalezvivo
Copy link
Collaborator

maybe the server can return deltas from an average... in the previous demo I end up visualizing the delta over time https://github.com/mapzen/open-traffic-poc-data-demo/blob/gh-pages/scene.yaml#L76-L98

So will be blue (green in our case) when start moving... and red when start decelerating. Will be great to have date about the difference respect to an average: usually on this days ppl go at 30km today goes at 40km -> way faster!

@nvkelso
Copy link
Collaborator Author

nvkelso commented Mar 23, 2017

Can we do a proxy for that where we pretend like the average is:

  • highways: highway = motorway: 100 km/hr
  • major road: highway = primary, secondary, tertiary: 60 km/hr
  • minor road: highway = residential ... and most others: 30 km/hr

(I'm totally spit balling those numbers.)

And then we take the average on the way, subtract that from the expected average speed, and then do the coloring based on that?

@patriciogonzalezvivo
Copy link
Collaborator

nice idea! we can pass those numbers as defines or uniforms

@patriciogonzalezvivo
Copy link
Collaborator

or better, use the new custom attribute, @bcamper is working on

@nvkelso
Copy link
Collaborator Author

nvkelso commented Mar 23, 2017 via email

@patriciogonzalezvivo
Copy link
Collaborator

Working on it : )

@patriciogonzalezvivo
Copy link
Collaborator

Ok... here is the branch for it https://github.com/opentraffic/tangram-viz-experiments/tree/deltas

screen shot 2017-03-24 at 10 19 46 am

Need some TLC on the numbers... I don't see residential geometry and I lower the average speeds to make it less RED.

Take a look to this coloring functions https://github.com/opentraffic/tangram-viz-experiments/blob/deltas/scene.yaml#L35-L49. The tweaking magic happens there... Instead of sending a flag for one_way y replace it with an average speed. The CPU filtering takes care of that. The arrows go at the speed of the speed : ) while de coloring is calculated against the deference with the road type "average". That's the magic number that needs to be tweak ultimately

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

2 participants