I know that the OpenFlight plugin checks
units and does internal scaling, but I don’t know about osgdem. I think
osgdem uses GDAL for all of its file loading, but degrees (angular) to meters
(linear) might be too much to ask for in automatic units conversion.
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of David Colbert
Sent: Tuesday, August 01, 2006
2:19 PM
To: Antoine Hue
Cc: osg users
Subject: Re: [osg-users] osgdem
terrain scaling problem
Antoine, thanks for the
osgpick suggestion. It confirmed my problems...
It appears to be a units problem that I am having. OSG app units are meters. My
terrain units are all degrees, so a 10 degree by 10 degree terrain shows
up in OSG as a 10 meter by 10 meter terrain. Does anyone know how to output the
terrain in meters? I tried gdalwarping the file from degrees
into meters by running it through a gdalwarp -t_srs 'EPSG:4326
+units=meters' in.tif out.tif, which did change the "degree" unit to
"metre" unit as returned by gdalinfo.
However, when I run the new file through osgdem, I still get a 10 meter by 10
meter terrain. Does osgdem recognize these units changes? I went back and made
a bunch of test terrains with DEM, SRTM, geotiff, DTEDs, and they all ended up
as many meters wide as they were degrees wide, no matter how I warped them or
changed their metadata.
Any ideas?
Thanks in advance,
David
On 8/1/06, Antoine
Hue <[EMAIL PROTECTED]>
wrote:
David Colbert wrote:
> Hello All,
>
> <snip>
>
> My terrain looks okay in osgviewer, but when I load it into my app,
> it's tiny. Like less than 10 meters across tiny. Obviously, my scale
> is messed up, but I cannot find out what more I need to do. I set the
> corner anchors using -a_ullr; I tagged 3 points with gcp to provide
> additional geocorrelation information; and I set the coordinate system
> to match the coordinate system in the README pdf for the blue marble
> imagery.
>
> Did I do something wrong? Is this a bug? Any help would be much
> appreciated. The example with pegout says that -xx -yy is unecessary
> if you have all the geo metadata, which I believe that I do.
>
Hello David,
You are right, -xx and -yy are not needed in your case.
You may check the actual coordinates using osgpick instead of osgviewer
(same command usage).
Antoine