Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is a tool included with GDAL that does what you're asking for: <a href="http://www.gdal.org/gdaldem.html" rel="nofollow noreferrer"><code>gdaldem</code></a>. (It's written in C++, not C#. If you download the GDAL source code, you'll find it under <code>gdal/apps/gdaldem.cpp</code>.)</p> <p>Here are some examples of using it.</p> <h2>Source Heightmap</h2> <p>This is just a greyscale PNG I found on Wikipedia:</p> <p><img src="https://i.stack.imgur.com/0RY9C.png" alt="Heightmap"></p> <h2>Hillshade</h2> <pre><code>gdaldem hillshade heightmap.png hillshaded.tif </code></pre> <p><img src="https://i.stack.imgur.com/u41rz.png" alt="Hillshaded"></p> <h2>Color-relief</h2> <pre><code>gdaldem color-relief heightmap.png ramp.txt relief.tif </code></pre> <p><img src="https://i.stack.imgur.com/dTlB4.png" alt="Color-relief"></p> <p>using <code>ramp.txt</code>:</p> <pre><code>0 0 0 255 63 0 255 255 127 0 255 0 191 255 255 0 255 255 0 0 </code></pre> <p>(You provide colors for different heights, and <code>gdaldem</code> will interpolate).</p> <h2>Slope with color-relief</h2> <pre><code>gdaldem slope heightmap.png sloped.tif gdaldem color-relief sloped.tif slope-ramp.txt slope-relief.tif </code></pre> <p><img src="https://i.stack.imgur.com/DokEU.png" alt="Slope with color-relief"></p> <p>Here's <code>slope-ramp.txt</code>:</p> <pre><code>0 255 255 255 90 0 0 0 </code></pre> <p>(This time, you provide colors for different angles).</p> <p>You might also be interested in some of other software using GDAL listed in the <a href="http://en.wikipedia.org/wiki/GDAL#Software_that_uses_GDAL.2FOGR" rel="nofollow noreferrer">Wikipedia entry</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload