PDA

View Full Version : Terrain using hgt files.



kvr fan
11-25-2007, 10:33 PM
Has anybody made a route anyplace in north america specificly canada using the hgt files?
I have a route about 85% finished in MSTS of the canadian pacific Railway when they pushed the rails over the great divide ,down the kicking horse and then over the selkirk mountains to Revelstoke.It is the CP mountain division. This is a period style route dated 1884,1885 following the original rail line down the 4.4% grade from the great divide to Fields,up over Muskeg Summit,on to Rogers Pass and down through the original Glacier track and then the Loops at Loop cr and then on to Revelstoke.I started the same route in rail simulator, hoping it might be better. In the MSTS route I used the dem files downloaded from the canadian govt site. In Rail Simulator I used the HGT file. I am very dissapointed the the hgt terrain. The terrain is not sharp and crisp like the dems.Meaning I see no indication of the many small creeks that or steep canyons that the track passes thru or over...In lower kicking horse canyon east of golden,in MSTS the canyon is very narrow ,just room for the tracks and the river. Terrain goes almost straight up from the roadbed,doesn't look like that using the hgt files.In some places the mountains look like big marshmellows piled up.Any thoughts on this...I have been trying to get an answer to see why we cant use the dems...

TrainMan_112
11-25-2007, 10:54 PM
Sorry, I'm not sure what HGT files are, but, perhaps, did you obtain them from a poor source?

wmalder
11-26-2007, 12:13 AM
The HGT files are derived from Radarsat data. For the U.S. they're at a 10m resolution, roughly what is available in DEMs (Though DEMs can go down to about 3m if I remember right). HGT for the rest of the world is at 30m. That's disappointing because I have DEM data at 10m for much of BC that I don't know how to integrate into RS. I've looked high and low for conversion software that will take DEM data and output HGT format with no luck (I'm not trained in geomatics so I don't know how a lot of this stuff works).
It would be nice if someone like John at Digital Rails could write a converter. It would be so much nicer to use 10m data.

kvr fan
11-26-2007, 12:14 AM
The .hgt files are what the rail simulator uses to create terrain with.example N50W118.hgt The Dems are digital elevation maps that I downloaded from the canadian govt source. The hgt files come from the rail Simulator recomended site.They are SRTM data
ftp://e0srp01u.ecs.nasa.gov/srtm/version2

NoMoreTrains
11-26-2007, 03:54 AM
So far in my testing this is the best I've come up with for Canadian DEM in KRS. The image below is from GeoBase 092I06 (SRTM N50W122) and is in the Spences Bridge area of British Columbia. I've also been testing some GeoBase DEM for the Bayview area in Ontario.

https://www.trainsim.com/vbts/Attachments/up1/126658.jpg

https://www.trainsim.com/vbts/Attachments/up1/126660.jpg

EDIT: Added a second pic because it was so darn purdy! :P

OTTODAD
11-26-2007, 08:24 AM
Now that is the sort of minimum scenery quality I expect from a Train Simulator and if RS can not provide it then perhaps MS-TRAINS-2 will ? ;-)

O t t o

P.S.: Set Mountains ( 00000001 ) in the *.trk file which might clear the distant haze ?

TrainMan_112
11-26-2007, 10:29 AM
Those pics aren't far off. Not all of the Rockies are jagged cliffs.

NoMoreTrains
11-26-2007, 12:55 PM
>
>Now that is the sort of minimum scenery quality I expect from
>a Train Simulator and if RS can not provide it then
>perhaps MS-TRAINS-2 will ? ;-)
>
>O t t o
>
>P.S.: Set Mountains ( 00000001 ) in the *.trk
>file which might clear the distant haze ?
>
>

Hi Otto. Not sure I understand your post. Those shots are from KRS, not MSTS.

OTTODAD
11-26-2007, 01:08 PM
Sorry, Ray, I missed reading the KRS in your post, getting used to it now being called RS, not being able to take my eyes of these pictures ! ;-)

You should post them in the RS Screenshots forum !

O t t o

wmalder
11-26-2007, 01:30 PM
That's beautiful. Now my question is, is that SRTM data in .hgt format or what DEM data do you mean? I understand that SRTM is essentially a type of DEM so that may be my confusion. My understanding is that the SRTM data available for BC is 30m resolution. If the images above are 30m then it might not be too bad.
In addition, the SRTM data that I was able to find had lots of shadows and holes that I needed to 'repair'. I don't believe that I got my data from GeoBase so I'll have to look there. Did you have to fill the holes or did it come adjusted?

NoMoreTrains
11-26-2007, 01:58 PM
>That's beautiful. Now my question is, is that SRTM data in
>.hgt format or what DEM data do you mean? I understand that
>SRTM is essentially a type of DEM so that may be my confusion.
> My understanding is that the SRTM data available for BC is
>30m resolution. If the images above are 30m then it might not
>be too bad.
>In addition, the SRTM data that I was able to find had lots of
>shadows and holes that I needed to 'repair'. I don't believe
>that I got my data from GeoBase so I'll have to look there.
>Did you have to fill the holes or did it come adjusted?

Hi Bill. The data I used to create the above images was downloaded from GeoBase in CDED *.dem format. I downloaded the 1:50,000 (30m) data and converted it to SRTM *.hgt format to make it compatible with KRS. So far the terrain I've created is from a single *.dem file (092I06) and it seems to have come in to KRS without any holes. However, I still need to test importing data across a couple of *.dem files to see how that works.

kvr fan
11-26-2007, 01:58 PM
The SRTM data is in the .hgt format,tis a type of dem. The dem I used on my original msts route was the digital elevation maps downloaded from the govt site. I am also getting a lot of holes in mountain terrain that is not acceptable in certain places..Havent figured out how to repair them yet.I have looked for conversiuon files from .hgt to .dem but cant find anything . I can find conversions from .hgt to .dems.
I posted the same query in the UK train sim forum but havent got any type of answer yet..

wmalder
11-26-2007, 02:15 PM
>Hi Bill. The data I used to create the above images was
>downloaded from GeoBase in CDED *.dem format. I downloaded
>the 1:50,000 (30m) data and converted it to SRTM *.hgt format
>to make it compatible with KRS.

This is the part I'm curious about. How did you convert .dem to .hgt? What program did you use? I've look far and wide but I don't know how to use a lot of these programs. Can it be done with MicroDEM? If so, how?

>So far the terrain I've
>created is from a single *.dem file (092I06) and it seems to
>have come in to KRS without any holes.

I don't believe that .dem data is generated from RadarSAT so it's not likely to have the artifacts that SRTM raw data would have.

It now seems that this is getting interesting. There's a whole new set of tools we're all going to need and need to learn to use.

BTW, the data I downloaded from NASA had holes in it that I fixed with a little program that I'm going to have to re-find. I just updated to a new computer and a lot of the little things I used to have easy to hand I'll have to put back on this when I can find them again.

kvr fan
11-26-2007, 05:17 PM
Here is a couple of pictures,one from MSTS and the other from Rail Simulator. Both approx the same location in lower kicking horse pass east of Golden. Note the big hole in the terrain in the Rail Simulator one.

TrainMan_112
11-26-2007, 05:43 PM
Is there only ONE place to get the .hgt files? If not, try a different source.

OTTODAD
11-26-2007, 05:47 PM
I prefer the MSTS version, but no doubt a lot of work has yet to be done to make importing of DEM or similar data into RS produce scenery like your first examples !

Has anybody tried importing GOOGLE EARTH maps scenery like Carlo did for the Merlin BERNINA route he is working on ?

O t t o

https://www.trainsim.com/vbts/Attachments/up1/126685.jpg

https://www.trainsim.com/vbts/Attachments/up1/126686.jpg

kvr fan
11-26-2007, 06:11 PM
I haven't found any other site other than the one that Rail Simulator said to use,.Also tis version 2 that is required. Maybe only the best SRTM .hgt files are for the US.Up here in Canada we get whats left over..lol

TrainMan_112
11-26-2007, 06:14 PM
Well, I live in Alberta on CP's Crowsnest Sub too, so it's a shame if realistic terrain can't be imported. I would bring this up with some of the RSDL staff or KujuAdam and see if they have any other advice, or if there are any other useable sources out there.

TrainMan_112
11-26-2007, 07:09 PM
> I haven't found any other site other than the one that Rail
>Simulator said to use,.Also tis version 2 that is required.
>Maybe only the best SRTM .hgt files are for the US.Up here in
>Canada we get whats left over..lol
Can you tell me where the information as to which site to use for the .hgt files to use is? I'm just as interested in this as you. As soon as the North American version comes out, I'm buying it.

I'm sending a PM to KujuAdam about this.

kvr fan
11-26-2007, 10:14 PM
This is an excerpt from the KRS editor manual that comes with the Simulator

You can obtain SRTM data from ftp://e0srp01u.ecs.nasa.gov/srtm/version2 in the form of .hgt files. Place the .hgt files into this directory: ...\Program Files\Rail Simulator\DEM\SRTM\ You will need to create this folder if it is not already present.
EA and Rail Simulator Developments cannot guarantee future access to this site.


Nice of them to let us know that access to this site might change.....

TrainMan_112
11-27-2007, 12:14 AM
>This is an excerpt from the KRS editor manual that comes with
>the Simulator
>
>You can obtain SRTM data from
>ftp://e0srp01u.ecs.nasa.gov/srtm/version2 in the form of .hgt
>files. Place the .hgt files into this directory: ...\Program
>Files\Rail Simulator\DEM\SRTM\ You will need to create this
>folder if it is not already present.
>EA and Rail Simulator Developments cannot guarantee future
>access to this site.
>
>
> Nice of them to let us know that access to this site might
>change.....

Have you tried re-insterting that area? Maybe a glitch? I take it that .HGT files aren't very popular.

wmalder
11-27-2007, 02:26 AM
First I have to apologize, SRTM is Shuttle Radar Topography Mission data not RadarSAT. There are several versions available depending on where in the world you live. The SRTM data for Canada is actually 90m. Some of the data is available in a repaired form with holes fixed but I'm not sure what areas are available. Certainly, not all data is fixed.

I've been working with some data with a little program called DEMEditor. It's not necessarily the most sophisticated one out there but it does allow you to edit individual cells in the data and for holes I find that I can hand repair some by averaging between known points. It does tend to flatten some details but it's fairly coarse at 90m anyway. The copy of DEMEditor I'm using has a readme that says it can be downloaded from (EDIT: checked the link and it's gone now. I saw several possibilities by searching for DEMEditor on the web.)

I would suppose the reason RSDL and its predecessor Kuju picked SRTM data is that it is free and is available worldwide. That's all well and fine but it would be nice if better data could be used where available. Canadian DEM data is available in 30m and 10m resolutions for some areas. That is much better than 90m.

The question I have is to NoMoreTrains from an earlier post. He has claimed to have converted *.dem data at 30m to *.hgt format and I'd dearly like to know how.

AdamL
11-27-2007, 02:54 AM
Hi Everyone,

Nice thread you've got going here. Loving the initial shots, although I think the second comparison of Kicking Horse Pass is a bit off! one shot shows the finished KHP route in MSTS while the second shows only the first stage of imported terrain into RS, not exactly an fair compasion :(

The deal with .HGT files though - As Rail Simulator ships it currently only supports this format for getting DEM data into the game. However, I say 'currently' because as others have pointed out its the most widely available world wide and its free.

With RSDL going forward it is now the case that if you let us know what data format your interested in using, we'll add compatibility to our to-do list.

RSadam

NoMoreTrains
11-27-2007, 03:33 AM
>Here is a couple of pictures,one from MSTS and the other from
>Rail Simulator. Both approx the same location in lower kicking
>horse pass east of Golden. Note the big hole in the terrain in
>the Rail Simulator one.

Hi Cecil. Hope you don't mind me reposting your MSTS shot for comparison purposes.

Your MSTS shot ...

https://www.trainsim.com/vbts/Attachments/up1/126723.jpg


And my DEM imported into KRS for the same area ...

https://www.trainsim.com/vbts/Attachments/up1/126724.jpg

Obviously mine is rough compared to your finished MSTS shot, but it was just a quick import for me to see how the .dem conversion to .hgt compared.

keber
11-27-2007, 04:30 AM
>With RSDL going forward it is now the case that if you let us
>know what data format your interested in using, we'll add
>compatibility to our to-do list.


Something that supports DEM data, like Microdem DEM.
I have terrain data available as 3D points and I can convert them into DEM with Microdem program. So support for that kind of DEM data would be nice.

OTTODAD
11-27-2007, 09:35 AM
Hi Ray !

How about GOOGLE EARTH Maps / Scenery, which have been used by some to import terrain scenery into MSTS a while ago and I believe have also been used by others with FSX ?

Not sure whether it is 2D / 3D or not ?

O t t o

kvr fan
11-27-2007, 11:30 AM
Good morning Ray
That picture of kicking horse pass using your .hgt format looks good. No holes in it.Do you think I could convert the dems I used in MSTS for the route inro the hgt format to use in rail Simulator.What program did you use.

BN_9402
11-27-2007, 01:05 PM
10M and 30M DEM .tif files like DEMEX uses for MSTS for one...

BNSF Conductor

kvr fan
11-27-2007, 02:43 PM
Hi Adam
I cant do anything to finish this terrain in kicking horse pass as you can see there is a hole in the terrain that goes right down to where the track would be laid. From Revelstoke to this area I have 4 or 5 holes like this .

MikeSimpson
11-27-2007, 04:43 PM
>Hi Adam
> I cant do anything to finish this terrain in kicking horse
>pass as you can see there is a hole in the terrain that goes
>right down to where the track would be laid. From Revelstoke
>to this area I have 4 or 5 holes like this .

If you download Blackart v4.02 from www.terrainmap.com (it is freeware), it can apparently fix 'holes' in SRTM terrain (at least according to their Help file).

I only downloaded it yesterday, so have no experience of the program but you may find it is useful in your endeavours.

Mike

TrainMan_112
11-27-2007, 06:37 PM
As far as I know, .hgt is merely a different format of terrain information, no? Can't a conversion be made from DEM formatted files to .hgt format?

TrainMan_112
11-27-2007, 08:17 PM
>As far as I know, .hgt is merely a different format of
>terrain information, no? Can't a conversion be made from DEM
>formatted files to .hgt format? With this, we could get the sharp definition of the DEM terrain maps in .hgt format.

NoMoreTrains
12-01-2007, 05:19 PM
Hey again guys. I haven't forgotten about this topic, just haven't had any real news to pass along. After working with my original importing methods earlier I hit a rather large stumbling block. As the 1:50,000 Canadian CDED's are in two parts (east and west) but both within the same SRTM area I've been having difficulty getting both halves into KRS without seams.

However, today I've been playing with another method.

Again for easy reference, here is the original MSTS image Cecil posted. (resized for better comparison to my images)

https://www.trainsim.com/vbts/Attachments/up1/126993.jpg


And my original import efforts.
https://www.trainsim.com/vbts/Attachments/up1/126989.jpg


And finally my latest importing effort.
https://www.trainsim.com/vbts/Attachments/up1/126990.jpg


As you can see the latest attempt doesn't yield quite as high a detail level as my first try, however so far I have been able to get the DEM into KRS with no holes and no seams on the east/west halves of the DEM. Next up is to try adding neighbouring DEM's.

If I am ever able to find an acceptable method of getting the CDED's into KRS I'll post it here. :-)

NoMoreTrains
12-01-2007, 11:04 PM
Well I fixed the resolution issue ... below is my latest imported CDED data. Now I'm off to test a bordering DEM file. :-)

https://www.trainsim.com/vbts/Attachments/up1/127011.jpg

NoMoreTrains
12-02-2007, 02:45 AM
More progress. I've been working on testing crossing SRTM boundries.

The first image shows the terrain boundry with my initial SRTM, and the second image shows the same terrain after I created SRTM data for the neighbouring area.

https://www.trainsim.com/vbts/Attachments/up1/127020.jpg

https://www.trainsim.com/vbts/Attachments/up1/127021.jpg

This testing is still all in the general area of Kicking Horse Pass in British Columbia. I think I may be getting really close now! :-)

TrainMan_112
12-02-2007, 12:48 PM
Is it difficult to make the conversion from DEM to .hgt format? When KRS is released in North America, I'm planning to create several routes using digital terrain data.

TrainMan_112
12-02-2007, 07:46 PM
Also, is there a large difference in sharpness when using converted DEM files?

NoMoreTrains
12-02-2007, 08:08 PM
>Is it difficult to make the conversion from DEM to .hgt
>format? When KRS is released in North America, I'm planning to
>create several routes using digital terrain data

>Also, is there a large difference in sharpness when using
>converted DEM files?

Hi guys. In reply to the first question, no it is not difficult to convert the DEM. It just takes a little more time to do the prep work.

For the second question, I have found no difference at all in resolution or quality between the tests I did using the original GeoBase CDED files and the conversion method I'm using now.

All tests seem to be sucessful now. I have complete DEM in place between Golden, British Columbia and Lake Louise, Alberta. I think I'll create a new thread with instructions on converting CDED to SRTM as soon as possible.

One more shot to show what I've been up to, this one from a point west of Lake Louise, AB.

https://www.trainsim.com/vbts/Attachments/up1/127077.jpg

TrainMan_112
12-02-2007, 08:13 PM
That last shot looks great! Quite realistic too!

kvr fan
12-02-2007, 10:15 PM
Hi Ray
Those shots are fantastic.They are more like it. I am running in to more problems where the cdems in my old Selkirk route showed lots of creeks and gullies. They dont show up using the .hgt files. Looking forward to reading your tutorial on the conversions. Looks like it will be worth the time.
You know I posted this same question at the same time I posted it here at the UKtrain sim forum and didn't get any replies at all.

TrainMan_112
12-03-2007, 12:32 AM
KVRFAN, how much different is your 1800s version of Kicking Horse Pass from the modern route? If it's not much different than the modern one, I'd like to mod it so we have both a modern version and an old version. If KRS catches on and forms a community to back it in North America, I'm planning to create most of the CP secondary routes in Southern Alberta and South-Eastern BC, such as the CP Crowsnest Sub, CP Cranbrook Sub, and maybe the CP Moyie Sub. I'd also like to take a stab at the Thompson and Cascade Subs.

wmalder
12-03-2007, 01:04 AM
>how much different is [the]1800s version of Kicking
>Horse Pass from the modern route?

Actually, it's quite a bit different than the modern route. The Spiral Tunnels weren't completed until 1909 or thereabouts. Until that time the ruling grade from the short tunnel (first out of Field) to the top of the hill (about at Hector) was 4.5% for much of the distance (ostensibly the heaviest gradient for any mainline in North America). If you've ever driven between Field and Wapta Lake you'd have been driving on the old roadbed (except for the old bridge, apparently preserved for history). The story I've heard is that the first locomotive down the grade ran away, crashed and killed the crew. To prevent these occurances the line had 'switch-outs' akin to truck runaway lanes on highways. These were set to off the main-line and were set to through only when the train crew indicated by whistle that the train was under control. The CPR's only articulated locomotives (0-6-6-0 R1a's)were built to help on this grade. These were later rebuilt into 2-10-0 Decapods.

kvr fan
12-03-2007, 11:13 AM
Also west from Field the line ran over Muskeg Summit and down from Rogers pass it went around where old Glacier House was and then thru the Loops at loop creek and then down to Revelstoke.. This is how I built the route in MSTS.

NoMoreTrains
12-03-2007, 02:41 PM
Hi guys. I've been working on the conversion tutorial, but I hit a little snag. The area I chose to use for the tutorial (Revelstoke, BC) caused some problems. It appears that Revelstoke is on the border of Northings 50 & 51 as well as an RS tile border. Apparently there is an issue where RS may crash when attempting to create terrain in such cases using certain DEM sources. I am investigating this issue further, but in the meantime I will redo the tutorial based on another area where the issue doesn't occur. I am hoping to have the tutorial done and posted by weeks end, but I'll be busy with work for the week so not sure when I'll have the time to work on it. ASAP though, I promise! :)

TrainMan_112
12-03-2007, 05:42 PM
>Hi guys. I've been working on the conversion tutorial, but I
>hit a little snag. The area I chose to use for the tutorial
>(Revelstoke, BC) caused some problems. It appears that
>Revelstoke is on the border of Northings 50 & 51 as well
>as an RS tile border. Apparently there is an issue where RS
>may crash when attempting to create terrain in such cases
>using certain DEM sources. I am investigating this issue
>further, but in the meantime I will redo the tutorial based on
>another area where the issue doesn't occur. I am hoping to
>have the tutorial done and posted by weeks end, but I'll be
>busy with work for the week so not sure when I'll have the
>time to work on it. ASAP though, I promise! :)

So Revelstoke is on the boarder of two DEM tiles, AND two Rail Simulator texture tiles? Lol, what a coincedence, eh? Anyways that's strange that it would crash the sim.

Also, is there a program which can convert DEM files or is it done manually?

Hope to hear good news about this! Good luck!

NoMoreTrains
12-04-2007, 02:15 PM
After receiving some input from a sister thread I posted on UKTS regarding this matter, I have found an acceptable interim solution to the DEM problem around Revelstoke. Initally, after trying my converted CDED data and suffering consistant crashes with it I tried the NASA supplied SRTM for the area. While it is horrible data (horrific resolution and holes galore) it at least worked. However, I have now tried converting my CDED data at 3 arcsecond (my original conversion was at 1 arcsecond). Low and behold, the 3 arcsecond conversion works in RS just fine. The resolution isn't quite as nice as the 1 arcsecond conversion, but it looks far better than the NASA data for resolution and has no holes in it. :) For most other areas though, I am still able to use data converted at 1 arcsecond so it only means some areas have lower resolution DEM. Honestly, the difference isn't that noticable and once the terrain is refined, textured and scenery added it will likely be pretty much indistinguishable.

NoMoreTrains
12-07-2007, 03:05 AM
Well the tutorial is finished. I decided rather than present it as a post on the forums to create the tutorial as a PDF. It's a 2.7MB file ... now I just need to figure out how and where it can be hosted.

kvr fan
12-08-2007, 12:37 PM
Thats great news Ray. looking forward to getting that tutorial...Thats the main knock I have on Rail Simulator is the terrain,other than still trying to figure out how to export a engine into Rail Simulator...