Overlaying layers on top of each other

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

Overlaying layers on top of each other

I have CADRG image layers that are loaded after a certain zoom factor and DTED elevation layers that are added dynamically as the user pans around (at most 9 tiles of 1 by 1 lat/long loaded at a time).  When the elevation layers are added the map refreshes and blinks, which is fine.  However, if I'm too far zoomed in when the refresh occurs, the layers never render properly.  Instead the layers are blurry and indistinguishable.  If I load the elevation DTED layers and CADRG  at higher viewpoint z factor, then this doesn't occur.  The tiles load properly and I can zoom in further and they still display properly.

What could be causing the tiles to not load and look incorrect when dynamically loading them in closer to ground level?

I've found that the cut off is around 500,000 Meters above the surface.  Dynamically loading CADRG and DTED at this level causes the images to never load properly.  Loading above this value (600,000+) makes things load fine (and again after zooming in once its rendered is also fine).

I've checked the LODBlending class and messed with its options to see if it would have any effect, and it did not.  I also removed LODBlending completely and it appeared nothing changed with that either.

I am using osgEarth 2.10.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Overlaying layers on top of each other

Please post your earth file & osgEarth version.

Also, the LODBlending plugin is obsolete now - imagery morphing is built in to the terrain engine.
Glenn Waldron / Pelican Mapping
Josiah425 Josiah425
Reply | Threaded
Open this post in threaded view
|

Re: Overlaying layers on top of each other

earthfile.earth

When I add the DTED it's done dynamically like so:

if(scaleFromViewpoint(viewpoint) > 1000000){
    _mapNode->getMap()->addLayer(hillshadeLayer);
    _mapNode->getMap()->addLayer(colorLayer);
    _mapNode->getMap()->addLayer(elevationLayer);
}

I do not load these in the earth file.  Instead I construct these like so:
hillshadeLayer is .tif with opacity .65 with minLevel 7
colorLayer is .tif with opacity .65 with minLevel 7
elevationLayer is .vrt with opacity .65 with minLevel 7

Edit: osgEarth version 2.10 file format looks wrong here it is:

<map type='projected' version='2.0'>
        <options type='filesystem'>
                <path>~/map_cache</path>
               
                <profile>
                        <srs>+proj=longlat +ellps=WGS84 +no_defs</srs>
                        <xmin>-180.0</xmin>
                        <ymin>-90.0</ymin>
                        <xmax>180.0</xmax>
                        <ymax>90.0</ymax>
                </profile>
        </options>
       
        <image name="CADRG_GNC_NORTHERN" driver="gdal">
                <url>/filePath/CADRG/NorthernData/Data.TOC</url>
                <min_range>50000</min_range>
                <max_range>5000000</maxRange>
                <subdataset>1</subdataset>
                <subdataset>2</subdataset>
                <subdataset>3</subdataset>
                <subdataset>4</subdataset>
                <subdataset>5</subdataset>
                <opacity>0.65</opacity>
        </image>
       
        <image name="CADRG_GNC_SOUTHERN" driver="gdal">
                <url>/filePath/CADRG/SouthernData/Data.TOC</url>
                <min_range>50000</min_range>
                <max_range>5000000</maxRange>
                <subdataset>1</subdataset>
                <subdataset>2</subdataset>
                <subdataset>3</subdataset>
                <subdataset>4</subdataset>
                <subdataset>5</subdataset>
                <opacity>0.65</opacity>
        </image>
</map>