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

primary vs perimeter #216

Merged
merged 3 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions web/src/AutoBoundariesMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,7 @@
mode: "neighbourhood",
};
} catch (err) {
console.log("error when setting auto-generated neighborhood", err);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem with this change, but I'm curious - were you able to trigger this? (How?)

Copy link
Collaborator

Choose a reason for hiding this comment

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

image
Yes, just draw a boundary inside a larger residential area, and have no primary roads involved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah! I think this is related to #216 (comment)

And I've triggered it by having no primary roads in my hand-drawn neighbourood:
Screenshot 2025-03-11 at 10 20 35

window.alert(
"Sorry, an error occurred. You may need to refresh the page for the application to continue working.",
);
window.alert(`Sorry, this boundary is invalid: ${err}`);
}
}

Expand Down
5 changes: 1 addition & 4 deletions web/src/SetBoundaryMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@
mode: "neighbourhood",
};
} catch (err) {
console.log("error when setting hand drawn neighborhood", err);
window.alert(
"Sorry, an error occurred. You may need to refresh the page for the application to continue working.",
);
window.alert(`Sorry, this boundary is invalid: ${err}`);
cancel();
}
}
Expand Down
4 changes: 2 additions & 2 deletions web/src/ViewShortcutsMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
{:else if state.state == "chose-road"}
<p>
This shows all possible shortcuts crossing the blue road you've chosen.
A shortcut is defined as a route starting and ending outside the
neighbourhood, but cutting through it. It might not actually be
A shortcut is defined as a route starting and ending on primary roads,
then cutting through smaller streets. It might not actually be
considered a "good shortcut" in practice -- this tool doesn't know any
real traffic patterns; it's just looking for any possible path. This
view lets you understand the limits of this assumption.
Expand Down
1 change: 0 additions & 1 deletion web/src/layers/NeighbourhoodRoadLayer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
{...layerId("interior-roads-outlines")}
filter={["==", ["get", "kind"], "interior_road"]}
paint={{
// REVIEW: the interior-roads-outline was previously not visible - was that intentional?
"line-width": lineWidth($thickRoadsForShortcuts, gj.maxShortcuts, 1),
"line-color": "black",
}}
Expand Down