World Origin

Jayco-man

Member
I am interested to know more about the world origin. I have read that dericm said that it was not working correctly and now with the update it is suppose to be fixed, but when I get a coordinate in Google Earth and then go to my route the coordinate is not the same. This should be a spot on process and my dem was put in before the update, so is there a way to reset the world origin to make it show correct coordinates? Thanks in advance for any help or advice.
 
I spoke with Jaycoman and his DEM world origin says that it is in Fredricksburg VA (near Wash DC) but his route is from Williamstown WV and is in actuality centered @ 350 miles west of there

I told him that he does not need to alter the world origin lat/long in the route config file ... but he seems to insist that he needs to reset the lat/long to be exactly in his area ... I told him that the World Origin just sets the time of day, the angle that the sun rises and sets, and weather in the Northern hemisphere, rather than in Bolivia in the southern hemisphere, or the India/Ukrainian 78 lat/long
 
CAS Transdem uses it for various purposes. The trainz gnd file does not use lat, long for position coordinates. It uses a straight meter grid on a plane surface. Internally there is no direct connection between the two. For the general case Trainz will show lat, long correct near the world origin only if it is accurately located. Alos the furthur away you go from the orgin the less accurate it is. If you depend on Trainz to show accurate lat, long coords it is up to you to locate the trainz world origin as accurately as possible and be aware of this. Far from that point I would not assume tne coords would match exactly with google world or other such data. Transdem doesn't assume that - it locates the world origin accurately when it generates the map files so it has a single ref point to connect the trainz coordinate grid with lat, long coords of the ref geod it is using. This is strictly for when it has to read the files again. Transdem has its own conversions to determine lat, long coords and doesn't rely on Trainz for that.

Rest of what you said is what Trainz uses it for internally.

Bob Pearson
 
Last edited:
So he can leave his route config file alone ... and does not need to alter the lat/long numerals in the config file ?

What effect would it have on the DEM if you altered the lat/long numerals in the config file ?
 
The World Origin determines what values are shown in the Lat-Long reader as well as other objects that can display that data. While the further away you are from the W-O, the more the discrepancy between the actual value and the displayed value, the difference is a bit moot, considering the overall accuracy of all geographic coordinates. Unless you are modeling very large areas or whole countries, I wouldn't worry too much.
 
I just left a message with Geophil last night and his reply this morning was, There is a bug in T:ANE which resets the World Origin geographic coordinates to the default of the selected Trainz region. TransDEM 2.6 is aware of this bug and refers to the TransDEM info file instead which has a copy of the proper coordinates. Open that info file in a text editor and check against your Google Earth readings. The only thing is I cant seem to find this file, I've look in T:ane and TransDem. I left him another message about were to look for that file. I will let you know when I find out.
 
Thanks I know it was fix with the last update, but not sure how to update it. I know you can or they wouldn't give you the option to edit it. I don't think I could find the right coord. cause it is stuck in a mountain. I really don't want to reinstall my Transdem data and start all over, cause I have a lot of work done. If its just a matter of deleting and add another W.O somewhere and add the new cords to it would be easy.
 
I can't even find my world origin birdbath/sundial ... not that I really need to ever find it ... I have hills and valleys, that is all that matters
 
So he can leave his route config file alone ... and does not need to alter the lat/long numerals in the config file ?
Personally I don't care what he does and no one is saying he has to do anything. If he wants to read accurate lat, long coordinates to match some geographical location using tools currently available in the game then he should position the WCO as accurately as he can but that's up to him. If he is interested in having in game environment effects match the geographical location of the route then he might reposition the WCO to match that location but again that's up to him.

What effect would it have on the DEM if you altered the lat/long numerals in the config file ?
It will have no effect at all on the DEM - if by DEM you mean the terrain built into the map files. DEM specifically refers to the digital elevation model data that is used to develop that terrain. It's just a specific type of source for height data used by the route developer.

Internally the game stores this in the gnd file as x, y, z rectangular coords referenced to the northwest corner of the 1st baseboard placed in the map. Units are meters but internally for precision reasons (beginning with TRS2006 due to the increase in route size) x and y coords are stored as a combination of whole baseboards units of 720m and a "local x and y" in meters from the nw corner of the local baseboard. You are free to place a WOC anywhere on the map and specify a lat, long location for that point. It has no effect on any coordinates stored in the gnd file or any future objects or baseboards added to the route.

Bob Pearson
 
Last edited:
Thanks I know it was fix with the last update, but not sure how to update it. I know you can or they wouldn't give you the option to edit it. I don't think I could find the right coord. cause it is stuck in a mountain. I really don't want to reinstall my Transdem data and start all over, cause I have a lot of work done. If its just a matter of deleting and add another W.O somewhere and add the new cords to it would be easy.
In Surveyor main menu->edit environment->location (mid button on left) -> world orgin tools are located on this panel.

GeoPhil knows for sure but I'd be careful about moving the WOC around since Transdem needs a precise location on the map and the lat and long location in the coordinates of the geod it used to create the terrain.

Bob Pearson
 
Last edited:
I went back and read the help in Transdem Trainz program and there is a proceedure explained in there to relocate a missing or misplaced WOC. You need the source files you used to create the map so if you still have them you can probably save what you have. I just got Roland's latest update last month but looking at the version I just checked I haven't updated the program yet. Something to add to my list of things to do today. In any case I'd be interested in hearing how you make out.

Good luck,
Bob Pearson

PS If you don't need to add base or map tiles to add in developing your layout or you will not be extending with new baseboards created using Transdem then there is really no reason that requires you to relocate the WOC. Unless you want it for other things as noted above. In this case accuracy is not as critical. Also changing the values in the config does not reposition the WOC object itself. It only changes the lat, lon coords associated with that position on the route. Use the tools in surveyor if you need to move it to another position on the route.
 
Last edited:
This is what I received from Geophil today, The info file is one of the files TransDEM creates when generating a route for Trainz, in the route folder.
It's called <route name>_transdem_info.txt

As you will import the whole route folder with Content Manager, the info file will be included. And when you open it in CM for editing later, the info file will be exported as well.

I'm not sure whether you will be able to restore the proper geographic coordinates for the WO in Surveyor. It may not be possible because of that bug. But for TransDEM purposes, the info file will suffice.
I forgot to tell him that the W.O. is suppose to be fixed now with the last update, I thank I will get back with him and let him know and see what he says.
 
When you made your DEM, it had hills and valleys, that accurately represented your entire route, from end to end ... It came with lat/long numerals in the config file ... why do you want to change these numerals, on a DEM that is working ?

You need not change anything
 
Ok I'm finally getting to the end of this I hope. I found the file that Geophil told me about. The cords in that file is supposed to be the cords that was supposed to be put in the map but was not working correctly in T:ane. I put those cords in G.E and it took me to that point which is the same place the W.O was put, but just has the wrong cords in it. I sent him another text to see if I can just edit the W.O and reset and I should be good. Keep your fingers crossed. I kind of understand what your talking about but if this works it will make a world of difference, because lets say if I want to put in the roundhouse in the yard. I can go to G.E and get the cords and then use the lat/long reader and find the same point in T:ane and whala. Those cords in that file put me in the correct location I'm suppose to be in.
 
Last edited:
@Jayco-man: Seems to be working out for you. Really no need to worry about having to toss out the map because the World Origin gets messed up. It only effects external conversion to lat, lon coordinates and is easily fixed. For TransDem to work with an existing mapfile you need to be pretty accurate. For you own placement of objects how accurate you have to make it is up to you. Nice to know TransDem stores the info in a separate file.


When you made your DEM, it had hills and valleys, that accurately represented your entire route, from end to end ... It came with lat/long numerals in the config file ... why do you want to change these numerals, on a DEM that is working ?

You need not change anything
CAS you missed just about everything I wrote. Changing the WOC location - the only lat, lon values in the config - will not effect the hills and valleys you see in the game one bit. In Trainz there is no direct connection with the terrain data stored in the map files (.gnd file) and the location for the WOC that you see in the config.txt file.

If the WOC location has been corrupted or is missing or just points to the wrong location (not changed from default location) then there are several valid reasons, that have been mentioned above, why you might want to change it. And doing that won't change any of x,y,z positional and height data that is stored in the mapfiles. That is the data that actually specfies the hills and valleys and all the rest of the terrain you see rendered in the game and that system uses the northwest corner of the 1st baseboard placed in them map as it's origin.

Off topic: Cas, I haven't kept up with the various PRR routes. Have any included the mainline track thru Mt Union area of PA?

Bob Pearson
 
Last edited:
and then use the lat/long reader and find the same point in T:ane and whala. Those cords in that file put me in the correct location I'm suppose to be in.
I'm afraid it won't be "whala" (interesting spelling :D). The reason is, the Trainz world is flat, a plane, as Bob Pearson has already explained in posts #4 and #10.

Geographic coordinates as expressed in latitude/longitude mark a position on a spherical shape instead, the common model of Mother Earth. Now take an orange (our Earth), peel it, and try to flatten the peel. The peel will stretch and tear, and you will get your fingers wet. Obviously, it's not an easy task, not without losses. Surveyors and map makers call such flattening attempts a "projection". There are quite a few of those. And half of TransDEM is about map projections. What the projections all have in common is to try to keep the losses (wet fingers) to a minimum. The losses are called "error". Similar to Trainz, map projections also have a world origin. And the closer you stay to the world origin, the smaller the error.

Now, the map projection in TransDEM is called UTM/WGS84. It's the most common one in the field where we are working here. Like all other map projections, it has a a planar Cartesian coordinate system, and like most others, coordinates are in metres. This makes it rather easy to map UTM coordinates to Trainz World Coordinates (refer to Bob's posts). Simply add an offset and invert a sign, and you are done. But that offset needs a concrete value and that's where the Trainz World Origin comes in. TransDEM "misuses" the WO to define that offset for its own purposes. It should be noted that the WO, as set by TransDEM, will always be slightly off, when interpreting its lat/long coordinates. That's because TransDEM positions the WO exactly at the center of the central baseboard of a route, at Trainz World Coordinates [360,360]. It will then set the geographic coordinates (lat/long) for this. Since the resolution of lat/long in config.txt is quite limited, there will be a rounding error. Nonetheless, TransDEM will be able to figure out the precise value. To summarize, a Trainz route created with TransDEM will always be in UTM projection. With the Trainz WO properly in place (or with the TransDEM info file as a backup), TransDEM will have all the projection parameters, needed for future maintenance.

On the other hand, we have the Trainz' internal lat/long coordinates. We already have learned, these are quite irrelevant to the inner working of Trainz and Surveyor in particular. Lat/long define the solar orbit (In the Trainz world, the sun rotates around the earth), and should affect lighting, but they are not used to locate objects. (Objects are positioned with the metric Trainz World Coordinates, see above.) Again, since the Trainz world is flat, Trainz also needs a map projection to associate a lat/long reading to a given point on a Trainz baseboard. We don't know about that projection. What we can figure out, it does not appear to be UTM/WGS84, but something different. Lat/Long-Reader (and similar tools) read the Trainz lat/long, because that's the only geographic coordinates the tools have access to.

Since we have different projections there will be a discrepancy between Lat/Long-Reader (unknown projection) and UTM as assigned to Trainz World Coordinates, Martin has pointed this out in post #5. There is an old thread in this forum that gives some figures about the magnitude of that discrepancy. For bigger routes and further away from the WO it may matter indeed (independent of the inaccuracy due to rounding for the TransDEM-placed WO itself).

However, a TransDEM-based routed shouldn't have the need to refer to Lat/Long-Reader and its siblings. Built-in functionality in TransDEM with topo maps for ground textures or aerial images on UTM tiles and particularly vector data is intended to give you the means to find exact geo locations in your Trainz route.
 
Last edited:
I'm afraid it won't be "whala" (interesting spelling :D). The reason is, the Trainz world is flat, a plane, as Bob Pearson has already explained in posts #4 and #10.

Geographic coordinates as expressed in latitude/longitude mark a position on a spherical shape instead, the common model of Mother Earth. Now take an orange (our Earth), peel it, and try to flatten the peel. The peel will stretch and tear, and you will get your fingers wet. Obviously, it's not an easy task, not without losses. Surveyors and map makers call such flattening attempts a "projection". There are quite a few of those. And half of TransDEM is about map projections. What the projections all have in common is to try to keep the losses (wet fingers) to a minimum. The losses are called "error". Similar to Trainz, map projections also have a world origin. And the closer you stay to the world origin, the smaller the error.

Now, the map projection in TransDEM is called UTM/WGS84. It's the most common one in the field where we are working here. Like all other map projections, it has a a planar Cartesian coordinate system, and like most others, coordinates are in metres. This makes it rather easy to map UTM coordinates to Trainz World Coordinates (refer to Bob's posts). Simply add an offset and invert a sign, and you are done. But that offset needs a concrete value and that's where the Trainz World Origin comes in. TransDEM "misuses" the WO to define that offset for its own purposes. It should be noted that the WO, as set by TransDEM, will always be slightly off, when interpreting its lat/long coordinates. That's because TransDEM positions the WO exactly at the center of the central baseboard of a route, at Trainz World Coordinates [360,360]. It will then set the geographic coordinates (lat/long) for this. Since the resolution of lat/long in config.txt is quite limited, there will be a rounding error. Nonetheless, TransDEM will be able to figure out the precise value. To summarize, a Trainz route created with TransDEM will always be in UTM projection. With the Trainz WO properly in place (or with the TransDEM info file as a backup), TransDEM will have all the projection parameters, needed for future maintenance.

On the other hand, we have the Trainz' internal lat/long coordinates. We already have learned, these are quite irrelevant to the inner working of Trainz and Surveyor in particular. Lat/long define the solar orbit (In the Trainz world, the sun rotates around the earth), and should affect lighting, but they are not used to locate objects. (Objects are positioned with the metric Trainz World Coordinates, see above.) Again, since the Trainz world is flat, Trainz also needs a map projection to associate a lat/long reading to a given point on a Trainz baseboard. We don't know about that projection. What we can figure out, it does not appear to be UTM/WGS84, but something different. Lat/Long-Reader (and similar tools) read the Trainz lat/long, because that's the only geographic coordinates the tools have access to.

Since we have different projections there will be a discrepancy between Lat/Long-Reader (unknown projection) and UTM as assigned to Trainz World Coordinates, Martin has pointed this out in post #5. There is an old thread in this forum that gives some figures about the magnitude of that discrepancy. For bigger routes and further away from the WO it may matter indeed (independent of the inaccuracy due to rounding for the TransDEM-placed WO itself).

However, a TransDEM-based routed shouldn't have the need to refer to Lat/Long-Reader and its siblings. Built-in functionality in TransDEM with topo maps for ground textures or aerial images on UTM tiles and particularly vector data is intended to give you the means to find exact geo locations in your Trainz route.

Hello, sir --
Very insightful, indeed!!! :udrool:
Ish
 
On a slightly different but related topic, the stored values in the World Origin of an existing map don't survive a save.
TANE 81324 74 60-000.JPGTANE 81324 75 00-000PG.JPGTANE 81324 WO not saved.JPG
I entered N 45 30.000 W 75 00.00
First it displayed N 45 30.000 W 74 60.000
When I gave a slight nudge to the Reader, the display changed to the correct N 45 30.000 W 75 00.00
I saved and reopened the map and the edited value had reverted to N 52 27.00 E 13 17.999 (actually W 13 18.000 since my original nudge was still in play.)
Did it again in case I didn't save but got the same result.
 
... I saved and reopened the map and the edited value had reverted to N 52 27.00 E 13 17.999
This appears to be a bug in T:ANE, still there, even in build 81296. I reported it quite a while ago. T:ANE resets the WO lat/long to the default values of the selected region.
 
Back
Top