Transdem And Trainz

rivethed

New member
I hope this is relevant and in the right place, as the discrepancy shows up in trainz. So I broke down and started experimenting with transdem. Import DEm/NED. Check. Convert and import Rasters. Check. Slice and dice like a slap-chop to get what i want. Check. export to trainz. Good. BUT. I am finding the trying to use coordinates, that the ones in my new baseboards vs, Google earth and Google maps, are way off.

I have gone back to tDem to check the coordinates within. and they line up right on, but in TS12, they are off to the east and south, and by a large margin to the east. I even tried to use the coordinates overlay when exporting (the Magenta lines) and those change to UTM when exporting, even though I have deg/min/sec viewable. I have tried on a single Geo-referenced baseboard, and on my mega dream route baseboard set.

I have also tried to add the routes layer form a recent USGS grab, and that actually shows as out of alignment eith the DEM/Raster by a few Meters to the East and North of where the track should be.

I have also noticed when I try to build something using rulers (meters with the compass function) that as the route gets longer, referencing form one point on the layout, and my map source, that the distances and especially the angle reference starts to go way off the further form the origin point.


Anyone have suggestions? (besides heading over to the tDem forum. I want to start here as the problem presents itself in Trainz).


Help Me Obi-Wan Clickity-Clack, your my only hope.

thanks
 
This has always been an issue to a greater or lesser extent, depending on the mapping sources - it affects other sims too. There is a facility in Transdem to shift the DEM slightly so it aligns better with skewed maps but often this just transfers the issue to another part of the route where you see rivers going up the side of hills, etc. At the end of the day, you've really just got to eyeball it and use the mapping as a guide.
 
The problem isn't always in Trainz but in the original source. I have downloaded a few USGS maps that have been out of alignment with other already in-use USGS maps on the route. They were shifted up or down a bit so the track and road indications didn't align with the same on the baseboards. In the end after I fiddled with things, and textured the landscape there was little indication that the alignment was off.

What is worse are the old HOG-generated route files. These used the TIGER information maps which are totally out of alignment. In those the river indications are up the sides of mountains and tracks are in places which would make the grade impossible even for a narrow gauged rack railroad.

With TransDEM maps use the markings as a guide and do the measuring on Google Earth, the application and not the maps online. I have found that when the maps do line up the height information in Trainz is within a few meters of what Google Earth shows. Using this as a guide, I then look for the grade which is easily spotted on the terrain, and use that instead of the painted lines.

John
 
I hope this is relevant and in the right place, as the discrepancy shows up in trainz.

Does this mean that your different data sources for DEM, raster and vector fit together and match in TransDEM?

If the discrepancies appear in Trainz, does this affect UTM tile objects? If not, which elements are you comparing in Trainz Surveyor where you detect discrepancies?
 
Does this mean that your different data sources for DEM, raster and vector fit together and match in TransDEM?

If the discrepancies appear in Trainz, does this affect UTM tile objects? If not, which elements are you comparing in Trainz Surveyor where you detect discrepancies?

All reference files are from the usgs nat map server ( ned for dems, geopdf for raster, and the basic route spline). Route is misaligned in tdem but the is something i can look past. It's really the coordinates and distance mesasure that end up out of whack. If i could get google earth to display incremental utm like the output from tdem, or if tdem would output reference lines in long/lat , i think i could fudge the rest without too much stress. More later. Kids need attention.
 
Route is misaligned in tdem
Can you explain with a little more detail?


It's really the coordinates and distance mesasure that end up out of whack. If i could get google earth to display incremental utm like the output from tdem, or if tdem would output reference lines in long/lat , i think i could fudge the rest without too much stress.
It appears you are referring to lat/long coordinates obtained in Trainz Surveyor. That would not be a good idea.

TransDEM maintains an accurate and static mapping between UTM and Trainz baseboards coordinates (christened "Trainz World Coordinates" or TWC by Auran/N3V). Both the UTM and TWC coordinate systems are two-dimensional, Cartesian and metric. For instance, when you move 14,400 m in one principal direction in the real world, you will find yourself exactly 20 baseboards further down in the same direction in the Trainz world on your TransDEM-generated map. 144 km will find you 200 baseboards further down (as long as we stay in the same UTM zone). This also allows you to build a route in stages, in separate modules, which you join together in Trainz and they will merge seamlessly.

How does TransDEM retain the static mapping between TWC and UTM when adding UTM tiles or vector data at a later stage? TransDEM leaves a footprint in the generated route, the Trainz World Origin object (WO). It positions the WO exactly in the center of one baseboard and assigns a pair of lat/long coordinates to it. Resolution here is limited, the Trainz lat/long notation only allows very low accuracy, but with the additional knowledge that the location is the exact center of a baseboard, TransDEM can fully restore the precise UTM location.

As a by-product, the original purpose of the Trainz WO as the anchor point for the solar features in Trainz, will also be fulfilled. And that's it about the WO.

Trying to derive anything else from Trainz lat/long coordinates will definitely not work and only cause frustration.

Firstly, there is no such thing as a single and universal coordinate system for our planet, neither in lat/long (aka geographic coordinates) nor in any of the map projections and their Cartesian coordinates.

As we all will know, the shape of the Earth isn't exactly a sphere, but for some applications sphere may suffice. Normally we will find an ellipsoid as the underlying geometric model of a coordinate system and many have been defined since the beginning of proper geodesy. They not only differ by their geometric parameters, but also by their position in relation to the prototype, the proper Earth, the "Geoid". Each of these spheres and ellipsoids comes with its own lat/long system and they are not compatible.

The combination of the geometric parameters of the sphere or ellipsoid and its relative position is called a "geodetic datum". If we know all the parameters of a given datum, we can convert it to a different datum. Many map tile servers, for instance, including Open Street Map, Microsoft Bing Maps, and Google Maps, use a spherical geodetic datum (and a standard Mercator projection on op of it) but since the datum parameters are well known, we can easily convert between datums and thus obtain ellipsoidal WGS84 coordinates, the geodetic datum used in TransDEM. WGS84 is the closest thing to a universal geodetic datum and you will quite often see lat/long based on WGS84. But there is no guarantee, you always have to look at the small print. For instance, USGS topo maps were produced with the NAD27 datum until less than a decade ago. They are now NAD83, which is very close to WGS84 (regarded as identical in TransDEM).

Unfortunately, we do not know anything about the geodetic datum of the WO and its celestial system in Trainz. Furthermore, we do not know anything about the map projection in Trainz in use to drive that celestial system. In the early years of Trainz people created one or two helper objects that are able read Trainz lat/long coordinates for any given baseboard location. By doing this they made an implicit but erroneous assumption: That Trainz lat/long coordinates would have an actual 1:1 counterpart in the real world, in particular WGS84. That is not the case! (I don't blame them. Geodetic datums are not general knowledge. You won't hear about them in school.)

The Trainz landscape is flat from a mathematical point of view, not a sphere or ellipsoid. Foundation Trainz coordinates are TWC, Trainz World Coordinates, as mentioned earlier. It therefore made a lot of sense for TransDEM to map UTM directly to TWC. The only reason why we also have lat/long in Trainz - as far as I understand - is to control the sun. Nothing more. Don't try to interpret it otherwise.
 
Thanks for the comments. I might actually have to screen cap what I concerns me. Although, the more feedback I receive, the less confident I am in a resolution, other than just fudging in and hoping for acceptable results.

I really am in search of a workable way to keep all my alignments within +/- 0.1% but that is the Mild OCD kicking in. I have found no single solid solution that fits my desires yet.

More to come when I get back to my Trainz PC.

thanks
 
With suitable geo data sources you will be able to recreate the prototype with up to 1 m accuracy.

Here is an example from a German Trainz forum (text also in German but the pictures should speak for themselves):

http://www.trainzdepot.net/index.php/thread/1488-falkenberg/?postID=17436#post17436

The underlying blueprint (historical but official) is 1:1000 scale.

Sehr Gut. As I said before, I may have to crab some screenies to more reflect my issue. I do know that +/- 1 meter overall, would make me a happy man. Maybe in the meantime, I can run through 3 methods I have tried and why they were scrapped?
 
1st Method:
process ned to dem in tdem, process geopdf to raster layer in tdem, assemble in tdem. export to trainz. Pick arbitrary point in surveyor, hybrid eyeballing, aligning with derived texture, and the adjustments using Ruler. Google Earth wsa my refernce in laying track. From one yard area to a specific t junction switch, I was off by ~<30 meters to the east and ~<20 to the south, based on additional linear measurements (this was a month ago for this attempt). (typically measureing junction switch to junction switch and center of road xover as data points).

2nd Method: The Wonderful world of Arcs! start with same yard area, and using google earth, measuring from a fixed point in surveyor and GE, measure key points while laying track (again, switch and roads xovers). Was better length wise, if I totally ignored compass/protractor readings, which ended up in some places of by 3 or 4 degrees (1km or less made little difference, but it was really noticeable past 3km and the compass reading has no decimal). Also tried 2 reference points to alleviate decimal degree errors, but then where the 2 should meet, was way off.

3rd Method was using the Lat-Lon tool. As an example without pics, a point on GE at N33d 43.42' W118d 15.076' (on land), and I use the tool on the baseboard (coordinates place the point in the ocean), and measure the distance I wanted the point to be at, it is roughly 1.82KM off @ 280deg angle (N being zero, measuring clockwise).

As I said, words make it less clear I think, or maybe the way I am trying to explain what I have tried. But I will let the minds chew on the methods until I can get screen caps.


Add: Phil, I just noticed it is you in my thread. (hard to tell from my tiny phone screen) I was looking for community input/involvment from the route builders and was gonna go direct to if I could not resolve tdem to Surveyor as viewed through my mild OCD. We could continue this here, or I could switch to just emailing you direct. Your call.
 
Last edited:
OK, got some screen caps: first one is my DEM and Rasters in Tranzdem, with a refeence point noted @ 33deg 43'N and 118deg 15'E
transdem.png


@nd one show the exported map in Surveyor, and a point at the same reported coordinates:

surveyor.png

You can also see it's relation in the minimap.

3rd, is a ruler showing difference ~430 Meters to the SSE from where it should be.

difference.png


I dunno if that changes any advice thus far, but I would love it to be analyzed so i know I am not delusional :)
 
Last edited:
OK, got some screen caps: first one is my DEM and Rasters in Tranzdem, with a refeence point noted @ 33deg 43'N and 118deg 15'E

@nd one show the exported map in Surveyor, and a point at the same reported coordinates:

You can also see it's relation in the minimap.

3rd, is a ruler showing difference ~430 Meters to the SSE from where it should be.

I dunno if that changes any advice thus far, but I would love it to be analyzed so i know I am not delusional :)

As I tried to explain in Post #6, do not use lat/long, i.e. geographic coordinates in Trainz Surveyor. They control in-game "sun orbits" but are not suitable for any sort of surveying, keywords: geodetic datum and map projection.

I fully understand that the underlying geodesy is complex stuff, but the implications are rather obvious, as you illustrate so graphically. One of the first things you learn in engineering is that your measurement results can only be as good as your measurement tools, and if a particular tool is not fit for purpose, your measurement will be misleading.

If you need details for accurate track layout in yard areas, use TransDEM UTM tiles. Here is another example of hi-res maps and ortho-images:

utm3dtiles08-800.jpg
 
Thanks GeoPhil. I do understand your point form post 6, was just presenting an example to ensure I was not missing something somewhere in my processes.

I fully understand that the underlying geodesy is complex stuff, but the implications are rather obvious, as you illustrate so graphically. One of the first things you learn in engineering is that your measurement results can only be as good as your measurement tools, and if a particular tool is not fit for purpose, your measurement will be misleading.

This I know in Real Life, and now know, the refinement I seek is not present in ts12:(

A few followup questions then, one of which I think I emailed you (maybe).

ON Export, does tdem have the capability to export lat-lon grid lines (magenta by default) instead of utm-foot lines?
Anyone know if GEarth can display UTM coordinates to coincide with Tdem's native system?
And finally, you sample GeoPhil, is that cut and paste imagery? Or does Tdem handle hi-res ortho-imagery and have that ability to tile it? (Even on a small experiment, I could not get it to export a hi-res reastered ortho image, it always downsized bitdepth wise)?

Yes, I may beat this issue to death, but that is how I grow to understand the tools as fully as I (believe) Desire, hammer away until I run out of questions, options or neurons.
 
Last edited:
ON Export, does tdem have the capability to export lat-lon grid lines (magenta by default) instead of utm-foot lines?
Unsupported, I'm afraid. Perhaps to discourage people to use Lat/Long Reader or one of its siblings. :wave:

Anyone know if GEarth can display UTM coordinates to coincide with Tdem's native system?
Yes, you can switch to UTM in the GE options. You can also download a kml script for a UTM grid overlay:
http://www.gelib.com/worldwide-utm-grid.htm

Be aware, we are talking UTM/WGS84 here. That's what TransDEM is using and that's what you will get from GE. However, UTM as a projection has been in use much longer, and you will find UTM variants with different geodetic datums, like UTM/NAD27 or UTM/ED50.

And finally, you sample GeoPhil, is that cut and paste imagery? Or does Tdem handle hi-res ortho-imagery and have that ability to tile it? (Even on a small experiment, I could not get it to export a hi-res reastered ortho image, it always downsized bitdepth wise)?
That is built-in functionality, the UTM tiles. These are ordinary Trainz objects, rather large ones, though, and their only purpose is to carry a large-scale map, plan or ortho-image texture. With 500m tile objects and 4096px textures you can resolve objects down to a gully cover. Go through all parts of the "Muengsten" tutorial in the TransDEM Trainz manual to see how this works. My example here shows four different data sources, 1:1000 plan, 1:5000 topo map and ortho-images from two different providers.

The way Trainz ground textures are designed, we can only use them with one colour per ground vertex. That limits resolution to 1 px per 5m for the 5 m baseboard grid. Good for up to 1:25,000 or 1:24,000 but no good for ortho-photos and other large scale material. That's where UTM tiles kick in.
 
Back
Top