TransDEM Forum

TransDEM News, Support, Hints and Resources
It is currently 28 Mar 2024 23:19

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 13 Jun 2017 12:22 
Offline

Joined: 18 Mar 2017 13:21
Posts: 5
Hello all, as you can see from my username I am a big fan of the CFL, the national railway of Luxembourg. After some other projects I want to restart with making the whole country in Trainz. I made a good stretch of it back in the days of the original Trainz, using paper maps I ordered online. I drew a Trainz grid on it and worked from it by hand which was far from ideal, but still a lot of fun. That route is long lost in one hard drive crash or another, but now that I have Transdem I thought I should give it another go. With actual DEM data this time :)

So I downloaded some data from various websites. On the whole this did not really work very well. I could not even use Microdem to open most of the files I got. Until I came across the MNT 5m au format ESRI ASCII GRID data located here:
https://data.public.lu/en/datasets/bd-l-mnt5/

Among other things, it contains a file called w001001.adf which I am able to load into Transdem just fine. I can see the whole of Luxembourg with what looks to be the correct height map. However, when I export this as a whole or as a smaller portion, the result is completely flat in Trainz. (edit: I am using T:ANE).

Is this to be expected or am I doing something wrong? Please note I am not an expert on this at all, but I have managed to export maps succesfully into Trainz using Transdem from multiple sources so I am not a complete newbie :)

Edit: marked as solved and added Luxembourg to the title because of the great additional information added by geophile. It may help others looking for the same thing.


Last edited by CFLfan on 14 Jun 2017 10:22, edited 2 times in total.

Top
 Profile  
 
PostPosted: 13 Jun 2017 13:49 
Offline

Joined: 05 Jan 2011 16:45
Posts: 1463
Just had a look at the data. Unfortunately, elevation is measured in centimetres in this data set, not in metres! Very strange. TransDEM is currently not capable of converting this. You could try yourself, writing a script and convert the .txt file variant of the DEM. That's a bit of work, of course.

As I am currently working on TransDEM 2.6.2, mostly on DEM processing anyway, it should be possible to add an elevation unit conversion option somewhere. But it won't be ready tomorrow.


Top
 Profile  
 
PostPosted: 13 Jun 2017 17:18 
Offline

Joined: 18 Mar 2017 13:21
Posts: 5
Thanks so much for the reply! I know a little scripting/programming myself, so I will take a look at making a simple convertor. I will let you know how I get on with that.


Top
 Profile  
 
PostPosted: 14 Jun 2017 08:10 
Offline

Joined: 18 Mar 2017 13:21
Posts: 5
Alright, it seems I have imported the correct data into T:ANE now. I have still to check the correct scale better, but at first glance it appears to be fine.

I opened the .adf file in Transdem and exported that to a 1,8 Gb .xyz file. I wrote a little C++ program that went through that file line by line and changed the centimeters to meters by floating the dot two places forward and writing it back to a new .xyz for importing into Transdem.

I will do a second export by tracing only the railroad and setting a 4 or 5 baseboard margin, but for now I am pretty happy with the results. So thanks again for pointing me into the right direction geophil!


Top
 Profile  
 
PostPosted: 14 Jun 2017 08:26 
Offline

Joined: 05 Jan 2011 16:45
Posts: 1463
xyz is a good idea, indeed, and probably the most straightforward. Another option would have been the ESRI ASCII grid variant, in MNT5m_ASC\DHMPays\ASCII.

The file dem_5m.txt is the DEM in a text format - it should be renamed dem_5m.asc for TransDEM to recognize it. It also has all the elevations in centimetres.

You can treat that in a similar way to xyz. Skip the first few lines which form the header and skip every "NODATA" value. Divide all other values by 100. Write back as with xyz. Make sure your decimal sign is the point '.', not the comma ',' (may happen with localized Windows). The data lines are quite long, 12800 values each.


Top
 Profile  
 
PostPosted: 14 Jun 2017 08:50 
Offline

Joined: 05 Jan 2011 16:45
Posts: 1463
One other thing: When you pointed me to the DEM data, I also spotted the WMS. I tried it last night. It's quite comprehensive and works right out of the box.

To set it up, open the TransDEM WMS client and add a new server. Name it "Luxembourg" and set the URL to:
http://wmts1.geoportail.lu/opendata/service
(Won't work with a browser)
You'll get a broad selection of (simplified) base maps, topo maps, historic topo maps, aerial images and cadastral plans, including large scale.

Use "LuRef" (Gauss Luxembourg 1930) as the coordinate system.


Top
 Profile  
 
PostPosted: 14 Jun 2017 10:23 
Offline

Joined: 18 Mar 2017 13:21
Posts: 5
Excellent information! I will try most if not all of that myself tonight, thanks!


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: Google [Bot], SemrushBot [Bot] and 3 guests


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:  
cron

Imprint & Privacy

Powered by phpBB® Forum Software © phpBB Group