Slow layer rendering with elevation from custom tilesource

classic Classic list List threaded Threaded
5 messages Options
Tension Tension
Reply | Threaded
Open this post in threaded view
|

Slow layer rendering with elevation from custom tilesource

This post was updated on .
Hi!

I have a problem after updating to 2.9rc from 2.8. I have my own tilesource with overriden createHeightField method (also initialize and hasData methods). This custom tilesource i used to initialize ElevationLayer.
All works fine, at least with the same speed as ElevationLayer from gdal driver. But after update, my data layers renders incredibly slow with existed elevation layer from custom tilesource (layers have data with terrain clamping).
I found that some refactoring with tilesource happened, but i can't find any hints that would help me to fix my problem.

I would appreciate any help. Thanks.
Tension Tension
Reply | Threaded
Open this post in threaded view
|

Re: Slow layer rendering with elevation from custom tilesource

I guess i found possible source of the problem. In TerrainLayer class (open method), if this TerrainLayer supplied with tilesource (like in my case), _dataExtents variable never be valid (because its assigned only in createAndOpenTileSource method, which is called if TerrainLayer is not supplied with tilesource), even if it's valid in tilesource. Is it works as intended?
In result, getBestAvailableTileKey  method returns same key and this leads to the fact that too many TileKeys (even in other LODs) trying to calculate HeightField when some data needs to clamp to terrain.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Slow layer rendering with elevation from custom tilesource

Tension,
Thanks. The "in-memory user tilesource" is not something that gets a lot of testing. A quick look indicates that perhaps createAndOpenTileSource() should be called in all cases, including the case in which you supplied your own TileSource instance to the Layer. Does this sound logical?
Glenn Waldron / Pelican Mapping
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Slow layer rendering with elevation from custom tilesource

I pushed a patch for this - give it a try please.
Glenn Waldron / Pelican Mapping
Tension Tension
Reply | Threaded
Open this post in threaded view
|

Re: Slow layer rendering with elevation from custom tilesource

Glenn,

Works fine now. Thanks!