TransDEM Forum

TransDEM News, Support, Hints and Resources
It is currently 19 Nov 2017 05:38

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Seamless Merging
PostPosted: 19 Mar 2016 18:40 
Offline

Joined: 05 Jan 2011 16:45
Posts: 1057
This tutorial shows how to accomplish seamless merging of route modules with TransDEM and T:ANE.

This feature is core functionality of TransDEM for Trainz since version 1.2, when TransDEM began to write native Trainz route files. It's briefly described in the TransDEM Trainz manual, but occasionally, TransDEM users encounter difficulties here. An illustrated tutorial may help.

Note: This will only work, if the following conditions are met:
  • Both route modules were created with TransDEM.
  • Both route modules reside in the same UTM zone.
  • Both route modules still have their World Origin objects exactly as positioned by TransDEM
  • The DEM data source for both modules is of same or similar quality (e.g. by taking it from the same provider and the same series)



Geo data sources for this example

In this example we use Canadian geo data.

Originally, I pointed directly to the Geogratis download-by-index addresses. Unfortunately, these download addresses tend to change. I therefore collected all geo data needed for this tutorial and put it into one place.

Download the geo data for this and related tutorials here: TutorialsCanadianGeoData.zip (56 MB)

Map sheet index is CTI-04_NTS-SNRC_Index_Prairies_300dpi_index.jpg. This is for orientation only.

For the tutorial we need the files at 082o03 and 082o04, for DEM, raster and vector map.

DEM source is CDED, 1:50,000. The 50K CDED DEMs always come as an eastern and western part. We merge them in TransDEM prior to any other action.

Raster data source is Toporama (for simplicity), 1:50,000.

Vector data is CanVec. The railway layer is named *_TR_1020009_1.shp.


First route module

We begin with 082o03 and load DEM, raster and vector map (railway layer only for vector). We get something like this (DEM shading on, transparency 45%, shading intensity 35%)

Image

We export the entire map – no export mask – to Trainz with the following settings:
  • Ground texture from raster map
  • Show UTM grid
  • Apply route filter for 7 baseboards (this is a mountainous area, and we want some depth.)
  • Trainz version T:ANE
  • No default fog
  • Map name “082o03”
  • Region “United States”

We also export the track, all default settings there.

We import the route with T:ANE CM and open it in Surveyor. We would normally start working on his route template now, but in this tutorial we are only interested in expanding further westward. Therefore we go to the western end of this route.

Image

On the minimap we can identify the baseboard grid (black), the UTM grid (purple), the Trans Canada Highway, the railway, “Johnson Lake” and part of a label that ends with “cite”. These will be our clues for merging with the next route module. (We will try to avoid numeric coordinates in this tutorial as far as possible.)


Expansion route module

To expand our route westward we will create the route module 082o04. For this we load DEM, raster and vector map into TransDEM and get this:

Image

We zoom to the eastern border, but are not able to spot the other half of the label “cite”. We are missing some geo data here. This can be explained. While the geo data sources 083o03 and 082o04 will merge seamlessly for DEM and raster map – the border is -115° 30' for both – Trainz routes are constrained by the baseboard raster. And the baseboard raster is bound to UTM when working with TransDEM. As only entire baseboards can be exported we were one short when exporting 082o03.

Image

To bridge the gap we merge 082o04 with 082o03 in TransDEM.

Image

Since we already have 082o03 as a route module in Trainz, we only need one additional baseboard. We create a rectangular mask which should encompass all of 082o04. Again we zoom in to the eastern border of 082o04. This time we find “Johnson Lake” and the other part of our label which now forms “Anthracite”. Remember, we already have “cite” in Trainz, we only need “Anthra” as the extra and this is how to position the mask:

Image

The entire export area will be this, as defined by the mask:

Image

We create a new Trainz route module with the same parameters as before and name it 082o04. We also export the tracks. We import this new route module with T:ANE Content Manager.


Merging

In Surveyor we open 082o03 again and will merge new 082o04 with it. (We could do it the other way round, only as long has both modules have proper TransDEM-placed World Origin objects. See other tutorial, if that's no longer the case)

In Surveyor we open the Merge window and select 082o04 as the route to merge with.

Image

In the background we identify 082o03. (It may take a while for Surveyor to paint all the baseboards.) In the foreground and mostly in red is 082o04. With the left arrow button we move 082o04 westward and also reposition the view.

Image

Then we zoom in.

Image

With the arrow buttons we position 082o04 to exactly match 082o03. We check the result by zooming in further. “Anthracite” has become a complete label. (The T:ANE Merge window shows us the baseboard grid for the existing module on the right, but not for he new module on the left.)

Image

To finish the merge we also have to merge the layers, one to one. After that we click the OK (checkmark) button.

We get this:

Image

Lets zoom in further:

Image

And change the viewing angle. There is a gap in the track and that's all we find. Remember, “cite” was in module 082o03 and “Anthra” in 082o04. There is no visible seam between the two. That's how it should be.

Image

In Surveyor we save the merged route as 082o03-04.


Post-Processing the World Origin in TransDEM

There is one last thing to do, but that is important. Merging in Surveyor butchers the World Origin, if there are two of them. It appears that the lat/long values in config.txt are retained from the original module (082o03 here), but the WO object itself is taken from the second module (082o04 in this example). This behaviour has been noticed since I started with TRS2004 many years ago and it never made sense. Therefore, TransDEM has a function to fix the WO. This is needed in case you want to modify the merged route in TransDEM, to add UTM tiles or vectors.

With T:ANE there is also a second problem with the World Origin. Surveyor may reset the lat/long values to the default for the region selected (United States in our example). Fortunately, there is a backup, the TransDEM info file. It also has the proper lat/long coordinates. TransDEM 2.6 tries to restore from there, if the config.grid values don't make sense.

We open route 082o03-04 for editing in Content Manager. Note that the exported folder name becomes “kuid <uid> <oid> 082o03-04”. This is new in T:ANE.

We call the Repair WO function in TransDEM (under the Trainz menu) select the route, “kuid 126773 100036 082o03-04” in my case, and apply.

Image

Message boxes will inform us about success or failure. Ours tell us, that TransDEM has restored the WO geographic coordinates from the info file and has relocated the WO object to baseboard [0,0]

Image
Image

In Content Manager we submit the edits.


World Origin object in the route

One last check. Where actually is our WO? For this we open 082o03-04 in Surveyor again and navigate to the WO, via the Environment menu and the Location tab. The WO, as palced by TransDEM will always be in the precise centre of baseboard [0,0] with Trainz World Coordinates [360,360]. (The Find WO function in Surveyor travel 10m onward and sets the “look-at” position to [360,350]. (Don't feel confused by the coordinate reading. X is Northing, Y is Easting, and the Northing axis is inverted.)

Image

Zooming out in stages, we find that our WO resides in the 082o03 half, hiding up in the mountains. That's no surprise because 082o03 with the route filter applied has a bit of a crescent shape and TransDEM locates baseboard [0,0] close to the middle.

Image
Image


Last edited by geophil on 13 Nov 2016 11:10, edited 1 time in total.
Download addresses have changed.


Top
 Profile  
 
 Post subject: Re: Seamless Merging
PostPosted: 08 Apr 2016 18:24 
Offline

Joined: 08 Apr 2016 07:47
Posts: 2
Hi

I am trying to go through "Seamless Merging" tutorial.
I have downloaded tutorial zip files 082o03 and 82o04, for DEM and raster map.

The link for the vector data that was given in the tutorial returns
Not Found
The requested URL /pub/canvec/50k_shp/ was not found on this server.


By continuing my search, I located in the following folder
Index of /pub/canvec/archive/canvec_archive_20130515/50k_shp/082/o
two files named "canvec_082o03_shp" and ""canvec_082o04_shp".

They do not generate the routes that were described in the tutorial.
Probably I failed to locate the required files.

Any suggestion what I can do next..

By the way I can export the both DEMs 082o03 and 082o04 with their respective Rasters into TANE.

Savas


Top
 Profile  
 
 Post subject: Re: Seamless Merging
PostPosted: 08 Apr 2016 20:26 
Offline

Joined: 05 Jan 2011 16:45
Posts: 1057
Yes, they have changed the distribution format.

The data is still there, you already found it:
http://ftp2.cits.rncan.gc.ca/pub/canvec ... 5/50k_shp/

You will need canvec_082o03_shp.zip and canvec_082o04_shp.zip.

Download and unpack.

These are the files to be opened in TransDEM:
082o03_33_0_TR_1020009_1.shp
082o04_25_0_TR_1020009_1.shp


Top
 Profile  
 
 Post subject: Re: Seamless Merging
PostPosted: 09 Apr 2016 17:11 
Offline

Joined: 08 Apr 2016 07:47
Posts: 2
Thanks for the help. Seamless Merging works fine...

Savas


Top
 Profile  
 
 Post subject: Re: Seamless Merging
PostPosted: 13 Nov 2016 09:29 
Offline

Joined: 13 Nov 2016 00:15
Posts: 1
All samples are 404 again.
Then how about to make videotutorial step by step on youtube or another videohosting?


Top
 Profile  
 
 Post subject: Re: Seamless Merging
PostPosted: 13 Nov 2016 11:13 
Offline

Joined: 05 Jan 2011 16:45
Posts: 1057
Thank you. I have put all geo data needed for this tutorial into one place now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Imprint

Powered by phpBB® Forum Software © phpBB Group