This tutorial shows how to restore a World Origin object in a Trainz route that was originally placed by TransDEM but got lost or misplaced en route.
Note: This will only work, if the following conditions are met:
- The original route module was created with TransDEM.
- The original route module and the new one of this tutorial reside in the same UTM zone.
In this example we use
Canadian geo data. The original route module will be 082o03, created in
this tutorial.
Preparing for restorationWe open 082o03 in Surveyor and prepare the route by deleting the World Origin object first, something that may happen accidentally when working on a route. Here we do it by intention.
We find the WO with the Environment menu entry via the Location tab. We remove the WO object by applying the “Delete Object” function.
Now we have a route that no longer has a World Origin. We want to restore it, in a way that TransDEM can work with this route again. There are a couple of ways to achieve this. In this tutorial we choose the method of adding a new, single baseboard route. This single baseboard route will carry a new WO and serve as the World Origin reference in a merged route. The new baseboard can be positioned anywhere, it does not have to be at the same location or somewhere near the original WO. We should pick a spot where we can identify enough map features to precisely locate the baseboard both in Trainz Surveyor and in TransDEM. In this example, we place the new baseboard near the town of Canmore.
Once we have found a suitable baseboard location, we delete the existing baseboard. (Called “ground” and “section” in Surveyor here.)
We save the route, now without WO and one baseboard missing, as 082o03-noWO.
Rescue route moduleIn TransDEM we load DEM and raster map for 082o03. We do not need vector data this time, it would actually be in the way now.
As in Surveyor we identify our baseboard in TransDEM and draw a rectangular mask around it. We create a Trainz route from it. Since there is no vector data, the route filter is disabled automatically, otherwise we would have to switch it off manually. We call the single baseboard route 082o03-1WO.
We import it with Content Manager and open it in Surveyor.
Important: When merging a route with WO and one without WO, the one with WO must be opened in Surveyor normally (first module), the one without WO must be added through the Merge function (second module), not the other way round. We merge with 082o03-noWO. In the Merge window we see our single baseboard in conflict with the other route module and we see the hole in that other module (The Merge window initially positions baseboards with index [0,0] on top of each other.)
After a bit of shifting around we get it matching and finish the merge by combining the layers.
Zooming in, we find our WO object at the centre of our former one baseboard route. We save the result as 082o03-WOrestored.
There is no need to repair the WO in TransDEM this time, because there was only one WO involved in the merge and Trainz didn't have a chance to get it wrong. So, we are done, the merged route is ready to be treated by TransDEM again.
Alternative geo data sources for rescue module In this example so far we used the very same geo data source to create the original route and to restore the WO. In real life, things may be more complicated. The original route module may have been created a couple years ago, the geo data used then may no longer be available. That does not prevent us from restoring the WO with a different geo data source. It will still work, because of a static mapping between Trainz World Coordinates, which define the baseboard borders, and UTM coordinates, assigned and maintained by TransDEM.
To illustrate this, we start over, from different geo data sources. For the DEM I picked SRTM 1 arc sec
http://e4ftl01.cr.usgs.gov/SRTM/SRTMGL1.003/, file N51W116.SRTMGL1.hgt.zip.
For the raster map I referred to Open Street Map, via the TransDEM Map Tile client.
In TransDEM, it looks like this:
Again we create our single baseboard route. I called it 082o03-1WO-srtm. We import it with CM and open in Surveyor.
Then we merge with 082o03-noWO, as before. The different ground textures are quite noticeable, but we also see that the road still matches, despite quite different geo data sources.
Since we are also using a different DEM data source, we cannot expect the merge to be seamless. Viewed from an angle, this is clearly visible. It's not too bad, though, either, and could be easily smoothed with Surveyor tools.