WebWorldWind icon indicating copy to clipboard operation
WebWorldWind copied to clipboard

Loading several local DTMs

Open RamiroMF opened this issue 7 years ago • 12 comments

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

RamiroMF avatar Mar 06 '17 10:03 RamiroMF

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);

AkeluX avatar Mar 14 '17 07:03 AkeluX

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?

RamiroMF avatar Mar 14 '17 08:03 RamiroMF

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.

AkeluX avatar Mar 14 '17 08:03 AkeluX

Awesome. Thanks a lot! we will try do that asap.

RamiroMF avatar Mar 14 '17 08:03 RamiroMF

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?

RamiroMF avatar Mar 14 '17 08:03 RamiroMF

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.

AkeluX avatar Mar 14 '17 08:03 AkeluX

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?

RamiroMF avatar Mar 14 '17 08:03 RamiroMF

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.

AkeluX avatar Mar 14 '17 09:03 AkeluX

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!

RamiroMF avatar Mar 14 '17 09:03 RamiroMF

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?

AkeluX avatar Mar 15 '17 13:03 AkeluX

Relates to #20

AkeluX avatar Mar 31 '17 12:03 AkeluX

@RamiroMF any feedback on this suggestion to merge your models server-side?

AkeluX avatar Apr 28 '17 11:04 AkeluX