<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0px;
        margin-bottom:0px}
-->
</style><style type="text/css" id="owaParaStyle"></style>
</head>
<body dir="ltr" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Helvetica;color: #000000;font-size: 10pt;">
<div>No problem, happy to help !<br>
</div>
<div><br>
</div>
<div>> <span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">
image/x-bil;bits=32 is just the mime type correct? I assume that's the standard mime type definition for .bil files?</span></div>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></div>
<div>I don't know if it the standard mime type (but I assume it is), as we don't really use this string other than a key to select the correct fetch method: see
<a href="https://github.com/iTowns/itowns/blob/master/src/Source/Source.js#L9" target="_blank">
https://github.com/iTowns/itowns/blob/master/src/Source/Source.js#L9</a></div>
<div><br>
</div>
<div>Adrien<br>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF509624" style="direction: ltr;"><font size="2" face="Tahoma" color="#000000"><b>De :</b> Dalton, Charlie [Charlie.Dalton@parsons.com]<br>
<b>Envoyé :</b> mardi 28 janvier 2020 17:39<br>
<b>À :</b> Adrien Berthet; itowns-user@lists.osgeo.org<br>
<b>Objet :</b> Re: Elevation Layers and supported formats<br>
</font><br>
</div>
<div></div>
<div>
<p>Adrien,<br>
</p>
<p><br>
</p>
<p>Thank you for that example code reference, it was exactly what I needed. I had created a GeoTiff but could only get it to export from a Geoserver, so far, as a jpeg or png. Once I got the configuration of the elevation layer correct by adding those elevation attributes
 (useColorTextureElevation, colorTextureElevationMinZ, colorTextureElevationMaxZ) I can start to see elevation.<br>
</p>
<p>​<br>
</p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">image/x-bil;bits=32 is just the mime type correct? I assume that's the standard mime type definition for .bil files?</span><br>
</p>
<p><br>
</p>
<p>Also thank you for the information on other formats.<br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div style="color:rgb(33,33,33); font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif; font-size:15px; background-color:white; margin:0px">
<div style="margin:0px"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font size="2" face="Franklin Gothic Book,sans-serif" color="#353535"><span style="font-size:10pt"><b>Charlie Dalton</b></span></font><font size="2" face="Franklin Gothic Book,sans-serif" color="#333333"><span style="font-size:10pt"><br>
<br>
</span></font></span></font></div>
</div>
</div>
</div>
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Adrien Berthet <Adrien.Berthet@ign.fr><br>
<b>Sent:</b> Tuesday, January 28, 2020 3:40 AM<br>
<b>To:</b> Dalton, Charlie; itowns-user@lists.osgeo.org<br>
<b>Subject:</b> [EXTERNAL] RE:Elevation Layers and supported formats</font>
<div> </div>
</div>
<div>
<div style="direction:ltr; font-family:Helvetica; color:#000000; font-size:10pt">
<div>You can also see here that iTowns support color-coded elevation (on a grey scale):</div>
<div><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_iTowns_itowns_blob_master_examples_view-5F25d-5Fmap.html-23L80-2DL98&d=DwMGaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=Fl7m0-OlsZZvduoi329f4xK0m9fk9MzQJHES5KmUnJU&m=J6YHpMjrAG0lKRH9osWMxGMElNLyjeMnkbewm6Eb03c&s=YXMyJ_1TFlfXeTo5rBdQYIDIwIU05pOjH3nedbUs4e4&e=" target="_blank" rel="noopener noreferrer">https://github.com/iTowns/itowns/blob/master/examples/view_25d_map.html#L80-L98
 [github.com]</a></div>
<div><br>
</div>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF130607" style="direction:ltr"><font size="2" face="Tahoma" color="#000000"><b>De :</b> ITowns-user [itowns-user-bounces@lists.osgeo.org] de la part de Adrien Berthet [Adrien.Berthet@ign.fr]<br>
<b>Envoyé :</b> mardi 28 janvier 2020 09:17<br>
<b>À :</b> Dalton, Charlie; itowns-user@lists.osgeo.org<br>
<b>Objet :</b> Re: [iTowns-user] Elevation Layers and supported formats<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Helvetica; color:#000000; font-size:10pt">
<div>Hi Charlie,</div>
<div><br>
</div>
<div>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">> First, can I cr</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">eate an
 elevati</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">on layer using WMS with iTowns or does it need to be a WMTS endpo</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">int?</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">You can use a WMS endpoint without problem. In the examples, the WMTS endpoint is reached using a WMTSSource. If you want a WMS endpoint, use
 a WMSSource (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.itowns-2Dproject.org_itowns_docs_-23api_Source_WMSSource&d=DwMGaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=Fl7m0-OlsZZvduoi329f4xK0m9fk9MzQJHES5KmUnJU&m=J6YHpMjrAG0lKRH9osWMxGMElNLyjeMnkbewm6Eb03c&s=RKZXWSupbEVUApI6IwJXuUcY8GJxo9M1qFtZB2USo4Q&e=" rel="noopener noreferrer" target="_blank">http://www.itowns-project.org/itowns/docs/#api/Source/WMSSource
 [itowns-project.org]</a>). You can change the endpoint however you want, as it is completely independant from the layer (in almost all the case, yours being one).</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">>
</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Second, will elevati</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">on </span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">only
 work with x-bil format and if not, what other formats may I use?</span></span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"></span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Here
 at IGN we only use the x-bil format, but you should be able to use any format your want, as long as you specify two things:</span></span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">- the fetcher of the source: use
 one from Fetcher (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.itowns-2Dproject.org_itowns_docs_-23api_Provider_Fetcher&d=DwMGaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=Fl7m0-OlsZZvduoi329f4xK0m9fk9MzQJHES5KmUnJU&m=J6YHpMjrAG0lKRH9osWMxGMElNLyjeMnkbewm6Eb03c&s=ed7MF5IqVZE7VPsK9dz1dD8tyb6lWjm-FWeyGlriM50&e=" rel="noopener noreferrer" target="_blank">http://www.itowns-project.org/itowns/docs/#api/Provider/Fetcher
 [itowns-project.org]</a>), and set it like wmsSourceInstance.fetcher = Fetcher.choosenMethod</span></span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">- the parser of the source: do
 what you need to do, the output needs to be a THREE.DataTexture (<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__threejs.org_docs_-23api_en_textures_DataTexture&d=DwMGaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=Fl7m0-OlsZZvduoi329f4xK0m9fk9MzQJHES5KmUnJU&m=J6YHpMjrAG0lKRH9osWMxGMElNLyjeMnkbewm6Eb03c&s=Up13idugRhJOQYWlp5Y-6WuvxQmXRjE7Ftjdw9MOoZw&e=" rel="noopener noreferrer" target="_blank">https://threejs.org/docs/#api/en/textures/DataTexture
 [threejs.org]</a>), and specify it by writing wmsSourceInstance.parser = newParserMethod<br>
</span></span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">- optional, the converter of the
 source: you can see here (<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_iTowns_itowns_blob_master_src_Converter_textureConverter.js-23L42-2DL49&d=DwMGaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=Fl7m0-OlsZZvduoi329f4xK0m9fk9MzQJHES5KmUnJU&m=J6YHpMjrAG0lKRH9osWMxGMElNLyjeMnkbewm6Eb03c&s=kwbkUYDR2rlagvTiPwsbYc3cvJA9Vh-5v1QPwudKEM8&e=" rel="noopener noreferrer" target="_blank">https://github.com/iTowns/itowns/blob/master/src/Converter/textureConverter.js#L42-L49
 [github.com]</a>) what the converter is doing for the data, feel free to override it if needed by setting wmsSourceInstance.convert = newConvertMethod</span></span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">All of these methods are called
 in DataSourceProvider, you can read it if you want more precision on what options are given and how it chains:
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_iTowns_itowns_blob_master_src_Provider_DataSourceProvider.js&d=DwMGaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=Fl7m0-OlsZZvduoi329f4xK0m9fk9MzQJHES5KmUnJU&m=J6YHpMjrAG0lKRH9osWMxGMElNLyjeMnkbewm6Eb03c&s=hrKm-u4R9qXUbf080ODb-VlbMhyaRRc9ZEgfQnuH6ac&e=" rel="noopener noreferrer" target="_blank">
https://github.com/iTowns/itowns/blob/master/src/Provider/DataSourceProvider.js [github.com]</a><br>
</span></span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Hope it helps !</span></span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Adrien</span></span></p>
</div>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF238948" style="direction:ltr"><font size="2" face="Tahoma" color="#000000"><b>De :</b> ITowns-user [itowns-user-bounces@lists.osgeo.org] de la part de Dalton, Charlie [Charlie.Dalton@parsons.com]<br>
<b>Envoyé :</b> lundi 27 janvier 2020 20:18<br>
<b>À :</b> itowns-user@lists.osgeo.org<br>
<b>Objet :</b> [iTowns-user] Elevation Layers and supported formats<br>
</font><br>
</div>
<div></div>
<div>
<p>I'm using iTowns, 2.15.0. I try to stay latest but three.js doesn't always get their typings updated which results in compilation errors in our typescript application.<br>
</p>
<p><br>
</p>
<p>​I'm attempting to expose an elevation layer in a Geoserver and so far my efforts produce a WMS endpoint (I have tried a single large GeoTiff, ImageMosaic with many geotiffs or Shapefile layer). The example packaged in iTowns uses a WMTS endpoint that serves
 x-bil images. Based on my searching in the code, xbil seems to be the one and only expected format based on:<br>
</p>
<p><br>
</p>
<p>ElevationLayer#update(...)<br>
</p>
<p>LayeredMaterialNodeProcessing#updateLayeredMaterialNodeElevation(...)<br>
</p>
<p>XbilParser#computeMinMaxElevation(...)<br>
</p>
<p>​<br>
</p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">First, can I cr</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">eate an
 elevati</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">on layer using WMS with iTowns or does it need to be a WMTS endpo</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">int?</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Second, will elevati</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">on </span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">only
 work with x-bil format and if not, what other formats may I use?</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"> </span><br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div style="color:rgb(33,33,33); font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif; font-size:15px; background-color:white; margin:0px">
<div style="margin:0px"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font size="2" face="Franklin Gothic Book,sans-serif" color="#353535"><span style="font-size:10pt"><b>Charlie Dalton</b></span></font><font size="2" face="Franklin Gothic Book,sans-serif" color="#333333"><span style="font-size:10pt"><br>
</span></font></span></font></div>
</div>
</div>
</div>
<br>
<div style="font-size:10pt; font-family:'Franklin Gothic Book'">NOTICE: This email message and all attachments transmitted with it may contain privileged and confidential information, and information that is protected by, and proprietary to, Parsons Corporation,
 and is intended solely for the use of the addressee for the specific purpose set forth in this communication. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other
 use of this message or its attachments is strictly prohibited, and you should delete this message and all copies and backups thereof. The recipient may not further distribute or use any of the information contained herein without the express written authorization
 of the sender. If you have received this message in error, or if you have any questions regarding the use of the proprietary information contained therein, please contact the sender of this message immediately, and the sender will provide you with further
 instructions.</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>