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

Support placement tag #83

Open
enzet opened this issue Sep 17, 2021 · 2 comments
Open

Support placement tag #83

enzet opened this issue Sep 17, 2021 · 2 comments
Assignees
Labels
enhancement Any new feature or improvement feature:road generator Map generation issues

Comments

@enzet
Copy link
Owner

enzet commented Sep 17, 2021

Display changes in width and number of lanes of a road.

See placement=* tag key.

Suggested by @imagico.

@enzet enzet added enhancement Any new feature or improvement generator Map generation issues labels Sep 17, 2021
@enzet enzet self-assigned this Sep 17, 2021
enzet added a commit that referenced this issue Nov 7, 2021
enzet added a commit that referenced this issue Nov 7, 2021
enzet added a commit that referenced this issue Nov 9, 2021
Display road part with placement=transition as connection between
two roads.
enzet added a commit that referenced this issue Jan 28, 2022
@Zero3
Copy link

Zero3 commented Apr 21, 2022

Hiya

This feature crashes map-machine when processing ways that are tagged with placement but not lanes (which is the case for ~3.000 ways according to the overpass turbo query way["placement"][!"lanes"]).

I think map-machine should handle that situation gracefully instead :).

Stack trace:

  File "C:\Users\Zero3\AppData\Roaming\Python\Python38\Scripts\map-machine-script.py", line 33, in <module>
    sys.exit(load_entry_point('map-machine==0.1.3', 'console_scripts', 'map-machine')())
  File "C:\Users\Zero3\AppData\Roaming\Python\Python38\site-packages\map_machine\main.py", line 32, in main
    mapper.render_map(arguments)
  File "C:\Users\Zero3\AppData\Roaming\Python\Python38\site-packages\map_machine\mapper.py", line 311, in render_map
    constructor.construct()
  File "C:\Users\Zero3\AppData\Roaming\Python\Python38\site-packages\map_machine\constructor.py", line 205, in construct
    self.construct_ways()
  File "C:\Users\Zero3\AppData\Roaming\Python\Python38\site-packages\map_machine\constructor.py", line 214, in construct_ways
    self.construct_line(way, [], [way.nodes])
  File "C:\Users\Zero3\AppData\Roaming\Python\Python38\site-packages\map_machine\constructor.py", line 273, in construct_line
    road: Road = Road(
  File "C:\Users\Zero3\AppData\Roaming\Python\Python38\site-packages\map_machine\feature\road.py", line 455, in __init__
    self.placement_offset += self.lanes[lane_number].get_width(
IndexError: list index out of range

@enzet enzet mentioned this issue Apr 21, 2022
2 tasks
@enzet
Copy link
Owner Author

enzet commented Apr 21, 2022

Yeah, thank you!

I've created issue #128 for this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new feature or improvement feature:road generator Map generation issues
Projects
None yet
Development

No branches or pull requests

2 participants