[WIP] A Slippy Map for ATS
-
- Posts: 25
- Joined: 21 Feb 2023 01:52
- Location: USA
Re: [WIP] A Slippy Map for ATS
Amazing! Thanks for that; I've subscribed to notifications for that repo. Won't be able to update the slippy map until this weekend, though.
Also: we've got almost the same exact proj4 strings... the only difference is that I use a k value of 0.051. I'll most likely update mine to match yours
Also: we've got almost the same exact proj4 strings... the only difference is that I use a k value of 0.051. I'll most likely update mine to match yours
Re: [WIP] A Slippy Map for ATS
This an amazing project, @truckermudgeon! Since it's directly based on the in-game layout of the roads and streets, I'm sure it will be very useful for everyone who likes to play without GPS. Looking forward to your future updates!
-
- Posts: 25
- Joined: 21 Feb 2023 01:52
- Location: USA
Re: [WIP] A Slippy Map for ATS
Thanks, @SenseFM ! Future updates coming soon... after I dig myself out of a parsing rabbit hole I purposely fell into
The latest update has been to pull in a live copy of nautofon's scenery town data:
Maybe in the future, I can try and look into adding building footprints for these towns, so that their names don't look so lonely.
@nautofon : I noticed the latest changes to the inclusion criteria, so that highway junctions and mountain passes are included. Once I get around to adding the layer selection panel, do you think junctions + passes should be treated as separate layers from scenery town names? If so, is there a way to distinguish junctions + passes from scenery towns in the GeoJSON (maybe as a separate "type" property? Or as some prefix like "junction: foo" or "pass: bar", which the map app can process / stripout during render)?
The latest update has been to pull in a live copy of nautofon's scenery town data:
Maybe in the future, I can try and look into adding building footprints for these towns, so that their names don't look so lonely.
@nautofon : I noticed the latest changes to the inclusion criteria, so that highway junctions and mountain passes are included. Once I get around to adding the layer selection panel, do you think junctions + passes should be treated as separate layers from scenery town names? If so, is there a way to distinguish junctions + passes from scenery towns in the GeoJSON (maybe as a separate "type" property? Or as some prefix like "junction: foo" or "pass: bar", which the map app can process / stripout during render)?
Re: [WIP] A Slippy Map for ATS
^ For the moment, all I can offer as distinction is the observation that all pass names match on the regex / Pass$/, and all junction names match on / Jct$/.
The question of whether or not to have separately selectable layers for these is really your call. As, indeed, is the question of whether to include them at all. Right now your map is the only consumer of this data, so I'm happy to follow your lead. That said, I wouldn't be surprised if named junctions and passes turned out to be relatively rare in the end. This may end up being a non-issue. So I'd tend towards holding off on excluding or separating them until the dataset is more complete and we are in a position to make a better informed decision.
The way you pull in a live copy of the towns data is pretty nice! But it seems to me that having the client load one file per state is less efficient than it could be. It also limits the displayed towns to the fixed list of states in your code. I've adding tooling to produce a combined file for you (with a "state" property, to support the search menu order).
The question of whether or not to have separately selectable layers for these is really your call. As, indeed, is the question of whether to include them at all. Right now your map is the only consumer of this data, so I'm happy to follow your lead. That said, I wouldn't be surprised if named junctions and passes turned out to be relatively rare in the end. This may end up being a non-issue. So I'd tend towards holding off on excluding or separating them until the dataset is more complete and we are in a position to make a better informed decision.
The way you pull in a live copy of the towns data is pretty nice! But it seems to me that having the client load one file per state is less efficient than it could be. It also limits the displayed towns to the fixed list of states in your code. I've adding tooling to produce a combined file for you (with a "state" property, to support the search menu order).
For driving without GPS navigation: ATS Company/Facility Directory — C/FD
-
- Posts: 25
- Joined: 21 Feb 2023 01:52
- Location: USA
Re: [WIP] A Slippy Map for ATS
@nautofon after your message about building models: I fell even deeper down the parsing rabbit hole and:
It's made me reconsider adding hidden roads/prefabs, since some of the building footprints make their absence a little too obvious:
At any rate, it's been a fun diversion . I might get back to the routing-related side of this project, next.
- discovered https://github.com/sk-zk/map-docs/wiki/Map-format and https://github.com/sk-zk/TruckLib
- wrote parsers for Model and Compound items and .pmg file headers
- added building footprints to the slippy map
It's made me reconsider adding hidden roads/prefabs, since some of the building footprints make their absence a little too obvious:
At any rate, it's been a fun diversion . I might get back to the routing-related side of this project, next.
Re: [WIP] A Slippy Map for ATS
Oh wow, this is absolutely incredible. Great job! I might spend the next couple of hours staring at this map.
One tiny nitpick: It looks like the recent change to use the combined name file was reverted accidentally. Could you bring that back, please? I've been looking at Utah name placement in detail and as far as I can see, the positions of the mileage targets are mostly adequate for the time being. There are mileage targets without towns, but not very many. I'd like to start using mileage target data for all of the remaining states until they've been searched manually.
One tiny nitpick: It looks like the recent change to use the combined name file was reverted accidentally. Could you bring that back, please? I've been looking at Utah name placement in detail and as far as I can see, the positions of the mileage targets are mostly adequate for the time being. There are mileage targets without towns, but not very many. I'd like to start using mileage target data for all of the remaining states until they've been searched manually.
For driving without GPS navigation: ATS Company/Facility Directory — C/FD
-
- Posts: 25
- Joined: 21 Feb 2023 01:52
- Location: USA
Re: [WIP] A Slippy Map for ATS
Whoops! Not a tiny nitpick at all. Definitely a big mistake due to late-night coding .One tiny nitpick: It looks like the recent change to use the combined name file was reverted accidentally. Could you bring that back, please?
Just pushed the fix a few minutes ago. Sorry about that!
-
- Posts: 25
- Joined: 21 Feb 2023 01:52
- Location: USA
Re: [WIP] A Slippy Map for ATS
Because I couldn't help myself, I added height info to the generated .pmtiles file so I could render extrusions:
There are some building footprints that overlap roads... it should be possible to detect those and split the bounding boxes so that it won't look like you're driving through a wall. Yet another task For Another Time™.
Prefab buildings don't have height info, because prefab data is still being parsed using ts-map. But I'm almost done refactoring the GeoJSON generation code to use my own parsing code, and once that's done I'll finally get around to regenerating the base .pmtiles file, and releasing all of my project's (hacky, somewhat-spaghetti-ish) source code
There are some building footprints that overlap roads... it should be possible to detect those and split the bounding boxes so that it won't look like you're driving through a wall. Yet another task For Another Time™.
Prefab buildings don't have height info, because prefab data is still being parsed using ts-map. But I'm almost done refactoring the GeoJSON generation code to use my own parsing code, and once that's done I'll finally get around to regenerating the base .pmtiles file, and releasing all of my project's (hacky, somewhat-spaghetti-ish) source code
Re: [WIP] A Slippy Map for ATS
Any thoughts about adding in layers like a grass texture, mountain texture, water texture for the water boundaries, etc?
-
- Posts: 25
- Joined: 21 Feb 2023 01:52
- Location: USA
Re: [WIP] A Slippy Map for ATS
@azgoodaz : I'd like to try adding those sometime in the future, just to see how it'd turn out. But I have a feeling it won't look that great . E.g., for the few rivers I've seen in the game, when I view them in the ATS map editor, they look cut off / they end abruptly (probably because the player can never see where they would end, so there's no need to model them realistically). And some of the mountain ranges I've seen in the map editor look "squished", and only look good when viewing them from the road.
So if it were easy to parse grass, mountain, and water data from the game files: I guess a first draft would look like a low-fi copy of what you'd see in the map editor: a bit unrealistic. There's probably a way to make the in-game data look better / more realistic, but I'm guessing it'd involve a lot of manual work.
Maybe the easiest thing that can be done is to use low-res grass/mountain data, e.g. from zoomed-out Google Maps,
overlay the roads/prefabs from the game on top, and slowly fade out the fill-data as you zoom in. (I'd leave out waterways, though: it'd be weird if a real-life river were on the map, and a street ran through it (without a bridge) )
So if it were easy to parse grass, mountain, and water data from the game files: I guess a first draft would look like a low-fi copy of what you'd see in the map editor: a bit unrealistic. There's probably a way to make the in-game data look better / more realistic, but I'm guessing it'd involve a lot of manual work.
Maybe the easiest thing that can be done is to use low-res grass/mountain data, e.g. from zoomed-out Google Maps,
overlay the roads/prefabs from the game on top, and slowly fade out the fill-data as you zoom in. (I'd leave out waterways, though: it'd be weird if a real-life river were on the map, and a street ran through it (without a bridge) )
Who is online
Users browsing this forum: No registered users and 1 guest