Previously, in this post, I mentioned that I would continue improving the modules. Here, I’ll outline the overall technical plan.
Goals and Approach
Let me summarize the general idea. Let’s assume that buildings and roads are fixed for now—after all, this is a public transport editor, and I currently lack the resources to handle an all-purpose editor.
We can introduce the concept of “editing mode,” starting with defining a public transport editing mode. Logically (even though the underlying implementation involves editing roads), this mode will operate on the existing paths and buildings, adding new information instead of modifying existing ones. Here’s what we need to achieve:
Create new public transport routes:
- Manually select or create some stops to form a route consisting only of stops.
- Manually select paths in sequence to define the route. This might involve drawing operations, such as flexible selection via mouse dragging. Bidirectional routes might need additional handling.
- Automatically generate routes based on stops. I haven’t figured out how to implement this yet.
- Modify route metadata, including names, operators, etc.
Edit existing routes:
- Add, delete, or reorder stops.
- Extend, shrink, delete, or reconnect paths.
- Modify route metadata, including names, operators, etc.
Delete routes:
- Direct deletion will suffice for now. In the future, we might consider merging routes.
The above covers single-route operations.