Announcement

Collapse
No announcement yet.

Height Maps

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Height Maps

    I'm trying to create a height map. And I am using satellite maps to help me, but it takes time..

    I was wondering if there is a faster trick to it? The problem with most images (infrared for example) is that they show the light and dark sides, obviously so that you can make out what you are looking at.

    Any help?
    be free

  • #2
    Height maps?

    Like contours on an ordnance survey map?
    One day Canada will rule the world, and then we'll all be sorry.

    Comment


    • #3
      You mean relief maps?http://richardphillips.org.uk/maps/relief.html

      "Relief is one instance of the general problem of showing a three-dimensional surface on a map; the problem of showing hills and valleys is not substantially different from that of representing a statistical surface such as the rainfall distribution. People are notoriously poor at reasoning in three dimensions and so it is no surprise that many people find relief harder to interpret than most other information on a map. There are more than a dozen distinct methods for showing relief and so the map designer has a wide choice. We have conducted a series of experiments to discover how different methods affect map reading performance. Our approach differs from previous research in assuming that a number of different map reading tasks must be used in an experiment and that the best method of showing relief may depend on the way the map is to be used."

      Etc, etc...
      Long time member @ Apolyton
      Civilization player since the dawn of time

      Comment


      • #4
        Topographic map?
        Life is not measured by the number of breaths you take, but by the moments that take your breath away.
        "Hating America is something best left to Mobius. He is an expert Yank hater.
        He also hates Texans and Australians, he does diversify." ~ Braindead

        Comment


        • #5
          Stop by and get help, information or tips on the Transport Tycoon games, or just have a general chat.

          Ok, firstly you'll need a reasonably beefy PC to do this, as the data crunching is quite intense.

          You will need the following:

          * Google Earth (http://earth.google.com)
          * MicroDem (http://www.usna.edu/Users/oceano/pgu...e/microdem.htm)
          * SRTM Overlay for GoogleEarth (Run from URL once you've installed Google Earth - http://www.ambiotek.com/topoview).
          * A graphics program, such as Photoshop, Paintshop Pro etc.. to covert a TIF to PNG.
          * As mentioned above, a fairly beefy PC, esp. if you are trying to generate a map covering a large (continents) area.
          * (I have a AMD 64x2 3800 with 2GB of ram and it can take a while on mine!)

          OK, before we start, make sure you've installed Google Earth, the SRTM Overlay & Microdem.

          Overview
          The steps involved are to find the DEM data for the area you're interested in. Load up Google Earth (GE) and if the SRTM overlay has installed correctly, you should have an SRTM2 category in the Places list in GE. Put a tick in the box next to SRTM2 and you should see loads of boxes appear over the globe, each with a green dot in the middle.

          If you click on the Green dot, you then have the option to download the DEM data for that cell. Once we have the cell(s) we need, we then need to load them into Microdem, reduce the definition of the data from really detailed to detailed enough for what we want.

          Once we've done this, we then merge the thined DEM files into a complete DEM file, which we then load back into Microdem and then export it out as a TIF, convert the TIF into a PNG and then use it in OpenTTD!

          Sound simple? Yes? You're mad, its not simple its a ball ache! Anyway, here goes.

          Google Earth
          Firstly, if you're running NT4, Windows 2000, XP or Vista, you may want to enable folder compression in the folder you're going to save the DEM files to. Zipped the Dem files are 20odd MB, unzipped they're often 150mb, by using the built in file compression within NTFS, you save a fair amount of disk space. To turn it on, right click on the folder you're going to save the DEMS to (I'd recommend c:\Mapdata\DEMs\). Select Properties & then click the 'Advanced' button at the bottom, next to File Attributes. Put a tick in the 'Compress contents to save disk space' and click OK. Done

          Now, in GE locate the area you want to generate a map for - in this example I'm going to do The Carribean island of Hispanola (Haiti & the Domincan Republic).



          Now, on the pic, you'll notice the two green buttons for S_22_09 and S_23_09 - these are the two DEMs we'll need.

          Click on the Green buttons and you'll see a page pop up, scroll to the start of the links and you'll want to download either of the first two links (Either from the US or UK Servers, it doesn't matter), its the data file in ARCASCII format.

          Save the files into the C:\mapdata\dems\ folder.

          Once you've done that for both DEM cells, close GE, you don't need it any more.

          MicroDem

          Unzip the DEM files from their zips and then fire up MicroDem.

          Click on File->Open DEM In the Files of Type box, make sure ASCII Arc Grid (*.asc) is selected, browse to the folder and select either of the two files. Microdem will now load the DEM file.

          By default you get all the legends and other stuff you don't need, to turn these off. You'll only need to do this the first time, as it remembers these settings. Right click on the map & select 'Legends / Marginalia'. Click on 'Scale Bar' and untick the 'Include on Maps' box. Do the same with the Elevations button.

          Then click OK to close the Map Marginalia window.

          Right, by default the DEM files we downloaded are way too detailed to be of use, so we need to 'thin' them. To do this, select File->Save DEM->Thin DEM (Decimate). Select a Thin Factor of 3. Then click File->Save DEM->ASCII Arc Grid. Save the file under a new name in the same location as the maps (S_22_09_Thin.asc) is a good suggestion, basically just add '_thin' to the filename.

          Close the two Micodem map windows & repeat the process with the 2nd map. (Or as many maps as you need).

          You should now end up with a 'thin' DEM file for each of the cells you have.

          Note, the next step is to merge the DEM files into one single file. The program does have a limit to the number of columns and rows of data it can handle in a DEM file. If you find that you are exceeding this limit (default at a thin factor of 3 would result in a maximum grid of 12 cells x 12 cells. (24000x24000). If you are needing more cells then you will need to thin by a factor of 4 or even 5. Don't worry about the degration in quality of the map, as you're using so many cells it won't matter.

          Ok, from the File menu select 'File->Data Manipulation'. On the new window, select 'Merge->DEMs'. Browse to the two 'thin' files you saved and select them one at a time, pressing 'Open' each time. This will add them into the merge list. When you have added the last file, click 'Cancel' on the Open dialog.

          Microdem will then ask you for the name of the file to save to, save it into the same folder under the name of Hispanola.DEM (obviously change this name if you're not doing hispanola).



          Close the Data Manipulation window by clicking File->Close.

          Now load up the saved DEM file by clicking 'File->Open DEM', change the Files of Type list to 'Any Likely DEM'. You should now see the two DEM cells merged into one.



          Right, we now need to crop the map to the area we want. On the tool bar of the Map window (not the main microdem toolbar), you'll see a button which looks like a dotted rectangle with an arrow at the bottom right (7th in from the left). THis is the create subset button, click it and then click and drag across the map area (You must click & drag from the top left to the bottom right of the area, if you do this wrong, you'll get a message anyway.).



          Microdem will automatically zoom into the cropped area. If you made a mistake and cropped off an area you want, simply undo the crop (the crop operation is called a subset), by clicking the 'undo subset' button (to the right of the create subset button).

          Right, now we need to change this to a grayscale map. Right click on the map and select 'Display Parameter' and then from the popup menu, select 'Elevation'.

          Select 'Gray scale' from the list of radio options and then click on the Z Range button. The Z Range basically controls how the heights are mapped onto the grayscale colours, the greater the height, the lighter the colour.

          Normally you'll want to select the defaults, but if you find the OpenTTD doesn't get the coast lines right, its probably because the ground is too dark and OpenTTD can't tell what's land and what's sea. If this is the case, lower the Max value until the problem goes anyway. you may also want to lower the Min Value too, as this will effectivly start 'sea level' at a lower position on the map. In this case we need to tweak these values, so enter a min of -150 and a max of 2500.

          Click OK and then OK again and the map will redraw.


          Finally, we need to resize the map to 1:1 pixel mapping. To do this, on the map window's toolbar, you will see zoom and unzoom buttons, between them is a number 1 in a magnifying glass. Click this button. You may or may not get a warning about memory usage, depending on the size of the DEM data, but its not that much of an issue.

          Now we need to save this out. Microdem doesn't export to PNG, so we need to export as a TIF file, a GeoTIFF to be precise. Click on 'File->Save Map as Image->GeoTIFF, screen scale'. This will automatically default to the folder c:\mapdata\Images, which is fine. Enter an appropriate name and click save.

          Now fire up the image editing software, for this tutorial, I'll be using PaintShop Pro. Photoshop would do as an alternative, but its like using a sledgehammer to crack a walnut! Paintshop pro is great for simple things like this.

          Paintshop Pro

          Open the TIF file. The next thing we need to do is try and match the resolution of the file to the resolutions of the OpenTTD maps.

          Normally you'll probably create a 512 or 1024 longest edge sized map. So you need to work out the best image size.

          This particular example is pretty much an obvious 1024x512 map size. (Would be ideal if you could enter a custom map size though!)

          For land locked maps (i.e. with no sea on one or more sides, its imperative that you match the image size with the map size, otherwise you'll end up with sea off the side of the map.

          We can resize this map to 2048 x 1024 This will need a bit of cropping and resizing to do it, so I'll leave it up to you as to how you do this, as it will really depend on how tightly you cropped the DEM file. What I did was to resize the width to 2048 and then resize the canvas to 1024, so it added more sea to the top and bottom of the image.

          Now click File->Save As and save it as a PNG file.
          Graffiti in a public toilet
          Do not require skill or wit
          Among the **** we all are poets
          Among the poets we are ****.

          Comment


          • #6
            wow...

            Comment


            • #7
              HALP ME PRODUCES MAPES WITH NO COLOURS OR NATIONS PLZ KTHX
              I will never understand why some people on Apolyton find you so clever. You're predictable, mundane, and a google-whore and the most observant of us all know this. Your battles of "wits" rely on obscurity and whenever you fail to find something sufficiently obscure, like this, you just act like a 5 year old. Congratulations, molly.

              Asher on molly bloom

              Comment


              • #8
                Thanks Lancer and onodera, exactly what I need.
                be free

                Comment

                Working...
                X