Skip to content

Add subways and layers #442

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

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Conversation

GMart
Copy link
Contributor

@GMart GMart commented May 5, 2025

I see there is already a PR adding subways. I think I can merge that one in, as the look is a little better than mine.
I have also added subway stations and train stops.
Big change with this one, in the way that data processing works. In order for underground structures to generate with air blocks, I put the fill ground portion before the element processing. That way, the element processing can make air blocks as needed. This means the underground structures work when fill ground or terrain is disabled or enabled, it doesn't matter.
I also respect the level tags, so subways that cross under each other show correctly in Arnis. However, they abruptly go from one level to the next, which can be improved.

Todo:

  • Make stations, stops, etc. generate as areas instead of ways.
  • Make levels flow into each other, instead of jumping from one level to the next.
  • Add station entrances. Will probably not work correctly everywhere since they are defined in OSM differently.

There are a few bugs with formatting to work out.

GMart added 7 commits April 30, 2025 00:06
Modify highways and railways to respect underground levels.
Draft for underground rails. Add air space above rails.
Start work on stops/halts/platforms/stations and underground versions. Add airspace around. Should be converted to area generation.
Had to swap how data processing works. it generated the fill ground first, then the element processing. This may need to be reworked.
Might add a toggle for underground infrastructure, as it can add some time to generation, but not too much time.
Add more air blocks around railway stations, fix sleepers with railways, fix underground highways and roads
@GMart
Copy link
Contributor Author

GMart commented May 5, 2025

Screenshot here: #418 (comment)

GMart added 4 commits May 8, 2025 00:57
Fix fmt bug in data_processing, add additional items to set_block whitelists because of code change. Add "retail" tag to landuse.rs
1. Add Railway nodes, including signals, entrances, and buffer stops
2. Fix stations to generate correctly
3. Add Subways based on louis-e#441, mostly fix issues with walls.
4. Make more things responsive to level or layer tag. (Level tags are for buildings, layer tag for everything else)
5. Roofs respect height tag if available
6. Update layer based items to a standard height increment of 4 blocks from ground level
7. Update default ground level to -52 to accommodate new underground features
@GMart GMart marked this pull request as ready for review May 25, 2025 13:15
@GMart
Copy link
Contributor Author

GMart commented May 25, 2025

retrigger-benchmark

Copy link

⏱️ Benchmark run finished in 0m 39s
🧠 Peak memory usage: 1611 MB

📈 Compared against baseline: 42s
🧮 Delta: -3s
🔢 Commit: 71e28d1

🟢 Generation time is unchanged.

You can retrigger the benchmark by commenting retrigger-benchmark.

@GMart
Copy link
Contributor Author

GMart commented May 25, 2025

Current bugs with this fork:

  • The progress bar is messed up since I switched the order of generation, ground generation happens first.

  • Underground roads can intersect with subways but the subway walls are always generated in the way. It may not be possible to determine when the path should be open to the subway. Usually, stations generate correctly, next to the subway line.

  • Subways can look weird with both terrain and fill ground on.

  • Subway entrance openings don't always generate on the surface.

@GMart GMart marked this pull request as draft May 25, 2025 20:09
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.

1 participant