Draw ContourMap on top of a vector layer

classic Classic list List threaded Threaded
3 messages Options
JD JD
Reply | Threaded
Open this post in threaded view
|

Draw ContourMap on top of a vector layer

Hi,

I have a base vector layer that displays the lands (feature_geom en drape mode).
And I want to display the ContourMap on top of it.
Is it possible?

Thank you,
Jérôme.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Draw ContourMap on top of a vector layer

Jérôme,
It should "just work" but if it doesn't there might be a bug. I'm not able to test at the moment; Can you open a github issue please?

Glenn Waldron


On Fri, Nov 22, 2019 at 11:51 AM JD [via osgEarth] <[hidden email]> wrote:
Hi,

I have a base vector layer that displays the lands (feature_geom en drape mode).
And I want to display the ContourMap on top of it.
Is it possible?

Thank you,
Jérôme.


If you reply to this email, your message will be added to the discussion below:
http://forum.osgearth.org/Draw-ContourMap-on-top-of-a-vector-layer-tp7592956.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.
NAML
Glenn Waldron / Pelican Mapping
JD JD
Reply | Threaded
Open this post in threaded view
|

Re: Draw ContourMap on top of a vector layer

It does not work. The drape layer is always on top of the contour.

To give more context (i should have started by that!):
I have an elevation layer.
I want a vector layer (continents in drape mode) to be the layer drawn first with one color.
Then I want to colorize with a specific color ramp but only when the elevation is above a given height.


To do so I customized the ContourMap plugin.
First by discarding fragments where the height is below the threshold. But in this case it is the terrain surface that is discarded, not just the color of the contourmap layer (and the contourmap layer is displayed below the vector layer).
Second try, by putting the alpha at 1 where the height is below the threshold. It works well for the contourmap layer, but remains the issue that the contourmap is displayed before the vector layer.

Any ideas?

I wonder if i could directly colorize the vector layer with a shader according to the elevation. But to do so, i need access to oe_terrain_getElevation which i think it cannot be used in the context of a vector layer. Right?