Finding Latitude & Longitude on a Trainz route in TRS2019

You can enter the longitude and latitude by entering the Edit Environment Tab and then tapping on the Environment - Location icon (the World Globe). You will see three icons below the calendar; the icon with the spanner allows you to enter the Lat/Long for your Route (Google Earth displays Lat/Long at the base of the map). The middle symbol will take you to the Lat/Long point set for the geographical region you have entered for your map. However, you need to be aware that the Lat/Long that is displayed is approximate only. You are much better off loading the Lat/Long appropriate to your Route. Hope this helps.

Regards
Bob
 
Is it possible to find Latitude & Longitude on a Trainz route in TRS2019?

From my understanding this is only possible if the route creator has set a Lat and Long for the route - it is not a mandatory requirement of routes.

The Lat and Long can be set in the Environment Tools, as described by Bob above, or they can be set in a Region Asset that has been assigned to the route. If no Lat & Long have been assigned to the route then it will have a default Lat and Long that places it in Berlin (why Berlin I do not know).
 
Thanks guys for the info. The map I'm referring to was created in TransDEM and has specific global coordinates. I enabled "Show Camera Location" so that the X & Y coordinates show in the lower left corner.

What I'm trying to do is convert these coordinates to lat/ long coordinates. The CDE calculator only shows converting lat/long to x,y. Is there another method or calculator that can do this?

Thanks,

Joe
 
...The map I'm referring to was created in TransDEM and has specific global coordinates. I enabled "Show Camera Location" so that the X & Y coordinates show in the lower left corner.

What I'm trying to do is convert these coordinates to lat/ long coordinates ... Is there another method or calculator that can do this?

Thanks,

Joe
If as you say the route was created with TransDem then the world origin should be defined and setup correctly. There is at least 1 lat/long reader on the dls that when placed on the route will give the lat/long of that location directly, <kuid2:70337:23016:10> Lat-Long reader. It's a scenery item so can be moved around to where ever you need the lat/long of a location on the map. Please note there is NO fixed relationship defined between the Trainz world global metric coordinate system as stored in the map files and the lat/long coordinate system used to locate a place on the earth. The user must "geo reference" the map by assigning the lat/long coordinates of the map's world origin. Any lat/long coordinates in Trainz can only be as accurate as the geo referencing performed by the user. I have not investigated the Lat-Long reader so I can't attest to it's accuracy of converting distances in meters into changes in lat/long.

That's the easy way.

The way you're asking about can be approximated by the following but please note you need to know the x and y coordinates of the map's world origin in order to calculate the lat/long based on the x,y coordinates shown in the lower left corner of the screen. Note by default the map's world origin coincides with the world global origin at the NW corner of the 1st baseboard but it can be moved by positioning the world origin asset anywhere on the map and providing the lat/long coordinates of that place. TransDem does this geo referencing for you if it was used to create the map. It positions the world origin asset at some point on the map and defines the lat/long coordinates of that position. So 1st you need to determine the x,y coordinates of the world origin asset in order to calculate the lat/long position of any place on the map. This applies to any map where the world origin asset is not positioned at the Trainz world global origin.

The xy values shown in the bottom left corner are the x,y coordinates of the cursor in meters from the Trainz world global coordinate origin which is the NW corner of the 1st baseboard placed in the route. This never changes regardless of where the map's world origin is placed. To determine the x,y distance in meters from the cursor to the map's world origin you subtract the x,y values of the map's world origin from the x,y coordinates shown to get the x,y distance from the map's world origin. There are various methods that you can use to convert the x,y deltas in meters into deltas in decimal degrees of latitude and longitude and then apply those deltas to the lat/long of the map's world origin to obtain the lat/long of the location.

I think the x direction is e-w and y is n-s. So e-w distance is x shown - x of map world origin and n-s distance is y shown - y of world origin.

A 1st approximation for the latitude is divide the n-s distance in meters by 111133 m/deg to get the difference in latitude in decimal degrees. Apply that to the latitude of the world global coordinate origin to get the latitude of your location.

A 1st approximation for the longitude is divide the e-w distance in meters by 111413 x cos(Lat) m/deg to get the difference in longitude in decimal degrees. The cos(Lat) is the cos of the mean latitude between the map's world origin and your location. Apply that difference to the longitude of the world global coordinate origin to get the longitude of your location.

Trainz defines the map's world origin in degrees and decimal minutes. The above conversions give deltas in decimal degrees. Convert from one to the other before applying the deltas. Also be careful south of the equator to make sure the latitude diff is applied correctly. Delta latitude that crosses the equator may need extra thought too.

The CDE calculator only shows converting lat/long to x,y.
I think the CDE calculator only converts from degrees, minutes, seconds or from decimal degrees to the degrees and decimal minutes that Trainz uses to define the map's world origin.

Bob Pearson
 
Last edited:
Thanks guys for the info. The map I'm referring to was created in TransDEM and has specific global coordinates. I enabled "Show Camera Location" so that the X & Y coordinates show in the lower left corner.

What I'm trying to do is convert these coordinates to lat/ long coordinates. The CDE calculator only shows converting lat/long to x,y. Is there another method or calculator that can do this?

Thanks,

Joe
Easy, being TransDEM I assume you have some actual towns you are re-creating. Search for that town in Google Earth and you will find it's Lat/Long and elevation at the bottom of the map. Simply enter the data as I explained yesterday. Simple.
Regards
Bob
 
For TANE SP3, I edited in the Lat / Lon coordinates into the World Origin marker for my own route located in North East USA. I used the instructions given , on the right way to enter it.
The outcome was turning some of the trees and vegetation to a lighter green, which doesn't work in this region. It doesn't make sense. If anything, it might have made sense if they were darkened a little more.
I deleted the World Origin marker and put the coordinates into the map file on the config and it made no difference. I then zeroed out the co-ordinates and it made no difference.
Long story , short........The lighter shade was extreme enough that I ended up having to reskin the affected veg / trees back to the right shades, so that it looks right during the daily sun cycles. For me, it was a big waste of time, and I regret doing it at all. I also saw that this could be a bug in SP3. I didn't get a response on that issue, so I guess no one knows for sure.
 
What Trainz uses as Lat-Long and what TransDEM uses are two things with the same name but not much else in common. especially as you move further and further away from the World Origin. Long story short, because the Earth is approximately spherical and baseboards are really flat, the further away from the point of origin, the greater the distortion. So for small maps, the difference is not too bad, for larger maps, eventually the distortion becomes so great that it causes more confusion than help. If you're building a map without any TransDEM input, the Trainz coordinates are fine. It is if you try to reconcile TransDEM generated maps with Trainz coordinates that you run into issues. Pick one and stay with it.

By removing the World Origin, objects that adjust based on seasons and latitude will display differently since now they won't know where they are. For this, differences in meters, even kilometers, are not as important.
 
What Trainz uses as Lat-Long and what TransDEM uses are two things with the same name but not much else in common. especially as you move further and further away from the World Origin. Long story short, because the Earth is approximately spherical and baseboards are really flat, the further away from the point of origin, the greater the distortion. So for small maps, the difference is not too bad, for larger maps, eventually the distortion becomes so great that it causes more confusion than help. If you're building a map without any TransDEM input, the Trainz coordinates are fine. It is if you try to reconcile TransDEM generated maps with Trainz coordinates that you run into issues. Pick one and stay with it.

By removing the World Origin, objects that adjust based on seasons and latitude will display differently since now they won't know where they are. For this, differences in meters, even kilometers, are not as important.

What I don't understand is after removing the world origin and then plugging in the right coordinates into the map file, that the light shading didn't correct itself. Putting the world origin back in , trying various coordinates ( including all zero's) didn't make any difference either......so I left it deleted. Damage was done and without a solution.
 
The "light shading" (as you call it) of vegetation is probably what I would call "seasonal effects" that is built into some plants, specifically SpeedTrees but there may be others. It has nothing to do with the actual value of the latitude you enter but it only depends on the North/South value and the Date entered into the Environment Tools in TANE and TRS19. It appears that only the 4 seasons are recognised.

If the seasonal appearance of the vegetation does not match the colours you were expecting for, say winter or spring, then I would suspect that you not using the correct local species of plant or the creator of that plant has not set the season colours correctly.

If by "light shadng" you are referring to the different levels of light during the passage of a day (your post did mention "so that it looks right during the daily sun cycles") then that is a product of the diurnal cycle colour settings. You will need to adjust those to the levels that you prefer but this is very much an individual preference issue. See https://online.ts2009.com/mediaWiki/index.php/How_to_Use_Environment_Tools

My thoughts.
 
Thanks Guys for all of your help. The reason for this thread is, I'm attempting to merge two TransDEM generated maps but I no longer have the UTM tiles, so I thought I might be able to align the merge using Lat/Long coordinates.

I plan to look into the above referenced suggestions to see what I can do.

Thanks again,

Joe
 
Unless the joint between the two maps happens to fall on a baseboard edge and also aligns both horizontally and vertically, your merging will be less than ideal. There are no partial or overlapping mergers. North-south and east-west adjustments are in whole number of baseboards. Good luck.
 
The "light shading" (as you call it) of vegetation is probably what I would call "seasonal effects" that is built into some plants, specifically SpeedTrees but there may be others. It has nothing to do with the actual value of the latitude you enter but it only depends on the North/South value and the Date entered into the Environment Tools in TANE and TRS19. It appears that only the 4 seasons are recognised.

If the seasonal appearance of the vegetation does not match the colours you were expecting for, say winter or spring, then I would suspect that you not using the correct local species of plant or the creator of that plant has not set the season colours correctly.

If by "light shadng" you are referring to the different levels of light during the passage of a day (your post did mention "so that it looks right during the daily sun cycles") then that is a product of the diurnal cycle colour settings. You will need to adjust those to the levels that you prefer but this is very much an individual preference issue. See https://online.ts2009.com/mediaWiki/index.php/How_to_Use_Environment_Tools

My thoughts.

Thanks for the response. I forgot to say that Summer is the only season I'm using right now. The date is mid-summer and I keep the same date. Some of the effected vegetation I'm using does not do seasonal changes.
So, what I'm saying is that the vegetation color was fine before I put the lat / lon coordinates into the World Origin marker. After doing that, it wasn't.
 
Last edited:
hello everyone, I was wondering if there were any V/line Passenger coaches, i need some to complete my N sets
these are the coaches I need:
Maroon, Grey & Purple Standard V line coaches.
PTV; Purple and Silver with a Yellow underline.
Thankyou for your support
 
hello everyone, I was wondering if there were any V/line Passenger coaches, i need some to complete my N sets
these are the coaches I need:
Maroon, Grey & Purple Standard V line coaches.
PTV; Purple and Silver with a Yellow underline.
Thankyou for your support

Can you give us a Latitude, Longitude and Altitude for those - it would help us locate them :hehe:
 
Can you give us a Latitude, Longitude and Altitude for those - it would help us locate them :hehe:


Good reply Pware, however he might try using TransDEM to locate them.

Getting back to the original thread, I tried some of the above referenced methods to locate lat/long coordinates, and in one instance I ended up somewhere in the Pacific Ocean. i Must have done something wrong.

I've decided to redo the map, where I no longer have the the UTM tiles, and merge it.

I really appreciate the responses to this thread. Thanks again,

Joe
 
If you let TransDEM paint the landscape on the terrain, you don't really need the tiles unless you need a more detailed view. Plus by having it add the rail splines from a route map, you'll have the basic outline of where the tracks should be placed. Then it's just a matter of editing.
 
...

I think the x direction is e-w and y is n-s. So e-w distance is x shown - x of map world origin and n-s distance is y shown - y of world origin.

...
Just to bring the thread back to the original topic I'll make a correction to the above quote. I checked and the x coordinate is the north-south coordinate and is positive going south from the origin at the NW corner of the 1st baseboard in the map. The y coordinate shown on the lower left corner of the screen is the east-west coordinate and is positive going east from the origin. Trainz internally in the map files uses a left-handed coordinate system but the display is in the nomal right-handed. But it won't change the basic arithmetic for finding distances or converting them to differences of lat/long.

In TransDem created maps the World Origin asset is placed at the center of the 1st baseboard TransDem creates so it has an x,y position of (360.00,360.00) and TransDem sets the correct lat/long for that position.

jrfolco
Thanks Guys for all of your help. The reason for this thread is, I'm attempting to merge two TransDEM generated maps but I no longer have the UTM tiles, so I thought I might be able to align the merge using Lat/Long coordinates.

I plan to look into the above referenced suggestions to see what I can do.

Thanks again,

Joe
I think you might be able to do it but the baseboards won't necessarily match up because as noted the Trainz baseboards and world global coordinate system have no direct correspondence to the real world latitude and longitude coordinates. What I'm trying to say is the DEM based elevations in the 2 routes might be displaced horizontally by up to 1/2 baseboard (360 meters) because Trainz will only merge on whole baseboard boundaries.

If the TransDem generated world origins are still correct for both maps then you can mark the same latitude and longitude position(s) in each route. But they will only result in a seamless match if one of the UTM coordinates of one edge in one route matches up with the corresponding UTM coordinate of an edge in the other route and the other edges match up or are out by some multiple of 720.0 meters (UTM coordinates are essentially meters for practical purposes). The TransDem Trainz version manual has a short section on merging TransDem generated route.

If your routes overlap at the merge edge you can still get a seamless merge (of the dem data at least) by deleting the overlapped baseboards in one route before the merge but only if both maps are in the same UTM zone and the original edges differ by some multiple of 720.0 meters.

Reviewing the utm_transdem_info.txt file for both routes that TransDem puts in the route's map folder should give you some indication if a seamless merge is possible or not.

Bob Pearson
 
Last edited:
Back
Top