[iTowns-user] Elevation Layers and supported formats

Dalton, Charlie Charlie.Dalton at parsons.com
Tue Jan 28 08:39:28 PST 2020


Adrien,


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.

​

image/x-bil;bits=32 is just the mime type correct? I assume that's the standard mime type definition for .bil files?


Also thank you for the information on other formats.


Charlie Dalton

________________________________
From: Adrien Berthet <Adrien.Berthet at ign.fr>
Sent: Tuesday, January 28, 2020 3:40 AM
To: Dalton, Charlie; itowns-user at lists.osgeo.org
Subject: [EXTERNAL] RE:Elevation Layers and supported formats

You can also see here that iTowns support color-coded elevation (on a grey scale):
https://github.com/iTowns/itowns/blob/master/examples/view_25d_map.html#L80-L98 [github.com]<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=>

________________________________
De : ITowns-user [itowns-user-bounces at lists.osgeo.org] de la part de Adrien Berthet [Adrien.Berthet at ign.fr]
Envoyé : mardi 28 janvier 2020 09:17
À : Dalton, Charlie; itowns-user at lists.osgeo.org
Objet : Re: [iTowns-user] Elevation Layers and supported formats

Hi Charlie,


> First, can I create an elevation layer using WMS with iTowns or does it need to be a WMTS endpoint?


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 (http://www.itowns-project.org/itowns/docs/#api/Source/WMSSource [itowns-project.org]<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=>). You can change the endpoint however you want, as it is completely independant from the layer (in almost all the case, yours being one).


> Second, will elevation only work with x-bil format and if not, what other formats may I use?


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:

- the fetcher of the source: use one from Fetcher (http://www.itowns-project.org/itowns/docs/#api/Provider/Fetcher [itowns-project.org]<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=>), and set it like wmsSourceInstance.fetcher = Fetcher.choosenMethod

- the parser of the source: do what you need to do, the output needs to be a THREE.DataTexture (https://threejs.org/docs/#api/en/textures/DataTexture [threejs.org]<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=>), and specify it by writing wmsSourceInstance.parser = newParserMethod

- optional, the converter of the source: you can see here (https://github.com/iTowns/itowns/blob/master/src/Converter/textureConverter.js#L42-L49 [github.com]<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=>) what the converter is doing for the data, feel free to override it if needed by setting wmsSourceInstance.convert = newConvertMethod


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: https://github.com/iTowns/itowns/blob/master/src/Provider/DataSourceProvider.js [github.com]<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=>


Hope it helps !


Adrien

________________________________
De : ITowns-user [itowns-user-bounces at lists.osgeo.org] de la part de Dalton, Charlie [Charlie.Dalton at parsons.com]
Envoyé : lundi 27 janvier 2020 20:18
À : itowns-user at lists.osgeo.org
Objet : [iTowns-user] Elevation Layers and supported formats


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.


​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:


ElevationLayer#update(...)

LayeredMaterialNodeProcessing#updateLayeredMaterialNodeElevation(...)

XbilParser#computeMinMaxElevation(...)

​

First, can I create an elevation layer using WMS with iTowns or does it need to be a WMTS endpoint?

Second, will elevation only work with x-bil format and if not, what other formats may I use?


Charlie Dalton

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/itowns-user/attachments/20200128/c7a686d4/attachment-0001.html>


More information about the ITowns-user mailing list