WebWorldWind
WebWorldWind copied to clipboard
Loading several local DTMs
Child of #575
Hi,
I'm the lead devel of PlanetServer a tool to analyze hyperpesctral images of Mars and the Moon using web world wind and rasdaman. At the moment we are serving a global DTM using geoserver. One of our goals is to serve local higher resolution DTMs. We see that www is capable of serving one DTM but we are afraid that serving more than one will force us to reset the globe every time we select a new DTM. Is that the case? In case this is viable, would you suggest a way to approach it?
Thanks a lot
Hi Ramiro, thank you for your patience. We were discussing the matter in the team.
Although this is in our roadmap, we currently don't support so-called compound elevation models in WebWorldWind.
Nonetheless, if you have a way to detect/know when the local model should be loaded, you can change the global model with a higher-resolution model without reloading the whole globe.
wwd.globe.elevationModel = customElevationModelInstance;
wwd.redraw();
In addition, if you don't want your custom elevation model to span the whole globe, but just the region of interest, you can change its coverage sector. In a custom class inheriting from ElevationModel, this can be achieved as follows, for example with new Sector(44.9, 46, 23.32, 24.75)
:
ElevationModel.call(this, new Sector(44.9, 46, 23.32, 24.75), new Location(45, 45), 12, "application/bil16", "EarthElevations256", 256, 256);
Hi @AkeluX
That is an awesome and very well explained answer. Really appreciated. Indeed that makes sense to redraw the DTM, but will this only load the DTM or if we have something else loaded (polygons, images, pointers) will also reload it?
If you use wwd.globe.elevationModel = customElevationModelInstance;
to change the elevation model, you won't lose any other changes made to WebWorldWind, e.g. layers, renderables, etc.
Awesome. Thanks a lot! we will try do that asap.
Sorry one more question. Regarding customElevationModelInstance; do you mean to change the endpoint of the DTM and then redraw right? So GlobalEndpoint = A, LocalEndpoint1=B, if within xy coordinates then change DTM to B and redraw? is that ok?
That sounds about right. I mean change the whole instance of ElevationModel and the different instances might indeed point to different DTM sources. Yes, you always need to redraw after this type of changes.
Ok. Could you please provide a simple example that instance? At the moment what we have done is to change the www code in "EarthElevationModel.js ", change max and min elevation and point to another URL. Is it possible to do without messing around too much the original code?
You shouldn't need to mess around in the original code for this, but inherit from the existing classes. Remember that this is more a workaround than anything else until we support compound elevation models. I'll send you an example, but can't prepare it right now.
Sure! That is the issue that we want to remove all the hard-coded stuff we introduced in www. Looking forward for the example. Thanks a lot!
Hi Ramiro, before I come back to you with an example, we were wondering if there wouldn't be a nicer solution to it.
If I understood correctly, you have a global low-resolution model and you have higher-resolution datasets for some regions. They are all served by some kind of GeoServer. Couldn't they be combined by your GeoServer, or at least server-side, and served as one global model? The server would then provide an as accurate model as possible with the available data. This depends of course on the format of data you have and the way you serve them to WorldWind. Could you tell us more about this?
Relates to #20
@RamiroMF any feedback on this suggestion to merge your models server-side?