[OTTD]Quick heightmaps without special software

Post your custom scenarios here. Saved games also welcome. All Transport Tycoon games acceptable (including TTDPatch and OpenTTD).
Post Reply
User avatar
PouncingAnt
Transport Coordinator
Transport Coordinator
Posts: 357
Joined: 09 Nov 2004 22:33

[OTTD]Quick heightmaps without special software

Post by PouncingAnt »

I'm not sure how well this has been covered, but I just discovered that you can make passable heightmaps without using particularly specialist tools. (I used microDEM before, but its not the friendliest of beasts)

Required websites
1)Google maps (or any map with coordinates)
2)arcGIS

Minimum requirements:
1) Web browser
2) OpenTTD :wink:

I also recommend some photo editing software (I use the GIMP)

Walkthrough:

Part I - Getting the coordinates (with GMaps)
  • 1)Load up google maps, zoom to the area you are interested in
    2)Right click the map in the upper left corner of where you are interested in
    3)Click "What's here?"
    4)In the map search box (to the right of the Google logo), coordinates will appear. Write down the second coordinate THEN the first coordinate
    5) repeat steps 2-4 for the lower right corner of the area you are interested in.
Part II - Getting the heightmap
  • 1) go to arcGIS (link above)
    2) write the coordinates (that you wrote down in Part I) into the box labelled "bounding box", spaced with commas eg. 135.0,38.8,142.0,34.3
    3) write the desired heightmap size in "image size" eg. 1024,1024
    4) press enter or click Export Image
    5) right click the map when it is finished loading and select "save as"
The saved file will be a heightmap of the desired area (if all went well).

Pros:
  • very quick; I think microDEM is on a very slow server, downloading a map this way is possibly hundreds of times quicker than downloading microDEM & the map data
  • costs nothing, no login required etc.
Cons:
  • It looks like the maps are produced from a projection of the spherical earth to a rectangle, so the maps may be slightly distorted!* (I suspect microDEM evades this problem)
  • The resolution seems to be pretty poor. A 2048,2048 image size of the example bounding box above seems to be pixelated. Thus smaller countries aren't going to look so nice (microDEM definitely has a better resolution, if that is what you need)
*That said, I'm so used to looking at maps that a rectangular projection of any given region of the world looks normal to me...

Note, however, that you will need to do some editing, as per the old sticky. Mainly you just want to lighten the shore so it doesn't sink into the sea!
Attachments
Gmaps-coordinates-2013.png
Gmaps-coordinates-2013.png (221.46 KiB) Viewed 745 times
downloading-the-map.png
downloading-the-map.png (82.06 KiB) Viewed 4224 times
NB: the below challenges are still open for submission, so feel free to perform necromancy on them!
Try the PouncingAnt National Monopoly Challenge
Or even better, the PouncingAnt National Monopoly Challenge 2
Or better still, the PouncingAnt National Monopoly Challenge 3
Or, the PouncingAnt National Monopoly Challenge 4

Or try my scenario instead!

-(A lazy) OpenTTD Japanese Translator-
-(A lazy) PNGcodec user-
"You get what you pay for, so pay attention!"

Patches:
Company Station Stats
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: [OTTD]Quick heightmaps without special software

Post by Alberth »

Information that you want to have easily accessible for a longer period of time can usually better be placed at the wiki.
ericmathew
Engineer
Engineer
Posts: 1
Joined: 17 Aug 2013 05:12
Location: San Antonio, TX

Re: [OTTD]Quick heightmaps without special software

Post by ericmathew »

That sounds interesting. Which other photo editing software will you suggest?
User avatar
Espee
Traffic Manager
Traffic Manager
Posts: 198
Joined: 27 Mar 2010 23:05
Location: One Market Plaza, San Francisco

Re: [OTTD]Quick heightmaps without special software

Post by Espee »

I have always been interested in realistic heightmaps, and I never seemed to have any luck with the MicroDem approach, so I decided to give this approach a try. I wanted to make a heightmap of the southwestern portion of the United States, so I was interested in the area between 31 degrees and 43 degrees north latitude, with the western edge around -124 degrees (the state line between Oregon and California intersects the Pacific Ocean coastline around 42 degrees N, 124 degrees W, and the border between California and Mexico is about 32 degrees north).

Googling some cartography references for ellipsoidal latitude calculations (the earth is slightly flattened at the poles), I came up with a value of 68.96 miles/degree @ my mean value of 37 deg N, or (12)(68.96) = 827.52 miles from north to south. Wanting the largest resolution possible (2048x2048 map), I calculated the N-S tile length at (2048/827.52) = 2.475 tiles per mile. Wanting to simplify things a bit, I decided on an arbitrary scale of 2.4 tiles per mile on both axes, so my north-to-south distances was now (2048 tiles)*(1.0 mile/2.4 tiles)*(1 degree/68.96 miles) = 12.374 degrees, so I defined my lower limit as 31.000 degrees N and my upper limit as (31.000+12.374) = 43.374 degrees.

http://www.ncgia.ucsb.edu/education/cur ... ble01.html
http://www.ncgia.ucsb.edu/education/cur ... ble02.html

Now, I needed to reconcile the east-west values, keeping in mind that I wanted to make sure I got all of the west coast of California in the map. Given that I was converting a 3-D surface to a 2-D rectangular map, I knew I would have some minor distortions, so I based mu calculations on 37 degrees north to minimize the effect. Knowing that the longitudinal distance at the Equator produced a value of 69.17 miles per degree, I calculated the cosine of 37 degrees for a value of (0.7986) and came up with a conversion of (69.17)*(0.7986) = 55.24 miles per degree @ 37N. Going with my 2.4 tiles/mile scale for my heightmap, I caculated the coverage range at (2048 tiles)*(1.0 mile/2.4 tiles)*(1. degree/55.24 miles) = 15.448 degrees range of latitude. Given that the Utah-Colorado state line was located at approximately 109 degrees west longitude, I used -109.00 as my eastern edge, subtracted 15.448 from that, coming up with -124.448 degrees for the western edge of the map.
I then entered the values -124.448, 31.000, -109.000, 43.374 with an image size of 2048x2048 and came up with the attached map. I will work with this a bit and get back with my results.
SouthwestUS-2048-140201a.png
(1.34 MiB) Downloaded 5 times
girth
Engineer
Engineer
Posts: 33
Joined: 28 Apr 2007 05:02

Re: [OTTD]Quick heightmaps without special software

Post by girth »

Magic!!

I couldn't get the right map with the Google Map coordinates, for some reason. ?(
In any case, you can use their ArcGIS Map Viewer thingy, pan around, and then click Measure on the toolbar, then Location, and click anywhere on the map, and it gives you the long and lat of that point.

Get the bottom-left point and the top-right point of the section you need, drop in into the exportImage as the bounding box (should look like "121.975063,23.690837,149.221157,46.653981").


EDIT: When getting the list of names for a country, you can use those points:

http://api.geonames.org/cities?north=46 ... rname=demo
Post Reply

Return to “Scenarios and Saved Games”

Who is online

Users browsing this forum: No registered users and 1 guest