I have found a very nice thing when I was looking around the net for a heightmap of Poland.
It basically tells how to get a heightmap of ANY PART of the world ! (and to make a bitmap heightmap)
To make it even better, it's not the physical map with defined height layers (where larger and larger actual height difference is still a single "layer"), but the actual heightmap. And form what I read with about 90 meter resolution ! (so it may be even useful for getting the city heightmaps)
Here is the link:http://gearsforums.epicgames.com/showthread.php?t=607176
And below are the instructions re-written by me according to my own experience and suited for Simutrans (after all Simutrans map is not unreal map or whatever).
-----HOW TO MAKE HEIGHTMAP FOR ANY PLACE IN THE WORLD
in 3 difficult steps EDIT:
Seems like I was a bit too hasty with writing the tutorial. Looking at the link provided by RanDrag (below), I learned that I missed the possibility to merge data files before making the heightmap.
So if you intend to make simutrans map out of multiple data files, AND you have lots of RAM, then the tutorial at http://www.tt-forums.net/viewtopic.php?f=29&t=27052
(provided by RanDrag) is probably better, since you don't have to "sew" the maps together.
However, when I tried to do my map this way, I "killed" my computer. After almost half hour of HDD drill I gave up and hard-resetted. Seems my RAM is hardly enough to handle 18000x12000 data sets (result of my attempted merging 3x2 sectors). So the "sewing" together described below still has its merits (if you have little RAM, or make monstruous map and would need to use tens of data sets at once)./edit
Steps:Step 1. Get the data.
You need to identify what data files you need. That's where Google Earth ( http://earth.google.com/
) and a plugin for it ( http://www.ambiotek.com/topoview
) come handy.
Install Google Earth if needed, and then simply "using" (double clicking) the downloaded plugin should fire Google Earth with it. In the Places you should find a layer "SRTM4.1" consisting of "elevation" and two "logo" (which you should see on the top corners from the start). Anyway, enable whole "elevation" and you will see the Earth split into sectors, with "place" in the middle of each. The place will have name like "Data for: srtm_40_02".
These coordinates (40,2) are what's important for us, and for what we really need Google Earth.
Clicking on the place will open large window, where you could put the heightmap on the Google Earth globe, or more importantly (for us) find links to download source data for the whole sector (5 DEGREE TILE DATA, DATA tile in zipped ARCASCII format or DATA tile in zipped GEOTIFF format).
The link for ARCASCII is the same for all sectors, except for the very last part. The link looks like this for me (in the window it says download from London server, maybe for different places it will give different "best" links to download, don't know):
http://www.ambiotek.com/cgi-bin/downloadfile.cgi?url=ftp://anon:firstname.lastname@example.org/array1/portal/srtm41/srtm_data_arcascii/srtm_40_02.zip(note: the above intentionally is not clickable link so that people downloading all needed things don't go for this by mistake)
The very last part is where the coordinates 40,02 are. You can use this link to download all needed sector datas just changing the numbers in the file name at the end. I hate Google Earth trying to act like an internet browser, so I just get this link and paste it into Firefox, instead using the link from Google Earth directly).
Anyway, now we have DATA !
Now, unzip the data into some working directory. Beware, the unpacked ARCASCII data are over 100MB for each sector. I haven't used GEOTIFF but it might be smaller.Step 2. Make heightmap out of the data.Tool:
For this step, the program MicroDEM is used ( http://www.usna.edu/Users/oceano/pguth/website/microdem.htm
). Just go to Download page and download the full installation. After that, also download the latest update (the first link on the Download page is full install, the second is the latest updated exe). Just put that new exe into the directory where you installed MicroDEM in the first place. I had to do that because the un-updated MicroDEM gave errors right at the start and didn't work.What to do:
Start MicroDEM, close the small intro window. Now, open the extracted data. File->Open->Open DEM, then choose the right format for the data and open it (the second colorful button on the toolbar is same as File->Open->Open DEM). A window with the sector heightmap in colors should open after it finishes loading. This is our map. But it's in color, and we need a grayscale. And we also need it in a scale we want.Setting the scale:
Since I used several data files to make one final heightmap, I had to take the scale into account. I used r-click on the map area then Modify Map Area->Set map pixel size, then entering the same number for all used maps. If you need a detailed heightmap you will need to use Modify Map Area -> Subset (graphical) & zoom to limit the map to a part you need before setting very small pixel size (if you do that from start it will say that it will require for example 17359MB for that, or simply say that he can't do that). Anyway, the scale one pixel size 1000 makes area of Poland a bit too big to fit within 512x512 map. But you can do whole sector with pixel size 100 or so to make huge and detailed maps (the initial data are 100MB not for decoration).Setting the elevation scale:
Now, we need some fixed elevation scale. It is trickier than you might think. We need to take into account following things:
1.Maximum elevation present in the sector.
2.If using multiple data files - fixed same scale for all (so that the same height = same grey on all sectors).
3.Making land a land and making sea sea.
Anyway, use Modify->Elevation from the program menu, or use r-click and Display Parameter->Elevation. This will take us to the Elevation Map Options window. Here we define how the height is transformed into color. We need Gray Scale. There are also 2 other options we need to set: "Z Range" and "Missing" color. Since our data lacks sea height data, the "Missing" color is actually what color we want whole sea. I used pure Black to make maximally deep sea, or RGB (40,40,40) to make minimum depth sea (that's when you set minimal water level in Simutrans). The "Z Range" actually defines the range of heights that will correspond to grayscale 0-255 values. Set maximum so that it "catches" all the height present in your map/maps. If using multiple maps to create one final heightmap you must use the very same Z Range for ALL maps. But the trick is to make shores that are like 1 or 2 meters above sea actually shores in Simutrans, instead of some underwater reefs of coastal cliffs. Since we don't have any sea depth data, I used minimum sea level in Simutrans (-4, for experimental -10) to have largest possible height range above sea level. At this settings, gray somewhere around RGB=(60,60,60) arr just above water. But for a 1-2 meters height to become 60,60,60 we need to start the Z range below sea level, so that "zero" is already around 60 on grayscale.
The map I made had highest peak around 2500, so I put 2500 as maximum of Z Range. Experimenting a bit shown that -600 is good minimum for heightscale, because resulting gray shade for coastal flat areas are indeed coastal land area just above water. If you have different max, you will need different minimum to keep to "zero" in the same relative position along the scale. So your good "minimum" will be somewhere around YOUR_HEIGHT/2500*(-600), where YOUR_HEIGHT is the maximum you put in the Z Range.
Now, having thought this all through, we can apply the Grayscale and wanted Z Range to the map.And save:
Now, when we have correct scale and height mapping to color, we can save the heightmap. R-click and Save Image. Save as any format you can read later, because it's not finished yet.Step 3. Build the final heightmap for simutrans
We now possess the raw heightmaps we need. If you are making a simutrans map out of a single map file in MicroDEM and you are fine with the size as it is, then the map is ready (provided you saved as for example bmp that simutrans can use).
But if you want to resize the map and/or build one large map out of several heightmaps it is time for a graphic editing program (such as GIMP http://www.gimp.org/
Just create a new large picture in Grayscale mode and open all the component heightmaps and paste them so that they match each other. If you are sewing maps together I hope you did all the component maps have the same scale and exactly the same Z range. If not, go back to Step 2 and do that again properly.
Anyway, if you used two or more heightmaps that are on the north-south axis you will be up to a surprise. The width of them is different !
The problem is, the southern parts exported from MicroDEM will be WIDER than the northern parts. This is due to the source files being constant width in Longitude (not distance). When drawing single map, MicroDEM keeps Longitude degree width constant (warping the map a bit). But due to that "horizontal scales" of maps neighboring on north-south axis will not match ! So before we "sew" the maps, we have to account for that. The simplest way, although not keeping the map perfect, is to choose one line (latitude) and stretch/shrink the maps that are norht/south of it (you can also shrink/stretch them just along the horizontal axis). Just look at the width of single map and stretch/shrink them according to that and they will fit each other like pieces of puzzle.
More advanced methods (probably required if making some large, especially if it's large "vertically" like Chile), would probably involve distorting each map so that it's wider at the bottom and narrower at the top, before sewing them together. Or using some real cartographic mapping (I'm not going to go into that).
Now, when you finally resized and sewn together all the parts, you have THE HEIGHTMAP. The only thing left to do is to cut out the actual part you want (I had to sew 6 sectors together, despite fact that the area was not larger than 2, because it happened to be on the intersections of sectors), eventual shrink to smaller size (if you made THE HEIGHTMAP huge and want only reasonable simutrans map) and put it into My Documents\simutrans\maps.
I share this mehtod with everyone because it has two advantages over the way Joker described on the simutrans maps site http://maps.simutrans.com/tutorial.htmlAdvantage 1:
You get actual heights, NOT physical maps that often have height zones that are progressively bigger as the altitude increases (for example you have one step between 0 and 100 height, but only one step between 1500 and 2000 that's 5 times as large in reality). The physical maps often result in maps that are very rough in the flatlands, while the mountains are barely sticking out. Here, you translate real heights into simutrans heights on a linear basis.Advantage 2:
You can get heightmap of ANY land on Earth except for subpolar regions. It has 90m horizontal resolution too, so even city-level maps can be obtained this way. It's much more detailed than simutrans' assumption 1 square = 1 km.
Of course it has also disadgantages:Disadvantage 1:
Need to download lot of data.Disadvantage 2:
Tedious sewing together to get larger areas.Enjoy !