<div dir="ltr">How big is the TIFF and the PNG? They use similar compression methods (PNG is ZIP/Deflate and compressed TIFF is usually LZW and can also use ZIP/Deflate) so you ought to be able to get them fairly close in size. What are the total pixel dimensions of the image? Your best result might not be from using a single large, untiled image. Most of the time you will have better performance (but larger file size) by pre-tiling the image into a TileMap Set like a MapBox Tile set (stored as an SQLite database file, usually).<div><br></div><div>There probably is a trick to apply georeferencing (like a World File) to a PNG file through GDAL, but it's just not usually done or a good idea. This may be a case where you're asking the wrong question. Tell us what you're trying to accomplish in the larger sense so we can make sure you're attacking the correct problem.</div><div><br></div><div>As far as Elevation -- have you added an elevation data source layer? The code you referenced adds elevation data from a local file but yours does not. It would look something like this:</div><div><br></div><div><pre style="box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;padding:12px;overflow:auto;line-height:1.4;color:rgb(64,64,64)"><span class="gmail-o" style="box-sizing:border-box;color:rgb(102,102,102)">//</span> <span class="gmail-n" style="box-sizing:border-box">Add</span> <span class="gmail-n" style="box-sizing:border-box">an</span> <span class="gmail-n" style="box-sizing:border-box">elevationlayer</span> <span class="gmail-p" style="box-sizing:border-box">(</span><span class="gmail-n" style="box-sizing:border-box">SRTM</span> <span class="gmail-kn" style="box-sizing:border-box;color:rgb(0,112,32);font-weight:bold">from</span> <span class="gmail-nn" style="box-sizing:border-box;color:rgb(14,132,181);font-weight:bold">a</span> <span class="gmail-n" style="box-sizing:border-box">local</span> <span class="gmail-n" style="box-sizing:border-box">GeoTiff</span> <span class="gmail-n" style="box-sizing:border-box">file</span><span class="gmail-p" style="box-sizing:border-box">)</span>
<span class="gmail-p" style="box-sizing:border-box">{</span>
<span class="gmail-n" style="box-sizing:border-box">GDALOptions</span> <span class="gmail-n" style="box-sizing:border-box">gdal</span><span class="gmail-p" style="box-sizing:border-box">;</span>
<span class="gmail-n" style="box-sizing:border-box">gdal</span><span class="gmail-o" style="box-sizing:border-box;color:rgb(102,102,102)">.</span><span class="gmail-n" style="box-sizing:border-box">url</span><span class="gmail-p" style="box-sizing:border-box">()</span> <span class="gmail-o" style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span class="gmail-s2" style="box-sizing:border-box;color:rgb(64,112,160)">"c:/data/srtm.tif"</span><span class="gmail-p" style="box-sizing:border-box">;</span>
<span class="gmail-n" style="box-sizing:border-box">ElevationLayer</span><span class="gmail-o" style="box-sizing:border-box;color:rgb(102,102,102)">*</span> <span class="gmail-n" style="box-sizing:border-box">layer</span> <span class="gmail-o" style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span class="gmail-n" style="box-sizing:border-box">new</span> <span class="gmail-n" style="box-sizing:border-box">ElevationLayer</span><span class="gmail-p" style="box-sizing:border-box">(</span> <span class="gmail-s2" style="box-sizing:border-box;color:rgb(64,112,160)">"SRTM"</span><span class="gmail-p" style="box-sizing:border-box">,</span> <span class="gmail-n" style="box-sizing:border-box">gdal</span> <span class="gmail-p" style="box-sizing:border-box">);</span>
<span class="gmail-nb" style="box-sizing:border-box;color:rgb(0,112,32)">map</span><span class="gmail-o" style="box-sizing:border-box;color:rgb(102,102,102)">-></span><span class="gmail-n" style="box-sizing:border-box">addElevationLayer</span><span class="gmail-p" style="box-sizing:border-box">(</span> <span class="gmail-n" style="box-sizing:border-box">layer</span> <span class="gmail-p" style="box-sizing:border-box">);</span>
<span class="gmail-p" style="box-sizing:border-box">}</span></pre></div><div><br></div><div>You can also use TileMap Sets hosted either as a file on your local disk, or served up over the Internet from an HTTP Tile Map Server. Pelican Mapping operates the ReadyMap server for this purpose and you can use it at no charge for low-traffic testing and development purposes but it needs to be licensed for production use.</div><div><br></div></div>