Load DTED2 data on OSG earth,

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

Load DTED2 data on OSG earth,

Hi,
I am trying to load DTED2 data on osgEarth.Below changes done on .earth file
<elevation name="terrain" driver="gdal">
<extension>dt0;dt1;dt2</extension>
<profile srs="wgs84" vdatum="egm96"/>
</elevation>

and made below change code code to retrieve altitude in queryEleavtion
 osg::Vec3d world;
        osgUtil::LineSegmentIntersector::Intersections hits;
        if ( view->computeIntersections(x, y, hits) )
        {
            world = hits.begin()->getWorldIntersectPoint();

            // convert to map coords:
            GeoPoint mapPoint;
            mapPoint.fromWorld( _terrain->getSRS(), world );

            // do an elevation query:
            double query_resolution = 0; // max.
            double out_hamsl        = 0.0;
            double out_resolution   = 0.0;

            bool ok = _query.getElevation(
                mapPoint,
                out_hamsl,
                query_resolution,
                &out_resolution );
But bool ok value returned is false. So not able to retrieve altitude value. Any help is appreciated.
           
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Load DTED2 data on OSG earth,

Does the osgearth_elevation example work for your earth file?
Glenn Waldron / Pelican Mapping
devbmk devbmk
Reply | Threaded
Open this post in threaded view
|

Re: Load DTED2 data on OSG earth,

It is not working.  I need help in loading dted2 data
On. Earth file in osgEath. Plz help with Sample code.
Any help is appreciated .