Re: [osg-users] reading dem/image files...

2013-04-18 Thread Shayne Tueller
Just a followup post to my original inquiry...

After appending the .gdal to my .dt1 files to get the 
readHeightFieldFile() to read the DTED file format, I also had to do the 
following to get the DTED to render correctly...

osg::HeightField *grid = osgDB::readHeightFieldFile(n41.dt1.gdal);
grid-setOrigin(osg::Vec3(0.0, 0.0, 0.0));
xsize = (radius * osg::PI * grid-getXInterval()) / 180.0;
ysize = (radius * osg::PI * grid-getYInterval()) / 180.0;
grid-setXInterval(xsize);
grid-setYInterval(ysize);

where radius is the mean radius of the Earth in meters.

Hopefully this help someone who wants to do simple display of raw DTED data 
(i.e. *.dt1 files) using the default osg viewer...

-Shayne

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53690#53690





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] reading dem/image files...

2013-04-12 Thread Robert Osfield
Hi Shayne,

If you want to use the gdal plugin in this way you'll either need to
preload the gdal plugin or append the .gdal extension to your filename so
that the OSG knows to load the gdal plugin to attempt the load the data.

Robert.


On 11 April 2013 23:19, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC 
shayne.tuel...@hill.af.mil wrote:

 All,

 I'm attempting to load a height field by using

 osg::HeightField *grid = osgDB::readHeightFieldFile(...)

 where the file is a gdal supported dem/image file format. When I attempt
 to read the file, I'm getting the error

 Warning: could not find plugin to read objects from file...

 Is this because readHeightFieldFile() doesn't support the formats gdal
 supports or is there something wrong with my environment so that my
 plugins aren't loading correctly?

 My environment is window 7 and OSG 3.0.1...

 Thanks,
 -Shayne
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] reading dem/image files...

2013-04-12 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Robert,

I did try the extension of gdal and that successfully loaded the file.
However, the data doesn't display when I add by HeightField object to my
geode for display. The osgviewer app doesn't display the data correctly
either...

Any thoughts as to why?

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Friday, April 12, 2013 12:24 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] reading dem/image files...

Hi Shayne,


If you want to use the gdal plugin in this way you'll either need to
preload the gdal plugin or append the .gdal extension to your filename
so that the OSG knows to load the gdal plugin to attempt the load the
data.

Robert.



On 11 April 2013 23:19, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
shayne.tuel...@hill.af.mil wrote:


All,

I'm attempting to load a height field by using

osg::HeightField *grid = osgDB::readHeightFieldFile(...)

where the file is a gdal supported dem/image file format. When I
attempt
to read the file, I'm getting the error

Warning: could not find plugin to read objects from file...

Is this because readHeightFieldFile() doesn't support the
formats gdal
supports or is there something wrong with my environment so that
my
plugins aren't loading correctly?

My environment is window 7 and OSG 3.0.1...

Thanks,
-Shayne
___
osg-users mailing list
osg-users@lists.openscenegraph.org

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] reading dem/image files...

2013-04-11 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
All,

I'm attempting to load a height field by using

osg::HeightField *grid = osgDB::readHeightFieldFile(...)

where the file is a gdal supported dem/image file format. When I attempt
to read the file, I'm getting the error

Warning: could not find plugin to read objects from file...

Is this because readHeightFieldFile() doesn't support the formats gdal
supports or is there something wrong with my environment so that my
plugins aren't loading correctly?

My environment is window 7 and OSG 3.0.1...

Thanks,
-Shayne
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] reading dem/image files...

2013-04-11 Thread Shayne Tueller
osgEarth is sort of an overkill for my little app that just displays raw DTED 
(*.dt1) geocells for inspection.

I did find an earlier thread that addresses my question. The plugin is found if 
you append .gdal onto the file name (i.e. w112_n42.dt1.gdal). The plugin is 
now found and the file is read but the displayed data is garbled and all wrong. 
For a sanity check, I did the following...

osgviewer --dem w112_n42.dt1.gdal

and I get the same results of garbled data.

Any ideas?

Shayne

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53573#53573





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org