Jump to content

stretching the heightmap


drunken Persian
 Share

Recommended Posts

Hello everyone,

 

i am playing a lilttle bit around with the map editor and try to implement a heightmap in giant scale but unfortunately the map editor converts the map always into small scale. There is a resize/recenter option in the editor but it only adds new landscape to the small base. I am interested in stretching the heightmap on the whole giant map scale. An good example is the the albion and eire map where the heightmap of UK and Ireland is streched over the a giant map. I am asking myself how did the creator achieve this ? 

 

thanks for everyone who spend his free time to answer my nooby question !

Link to comment
Share on other sites

21 hours ago, drunken Persian said:

Hello everyone,

 

i am playing a lilttle bit around with the map editor and try to implement a heightmap in giant scale but unfortunately the map editor converts the map always into small scale. There is a resize/recenter option in the editor but it only adds new landscape to the small base. I am interested in stretching the heightmap on the whole giant map scale. An good example is the the albion and eire map where the heightmap of UK and Ireland is streched over the a giant map. I am asking myself how did the creator achieve this ? 

 

thanks for everyone who spend his free time to answer my nooby question !

It's the resolution of the heightmap. The size of the map generated is based on those dimensions.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

There is a pseudo-standard for getting heightmaps of size 512 (largest map size) from NASA Visible Earth topology maps if you are on Linux. All the random maps do it this way.

/**
 * Heightmap image source:
 * Imagery by Jesse Allen, NASA's Earth Observatory,
 * using data from the General Bathymetric Chart of the Oceans (GEBCO)
 * produced by the British Oceanographic Data Centre.
 * https://visibleearth.nasa.gov/view.php?id=73934
 *
 * Licensing: Public Domain, https://visibleearth.nasa.gov/useterms.php
 *
 * The heightmap image is reproduced using:
 * wget https://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73934/gebco_08_rev_elev_C1_grey_geo.tif
 * lat=25.574723; lon=50.65; width=1.5;
 * lat1=$(bc <<< ";scale=5;$lat-$width/2"); lon1=$(bc <<< ";scale=5;$lon+$width/2"); lat2=$(bc <<< ";scale=5;$lat+$width/2"); lon2=$(bc <<< ";scale=5;$lon-$width/2")
 * gdal_translate -projwin $lon2 $lat2 $lon1 $lat1 gebco_08_rev_elev_C1_grey_geo.tif bahrain.tif
 * convert bahrain.tif -resize 512 -contrast-stretch 0 bahrain.png
 * No further changes should be applied to the image to keep it easily interchangeable.
 */

The actual map is split into 12 or so separate files IIRC and the above commands extracts Bahrain. The specific image file depends on the region you want to extract. Bahrain is in C1.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...