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

Handle diagonal and perpendicular parking #258

Merged
merged 1 commit into from
Apr 1, 2024
Merged

Handle diagonal and perpendicular parking #258

merged 1 commit into from
Apr 1, 2024

Conversation

dabreegster
Copy link
Contributor

Thanks to @ginnyTheCat for fixing some parsing bugs in Muv

Here's how perpendicular spots at https://strassenraumkarte.osm-berlin.org/?map=micromap#19/52.47214/13.43922 look:
image

And diagonals at https://strassenraumkarte.osm-berlin.org/?map=micromap#19/52.47450/13.42235:
image

#252 tracks further work to handle separately mapped parking areas

traffic_direction: Direction,
) -> (LaneType, Direction, EnumSet<TurnDirection>) {
let parking_type = match p.orientation {
Some(ParkingOrientation::Parallel) | None => ParkingType::Parallel,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming parallel when it's not tagged

@@ -571,7 +583,8 @@ impl MapConfig {
country_code: String::new(),
bikes_can_use_bus_lanes: true,
inferred_sidewalks: false,
street_parking_spot_length: Distance::meters(8.0),
parallel_street_parking_spot_length: Distance::meters(8.0),
vehicle_width_for_parking_spots: Distance::meters(3.0),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just making something up that looks vaguely reasonable. All of this config needs to later turn into region-dependant values

@@ -269,6 +286,78 @@ fn draw_parking_lines(lane: &LaneSpec, center: &PolyLine, streets: &StreetNetwor
result
}

fn draw_diagonal_parking_lines(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The markings for the two new cases could be improved to look better, and this code is quite messy. Just getting something started.

@dabreegster dabreegster merged commit eba8b28 into main Apr 1, 2024
@dabreegster dabreegster deleted the parking branch April 1, 2024 10:39
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

Successfully merging this pull request may close these issues.

None yet

1 participant