Trying to explain a bit the underlying concepts, constraints and features.
Firstly, we have to clearly distinguish the geo data domain in TransDEM and the game engine data domain in Trainz.
In TransDEM we have three fundamental types of geo data:
- DEM, digital elevation models, or also DTM, digital terrain models.
- Raster data, pictures made of pixels, which can represent cartography or ortho-imagery.
Several methods exist to obtain geo-referenced raster data in TransDEM- Manually geo-referencing by assigning individual points on the image to geo coordinates.
- Obtaining raster image clippings from a web server, using one of the "map tile" or "tile map" conventions.
- Obtaining raster image clippings from a web server, using the WMS standard.
- Vector data, where TransDEM only supports polylines.
All these have in common that they are bound by geo coordinates. The Earth is not a flat disk but we prefer flat representation in cartography for easy handling, so we have "projections", geo coordinate systems that flatten the Earth. Many different geo coordinate systems exist, because every one has limitations. Flattening the Earth always comes with some sort of distortion, and the goal is to keep that distortion minimal for a specific country/region/area. The internal geo coordinate system in TransDEM is UTM, Universal Transverse Mercator, presumably the most widely spread. UTM divides the Earth into 60 zones along the equator, each 6 degrees longitude wide, and also distinguishes northern and southern hemisphere. Within one zone, distortion is relatively small so that in most cases we can ignore it, particularly in TransDEM. Like the majority of projected geo coordinate systems, UTM is a Cartesian system and its units are meters. Cartesian means that the coordinate axes are perpendicular and each unit on one axis equals the same value on the other axis. So, walking 1000m eastward in UTM coordinates covers the same distance as walking 1000m northward. (With so-called geographic coordinates, the geo coordinate system that uses latitude and longitude as its axes and arc seconds as units, this is not the case.) Maps often have grid lines and since UTM is Cartesian and metric, UTM coordinate grid lines for larger scale topographic maps are typically shown every 1000m.
The Trainz domain, on the other hand, has different, albeit similar types of data:
- Ground, which comprises ground height and ground textures.
- Objects, which are 3D assets of various kind, size and purpose.
- Splines, kind of vector data with special behavior, for railway lines, roads and other linear features.
Trainz has its own coordinate system, Trainz World Coordinates, which all Trainz data types adhere to. Trainz World Coordinates are a three dimensional Cartesian system in metres with an ad-hoc, per-project origin. For ground, Trainz splits its world into small manageable units called Baseboard. Each baseboard is 720x720m. But Trainz has no built-in concept of geo data. (The Trainz World Origin which looks like a geo-reference, is a mere meta attribute.)
The TransDEM to Trainz export does two things:
- It maps geo data types to Trainz data types:
- The DEM is converted to Trainz ground.
- Raster data is either converted to ground texture or to large Trainz objects which TransDEM calls "UTM tiles".
- Vectors are converted to splines.
- And it maps UTM coordinates to Trainz coordinates:
- Both UTM coordinates and Trainz coordinates are Cartesian and metric. So, mathematically, the mapping between the two is a simple "translation".
- But TransDEM also defines a static mapping between the UTM and the Trainz Baseboard grid. This allows seamless merging of modules in Trainz Surveyor.
Note that the term "tile" is used in "tile maps" or "map tiles" in the geo data domain for certain types of geo data web servers and also in TransDEM for the Trainz domain as texture carriers 3D assets, called "UTM tiles" because they are defined and identified by the 1000m UTM grid. These two types of tiles are not related and independent of each other.
Mapping raster data from TransDEM to Trainz is a challenge. We have two options and both have drawbacks:
- Ground textures: Limited by resolution and colour palette. Ground textures in conjunction with TransDEM have a resolution of 1 pixel per ground vertex, 10 or 5m, which is suitable for a map or image scale of 1:50000 for a 10m grid baseboard or 1:25000 for a 5m bit baseboard.
- Anything of a higher resolution can only be used on extra texture carries objects, the UTM tiles. But these are ordinary Trainz 3D assets, add-ons to the terrain, like a building or a tree, only of much larger dimension.
A route builder will only need large scale ortho-imagery for those areas of his project where he intends to model to the detail level, typically the railway track and its immediate vicinity. The UTM tiles serve as a route building aid and will be removed before the route is finished.
No individual route builder will be able to fill 1000s of baseboards with reasonable detail, so generating that many UTM tiles is of no practical value. To build a very long route without spending years on unachievable goals, a possible compromise could be using ortho-imagery for ground textures, as shown in my Brenner Route example. There is a specific ground texture set for this purpose. And you only need medium scale ortho-imagery for that, since resolution is limited. So, no big issue to obtain those along a path with the Map Tile client. Hi-res map or ortho-imagery will still be used with UTM tiles, as the template to actually build the line in Surveyor, but with very limited lateral extent.
There is one other limitation with long routes in east/west direction. Seamless merging is only possible within the same UTM zone. If a route is crossing a UTM zone border the route build has to define a primary UTM zone and ensure that all geo data is projected to this primary zone. TransDEM facilitates this approach, it's mostly automatic, provided the route builder is aware of a second UTM zone involved. Theoretically, this can be extended to a third UTM zone, but only if the primary UTM zone becomes the central zone. This means a maximum route length of about 1000 to 1500 km in moderate latitudes. Beyond that, distortion would become too painful.