SRTM2. HOG. Microdem.

Barry

New member
SRTM2. HOG. Microdem.

I posted in the content creation forum about srtm2 data and 3dem but have found out a bit more and probably this forum is more suitable for the topic?

To summarise I make satellite sceneries for sailsimulator using srtm2 data. I used 3DEM, Virtual Terrain and the programs integrated dem data.

I know about hog and microdem but first tried exporting from 3DEM for the tga but error notice of not true tga colours, etc.

Downloaded Hog and 5 files and also latest Microdem from ftp site 49 meg.

Using Wewain's tutorial but not sure on some points.
I did a test tga from microdem and got it into Trainz but only to test Vista as not set up heights. etc.

Assuming you can join and crop in microdem, do you need to change to UTM as I do now for sailsim using 3dem.

Also Wewain tutorial mentions divide by 10 for 10 metres dem pixel so assume divide by 30 for srtm2 data?

Don't need Tiger data as era for my route will be 1801.;)

Barry

www.barrywright.clara.net


3dem srtm2 tutorial for sailsim, Blender, Gimp, gmax, etc
 
Last edited:
Assuming you can join and crop in microdem, do you need to change to UTM as I do now for sailsim using 3dem.
Yes. Original SRTM data is in a Plate Carrée pseudo projection which is of no particular use except for displaying the DEM. Scale for the east and north axis is different and varying and would cause major headaches if taken untransformed. UTM gives you a nice Cartesian coordinate system, suitable for terraforming with proper distances in all directions.

Also Wewain tutorial mentions divide by 10 for 10 metres dem pixel so assume divide by 30 for srtm2 data?
For the classic HOG approach it is up to you to provide HOG and Trainz compatible tga files. Compatible means dimensions as a multiple of 72 plus overlap as described in the HOG documentation. Compatible also means that scale must be 10 metres per tga pixel.

I have not used MicroDEM for years but I guess you can set the raster width when converting to UTM or in a separate step. Any divisor would be dependent on the original raster width. As SRTM data for the UK is 3 arc sec, the initial UTM raster width will probably be between 60 and 90 m.

Don't need Tiger data as era for my route will be 1801.;)

Unless I have missed important political changes in the last couple of days you won't be able to find Tiger data for the UK, not even for today. Tiger is a product of the US census bureau.

geophil
 
Yes. Original SRTM data is in a Plate Carrée pseudo projection which is of no particular use except for displaying the DEM. Scale for the east and north axis is different and varying and would cause major headaches if taken untransformed. UTM gives you a nice Cartesian coordinate system, suitable for terraforming with proper distances in all directions.


For the classic HOG approach it is up to you to provide HOG and Trainz compatible tga files. Compatible means dimensions as a multiple of 72 plus overlap as described in the HOG documentation. Compatible also means that scale must be 10 metres per tga pixel.

I have not used MicroDEM for years but I guess you can set the raster width when converting to UTM or in a separate step. Any divisor would be dependent on the original raster width. As SRTM data for the UK is 3 arc sec, the initial UTM raster width will probably be between 60 and 90 m.



Unless I have missed important political changes in the last couple of days you won't be able to find Tiger data for the UK, not even for today. Tiger is a product of the US census bureau.

geophil

Thanks (geo)phil.
-----------------------------------

I remember looking at hog and microdem etc when trainz came out years ago.
My reference to tiger data was more to explain that my era of interest was outside modern maps for texturing as regards any map texture data.

I think Microdem may be much updated now compared perhaps to years ago and possibly more automated?

Downloaded srtm2, which is then an hgt file.
Loaded this into microdem and and UTM seemed to be automatically checked?

Wewain's tutorial is excellent but a bit out of date c2004, with different layout of microdem and tabs, etc.

In the tutorial he divided by 10 with a pixels sixe of 18 or so.
Checked the pixel size of my created microdem file and 143.96 m. so no idea what to divide by.
Probably srtm2 averages 60 mile segmments approx.

Also can't find the min/max height from histogram in microdem as per tutorial.

Hog seems to work easily if you put the tga file in hog folder and the created gnd. file to same folder and appears to create all the tiles when replacing the named trainz gnd. tile.

Barry

P.S.. So for now will forget trainz satellite data based sceneries... unless more info comes to light with easy to follow instructions/tutorial for srtm2 data, microdem and hog .
 
Last edited:
In the tutorial he divided by 10 with a pixels sixe of 18 or so.
Checked the pixel size of my created microdem file and 143.96 m. so no idea what to divide by.
Probably srtm2 averages 60 mile segmments approx.

Also can't find the min/max height from histogram in microdem as per tutorial.

In your example, divide your pixel size by 14.396 to get an image size with the pixels equalling 10m. Be aware that this could result in a very large file - you may have to select a smaller area.

You can get the min/max height by choosing "Info" on the menu bar. The data you want is the "z-range".

Cheers

Richard

Edit You can check your new pixel size under "Info" also.
 
Last edited:
In your example, divide your pixel size by 14.396 to get an image size with the pixels equalling 10m. Be aware that this could result in a very large file - you may have to select a smaller area.

You can get the min/max height by choosing "Info" on the menu bar. The data you want is the "z-range".

Cheers

Richard

Edit You can check your new pixel size under "Info" also.

Thanks Richard.

Been having another try for a few hours but going around in circles.

Reset the options to show a lot more tabs and can now find info tab, and height histogram, etc.
Still puzzled over UTM.

Saved as UTM and it changed the colours, but shape was the same.
Cropped the Isle of Man from N54W005, about 40 miles, but saving as tga makes a huge file and limit to size that it saves and as you say may need to make smaller sections..


Barry
:)
 
Just to tie this up yet another go and generated the Isle of Man.
However rows of spikes in parts and sea raised about 10 or more tiles but set the sea to 0 and microdem read -5 to 707 metres height for Isle of Man
Also did not set to UTM as not sure about that.
Would need the map to auto delete the dozens of tiles surplus as generated the full cropped oblong of the microdem map and would need to read that up but you can delete them manually.

But enough for now I think and at least I know how microdem and hog now work.


If anybody interested I read Wewains dem tutorial on his Trainz site and thanks Wewain.



http://freepages.rootsweb.com/~wewain/trainz/homepage.htm

Barry
 
Last edited:
Bit more yet. Another go. Interpolated as UTM and set height -5 to 707 metres.
The height dosn't show in histogram but took the reading before interpolating as UTM.

Mountains in Trainz quite smooth this time, with no spikes. Went to top of Snaefel and read 694.
Sea as set as -5.

Trouble is can't remember if height is feet or metres in trainz so may have to reset that. ;)

But making progress I think with a 30 to 40 mile island in Trainz in an evening.

Barry
:)
 
Trainz heights are in meters. Even if you set your route measurements to Imperial measure, the height stays in meters.

:cool: Claude
 
Just a quick check doing it my way. Same DEM data source, converting to UTM and resampling to 60 m raster width. Min/max height -1/613 m. MicroDEM should yield similar results.

(Overlaid with MS Virtual Earth map in screenshot)


BTW: The UK introduced the metric system with O/S grid coordinates as early as 1936. :)
 
Last edited:
Thanks Claude for details on height.
Just checked Snaefell on road map at 2034 feet.
which is near what geophil mentions.
So my 707 metres is a wee a bit out.

Isle of Man looks nice in screenshot link overset with map.

Used to go on the steamer(ship) day trips etc, but a that was good few years ago now.
On topic too as made one in Blender.

Barry
 
Last edited:
The 1:50k O/S map tells us 621 m (http://streetmap.co.uk). I have shaded this map with the SRTM DEM and also drawn 50 m contour lines derived from DEM data. Compare to the map contour lines and you will notice the DEM is accurate. I'm quite sure some parameter was set inappropriately for the MicroDEM manipulation giving you an extra 100 metres.

Snaefell screenshot
 
The 1:50k O/S map tells us 621 m (http://streetmap.co.uk). I have shaded this map with the SRTM DEM and also drawn 50 m contour lines derived from DEM data. Compare to the map contour lines and you will notice the DEM is accurate. I'm quite sure some parameter was set inappropriately for the MicroDEM manipulation giving you an extra 100 metres.

Snaefell screenshot


Just found out where my reading of 707 metres came from.
The histogram was reading the full hgt section not just the cropped section of the isle of Man.
reading the height from a different panel its 617 and minus 2.
Gradually finding things out.
http://www.barrywright.clara.net

Many Thanks

Barry
 
Last edited:
I have added a small text tutorial to my site which includes most of the details from my posts on this thread for creating satellite data based terain in Trainz using Microdem and Hog.

This joins the other tutorials for making content with Blender and satellite data based sceneries for the Stentec sail simulator. The Stentec satellite tutorial is not valid for Vista.

The Trainz section includes exporting from blender the 3DS file WITH texture into gmax, and the hog amd microdem details mentioned in this thread.

As with all my tutorials they are mainly as a reference and back-up for myself, but perhaps parts of them may be of interest to others, as a search on the internet finds them.

http://www.barrywright.clara.net/index.html

Barry
 
Barry, I'd suggest that you look at using the Piglet utility that is built into HOG. I've discussed it many times and there may even be a few posts in the new forums here. It has a number of advantages like automatically determining the height scale and horizontal scales from the DEM data and preserving the max height resolution of the DEM - converting to the usual imagefile, chroma or greyscale, effectively buckets the height range into 250 or so steps which creates terracing if the range is large - the Piglet output image uses thousands of steps in the height range.

The primary disadvantage is you have to convert the DEM to an ascii xyz format with the x and y coordinates based on a UTM grid and heights in meters (floats not integers). MicroDem can do the conversion (I think it's a one step process now) which for SRTM DEMS requires a resampling as they are based on a long/lat grid of 1x1 arc secs or 3x3 arc secs. Conversion is not always the same as resampling as this is often just a conversion of the long/lat coordinates to utm coodinates which leaves a varying grid spacing while resampling involves setting up a new uniform rectangular grid.

I find this to be the best way to use HOG/MicroDem to produce terrain for Trainz.

Bob Pearson
 
Barry, I'd suggest that you look at using the Piglet utility that is built into HOG. I've discussed it many times and there may even be a few posts in the new forums here. It has a number of advantages like automatically determining the height scale and horizontal scales from the DEM data and preserving the max height resolution of the DEM - converting to the usual imagefile, chroma or greyscale, effectively buckets the height range into 250 or so steps which creates terracing if the range is large - the Piglet output image uses thousands of steps in the height range.

The primary disadvantage is you have to convert the DEM to an ascii xyz format with the x and y coordinates based on a UTM grid and heights in meters (floats not integers). MicroDem can do the conversion (I think it's a one step process now) which for SRTM DEMS requires a resampling as they are based on a long/lat grid of 1x1 arc secs or 3x3 arc secs. Conversion is not always the same as resampling as this is often just a conversion of the long/lat coordinates to utm coodinates which leaves a varying grid spacing while resampling involves setting up a new uniform rectangular grid.

I find this to be the best way to use HOG/MicroDem to produce terrain for Trainz.

Bob Pearson

Bob would have to go into that.
In Microdem you change the format to UTM, same as when I used using 3dem for the the Sentec sailsim. This is with the hgt file from srtm2.
Seems to load OK in hog. but havn't checked the accuracy so far as Isle of Man about 30 miles, although got the height right second time round.

Saw a mention of the piglet but bit amazed that I got this far generating terrain.
Tried Hog years ago when it first came out but couldn't understand it or file wouldn't load, but forget which now. It was only through the help on this thread that I got things to work.

Will look into it and many thanks.

Barry
 
Hog puts in it's own textures in to trainz surveyor which become available in the texture panels in Surveyor.

However if I uploaded a route (most unlikely however to upload routes again to the DS as my routes will be sepcific to about 1800 in the UK), possisbly these textures would not carry forward unless you had Hog installed.

Also there appears to be little interest on the trainz forums now in Microdem and Hog, compared to the previous forums, so as far as I am concerned, being able to create a route in Trainz for the terrain, in 10 minutes of 30 miles or so, is all I need, should I wish to continue with it, and will leave it at that.
 
Last edited:
Microdem has an option in 'Modify>Map area' called 'set map pixel size'. Just set this to 10 and forget about all that histogram option and dividing etc.

Also, microdem lets you save files as .TGA. No need to convert.

Jonny.
 
Thanks Jonny, have been dividing by 10 and setting to 10, so will try just setting to 10.

Notice there are SWBD files in srtm2 data section which include shape files etc.
Downloaded them but no idea if usable in Hog or how to use them for overlay, rivers, etc, for UK.
Hog has the two sections to enter the overlay but only Tiger data?

Hog tutorial only mentions Tiger data for USA.
Same applies to automatically cropping in Hog for UK. data, as takes a while deleting manually surplus 2000 tiles;)

Barry
 
Thanks Jonny, have been dividing by 10 and setting to 10, so will try just setting to 10.

Notice there are SWBD files in srtm2 data section which include shape files etc.
Downloaded them but no idea if usable in Hog or how to use them for overlay, rivers, etc, for UK.
Hog has the two sections to enter the overlay but only Tiger data?

Hog tutorial only mentions Tiger data for USA.
Same applies to automatically cropping in Hog for UK. data, as takes a while deleting manually surplus 2000 tiles;)

Barry

Hog wouldn't know how to process data in vector form. It can only deal with raster data and completely relies on the user for proper relative coordinates, i.e. for congruent (matching) tga images.

As I mentioned before, TIGER is an invention by the US census bureau and does not have a British counterpart. TIGER data became popular for Hog simply because MicroDEM happens to be able to read it.

Those shp file available for SRTM denote waterbodies which they used to postprocess the DEMs, leveling the surface for wide rivers, lakes and oceans. See this example (contents of the shp file in light blue):



geophil
 
Back
Top