.
Page 1 of 2 12 LastLast
Results 1 to 15 of 20

Thread: Finding Latitude & Longitude on a Trainz route in TRS2019

  1. #1
    Join Date
    Nov 2006
    Location
    United States of America, Pennsylvania, Murrysville
    Posts
    1,144
     

    Default Finding Latitude & Longitude on a Trainz route in TRS2019

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

    Thanks
    Joe


  2. #2
    Join Date
    May 2010
    Location
    Australia, ACT, AMAROO
    Posts
    834
     

    Default

    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
    Bob Cooper

  3. #3
    Join Date
    Dec 2011
    Location
    USA Florida and Illinois
    Posts
    1,110
    Blog Entries
    1
     

    Default

    Quote Originally Posted by jrfolco View Post
    Is it possible to find Latitude & Longitude on a Trainz route in TRS2019?

    Thanks
    Joe
    This page may help you;
    https://cdetrainz.com/tutorials_lati...onversion.aspx
    If it's not broke, don't fix it.


  4. #4
    Join Date
    Nov 2006
    Location
    Australia, NSW, Sydney
    Posts
    7,654
    Blog Entries
    3
     

    Default

    Quote Originally Posted by jrfolco View Post
    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).
    TRS19 Platinum Edition build 111951

  5. #5
    Join Date
    Nov 2006
    Location
    United States of America, Pennsylvania, Murrysville
    Posts
    1,144
     

    Default

    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


  6. #6
    Join Date
    Nov 2006
    Location
    United States of America, South Jersey
    Posts
    2,050
    Blog Entries
    1
     

    Default

    Quote Originally Posted by jrfolco View Post
    ...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 by RPearson; May 1st, 2021 at 04:06 PM.
    TRAINZ-UTC-TRS04-TRS06-TC1&2-TC3-TS09-TS10-TS12-TANE(TEG)-TMR17-TRS19
    Member since 6-14-2002

  7. #7
    Join Date
    May 2010
    Location
    Australia, ACT, AMAROO
    Posts
    834
     

    Default

    Quote Originally Posted by jrfolco View Post
    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
    Bob Cooper

  8. #8
    Join Date
    Nov 2006
    Location
    United States of America, New York, Allegany
    Posts
    1,769
    Blog Entries
    1
     

    Default

    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.
    T:ANE Standard SP2 to SP3
    TRS 2012 build 61388

  9. #9
    Join Date
    Nov 2006
    Location
    was in the Netherlands
    Posts
    5,351
    Blog Entries
    1
     

    Default

    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.


    70337:
    TRS19 Platinum, build 110491 SP2, Win10 Pro 64 bit, i7-7700 3.6GHz 16 GB, GTX 1070 Ti

  10. #10
    Join Date
    Nov 2006
    Location
    United States of America, New York, Allegany
    Posts
    1,769
    Blog Entries
    1
     

    Default

    Quote Originally Posted by martinvk View Post
    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.
    T:ANE Standard SP2 to SP3
    TRS 2012 build 61388

  11. #11
    Join Date
    Nov 2006
    Location
    Australia, NSW, Sydney
    Posts
    7,654
    Blog Entries
    3
     

    Default

    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/...ironment_Tools

    My thoughts.
    TRS19 Platinum Edition build 111951

  12. #12
    Join Date
    Nov 2006
    Location
    United States of America, Pennsylvania, Murrysville
    Posts
    1,144
     

    Default

    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


  13. #13
    Join Date
    Nov 2006
    Location
    was in the Netherlands
    Posts
    5,351
    Blog Entries
    1
     

    Default

    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.


    70337:
    TRS19 Platinum, build 110491 SP2, Win10 Pro 64 bit, i7-7700 3.6GHz 16 GB, GTX 1070 Ti

  14. #14
    Join Date
    Nov 2006
    Location
    United States of America, New York, Allegany
    Posts
    1,769
    Blog Entries
    1
     

    Default

    Quote Originally Posted by pware View Post
    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/...ironment_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 by JimDep; May 2nd, 2021 at 04:15 PM.
    T:ANE Standard SP2 to SP3
    TRS 2012 build 61388

  15. #15
    Join Date
    Nov 2006
    Location
    Australia, NSW, Sydney
    Posts
    7,654
    Blog Entries
    3
     

    Default

    Regarding the merging, there is a Wiki Page dealing with this process and its many pitfalls. See https://online.ts2009.com/mediaWiki/...o_Merge_Routes
    TRS19 Platinum Edition build 111951

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •