Ts Dem Importer Release

Discussion in 'Content Developer's Area' started by Tomas9970, Dec 9, 2019.

  1. Tomas9970

    Tomas9970 Well-Known Member

    Joined:
    Oct 7, 2018
    Messages:
    924
    Likes Received:
    879
    First things first I do have to apologise for not working on it for some time but I simply didn't know how to do certain things however I have managed to resolve these issues and the tool is finally here and available.
    I had to cut down my goals a bit but I believe that it does not affect the purpose of this tool.
    I hope that it does not give me a bad reputation.

    What is it
    The TS DEM importer is a tool designed to import high resolution elevation maps into Train simulator to provide better landscape quality for route building.

    Limitations
    There are two main limitations releated to the DEMs.
    1. They must use meters as units. Not degrees.
    2. All DEMs that you are trying to import must use the same DEM datum.

    Requirements
    This program requires GDAL from the OSGeo4W package so you must have that installed.

    How to use
    1. import all of your landscape tiles using Train simulator's built in landscape import tool. This will tell the DEM importer what area do you want to import.

    2. Backup your route. I have tested this tool quite a bit and it haven't failed but that does not mean that it's perfect.

    3. Convert your route's origin to the coordinate system used by your DEM.
    A good DEM datum converter can be found here.
    Here are some DEM datums that I have used:
    USGS 1 meter DEM datum: EPSG:26910
    Alaska 5 meter DEM datum: EPSG:6393
    Austria 10 meter DEM datum: EPSG:31287

    4. Launch the TS DEM importer from the command line with arguments.
    The correct syntax is "TS dem importer simple.exe" <route_dir> <dem/txt> <x> <y>
    <route_dir>
    Location of your route. Wrap it in quotes if it contains any spaces.
    Example: "C:\Program Files (x86)\Steam\steamapps\common\RailWorks\Content\Routes\0349f149-8da0-40db-b7fc-d45290c5f7dd"

    <dem/txt>
    Location of the DEM that you want to import or a text file containing locations of multiple DEMs (one per line). Wrap it in quotes if it contains any spaces.
    Example: "E:\Landscapes\myDEM.tif" or "E:\Landscapes\list.txt"

    <x> <y>
    Coordinates of your route's origin converted to the datum of your DEM.
    Example: 505608 413000

    5. Let it finish. It will take a while. All the processing is done in a temporary location and then applied to your route so a crash of the tool won't damage your route in any way.

    6. Open your route in the Train simulator route editor and you should see a new landscape.

    About the files
    This is pretty self explainatory but I'll document it anyway. The "binaries" zip file contains just the compiled executable to be used by the end user. The "source" zip file contains the full C# source code of the program in case anyone wants to take a look at it (Warning, it's a bit messy:D).

    I hope I haven't missed anything and that this small documentation is usable.
     

    Attached Files:

    • Like Like x 4
  2. ceejay#9369

    ceejay#9369 New Member

    Joined:
    Dec 30, 2020
    Messages:
    26
    Likes Received:
    1
    I will check this out. It might be of some use to me, To get some high res DEM into TS for Australian and some others I have in mind. The DEM for Australia that can be used by default in the editor, is pretty useless, Being able to use the 5 Meter or 1 Meter is more useful.
     

Share This Page