[iTowns-user] Elevation Layers and supported formats

Adrien Berthet Adrien.Berthet at ign.fr
Tue Jan 28 02:40:07 PST 2020


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

________________________________
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). 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), 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), 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) 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


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/30ba8cf2/attachment-0001.html>


More information about the ITowns-user mailing list