Sie sind auf Seite 1von 4

Hello ! 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 mak e a bitmap heightmap) To make it even better, it's not the physical map with defined height layers (wh ere larger and larger actual height difference is still a single "layer"), but t he actual heightmap. And form what I read with about 90 meter resolution ! (so i t may be even useful for getting the city heightmaps) Here is the link: And below are the instructions re-written by me according to my own experience a nd 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 da ta 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 27052 (provided by RanDrag) is probably better, since you don't have to "sew" th e maps together. However, when I tried to do my map this way, I "killed" my computer. After almos t half hour of HDD drill I gave up and hard-resetted. Seems my RAM is hardly eno ugh 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 lit tle 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: // ) and a plugin for it ( ) c ome handy. Install Google Earth if needed, and then simply "using" (double clicking) the do wnloaded 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 wi ll see the Earth split into sectors, with "place" in the middle of each. The pla ce will have name like "Data for: srtm_40_02". These coordinates (40,2) are what's important for us, and for what we really nee d 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 s ource data for the whole sector (5 DEGREE TILE DATA, DATA tile in zipped ARCASCI I 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 se rver, maybe for different places it will give different "best" links to download , don't know): Code: 24.202/array1/portal/srtm41/srtm_data_arcascii/ (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 t he end. I hate Google Earth trying to act like an internet browser, so I just ge t 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 d ata are over 100MB for each sector. I haven't used GEOTIFF but it might be small er. Step 2. Make heightmap out of the data. Tool: For this step, the program MicroDEM is used ( guth/website/microdem.htm ). Just go to Download page and download the full inst allation. After that, also download the latest update (the first link on the Dow nload 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 h ad 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 sec ond colorful button on the toolbar is same as File->Open->Open DEM). A window wi th 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 s cale we want. Setting the scale: Since I used several data files to make one final heightmap, I had to take the s cale 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 detai led 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 tha t, or simply say that he can't do that). Anyway, the scale one pixel size 1000 m akes area of Poland a bit too big to fit within 512x512 map. But you can do whol e sector with pixel size 100 or so to make huge and detailed maps (the initial d ata 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 heig ht = 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. Her e 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 ou r 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 m ake minimum depth sea (that's when you set minimal water level in Simutrans). Th e "Z Range" actually defines the range of heights that will correspond to graysc ale 0-255 values. Set maximum so that it "catches" all the height present in you r map/maps. If using multiple maps to create one final heightmap you must use th

e 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 heig ht 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 grays cale. 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 r esulting gray shade for coastal flat areas are indeed coastal land area just abo ve 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" wil l 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 Ra nge to the map. And save: Now, when we have correct scale and height mapping to color, we can save the hei ghtmap. R-click and Save Image. Save as any format you can read later, because i t'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 heig htmaps it is time for a graphic editing program (such as GIMP http://www.gimp.or g/ ). Just create a new large picture in Grayscale mode and open all the component hei ghtmaps and paste them so that they match each other. If you are sewing maps tog ether 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 Longitu de (not distance). When drawing single map, MicroDEM keeps Longitude degree widt h 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 perfec t, is to choose one line (latitude) and stretch/shrink the maps that are norht/s outh of it (you can also shrink/stretch them just along the horizontal axis). Ju st 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 togeth er. 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 HEIG HTMAP. The only thing left to do is to cut out the actual part you want (I had t o sew 6 sectors together, despite fact that the area was not larger than 2, beca use it happened to be on the intersections of sectors), eventual shrink to small er size (if you made THE HEIGHTMAP huge and want only reasonable simutrans map) and put it into My Documents\simutrans\maps. DONE ! Note:

I share this mehtod with everyone because it has two advantages over the way Jok er described on the simutrans maps site Advantage 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 be tween 0 and 100 height, but only one step between 1500 and 2000 that's 5 times a s 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 transla te 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 9 0m 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 ! buwhahahaha 8)