[osg-users] vpb: Spherical terrains?

Alejandro Aguilar Sierra algsierra at gmail.com
Tue Sep 30 09:13:53 PDT 2008


Hi Robert,

Actually the original data has all the information needed, I gess.
It's the height map of Earth's Moon, taken from
http://pubs.usgs.gov/of/2006/1367/

$ gdalinfo ULCN2005_lpo.txt
Driver: AAIGrid/Arc/Info ASCII Grid
Files: ULCN2005_lpo.txt
Size is 5760, 2880
Coordinate System is `'
Origin = (-180.000000000000000,90.000000000000000)
Pixel Size = (0.062500000000000,-0.062500000000000)
Corner Coordinates:
Upper Left  (-180.0000000,  90.0000000)
Lower Left  (-180.0000000, -90.0000000)
Upper Right ( 180.0000000,  90.0000000)
Lower Right ( 180.0000000, -90.0000000)
Center      (   0.0000000,   0.0000000)
Band 1 Block=5760x1 Type=Int16, ColorInterp=Undefined
 NoData Value=-32768


I converted this file to GeoTiff

gdal_translate -of GTiff -co "TILED=YES" ULCN2005_lpo.txt moon_tiled.tif

Then applied osgdem with a previous false color  texture I had generated.

osgdem --geocentric --whole-globe -t moonrbw2_tex.tif  -d moon_tiled.tif \
       -l 5 \
       --radius-equator 1735000 \
       -v 0.60 \
       -o lunarsph.ive > errlog2

The result is rather weird (attached). The texture image in this test
is smaller than the DEM file, just 1024x512 (attached, level 2).

What  am I doing wrong?

Thanks in advance.

-- A.



On Mon, Sep 29, 2008 at 9:32 AM, Robert Osfield
<robert.osfield at gmail.com> wrote:
> Hi Alejandro,
>
> The GDAL error that is produced suggests that you are trying to apply
> a transform to the data when the data doesn't have an geocentric
> infomation associated with it - which boils down to it can't transform
> data when it doesn't know what coordinate system it's starting off in.
>  You need to use imagery/dems with coordinates system or apply them
> manually.
>
> Robert.
>
> On Mon, Sep 29, 2008 at 3:00 PM, Alejandro Aguilar Sierra
> <algsierra at gmail.com> wrote:
>> Hello:
>>
>> As recommended in this forum, I installed both osg and vpb from svn
>> and I was able to reproduce the example with the Punget terrain.
>>
>> Now I want to try it with planets, starting with the moon.
>>
>> I started trying with these parameters --geocentric --spherical
>> --radius-equator 1735000  but I get this error:
>>
>> ERROR 1: Unable to compute a transformation between pixel/line
>> and georeferenced coordinates for moon_heigth.tif.
>> There is no affine transformation and no GCPs.
>>
>> I assume I could add that transformation in a world file or creating a
>> geotiff file, but I am not sure how to do that.
>>
>> I also assume that the bluemarble options only works at Earth scale,
>> as in this example:
>>
>> http://www.andesengineering.com/BlueMarbleViewer/
>>
>> Sorry if these are faqs, I am a newvbie and there is not much
>> documentation about this subject.
>>
>> I will appreciate any advice.
>>
>> Regards,
>>
>> -- Alejandro Sierra
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: solid.jpg
Type: image/jpeg
Size: 10451 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080930/3ea71eee/attachment-0012.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wire.jpg
Type: image/jpeg
Size: 19387 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080930/3ea71eee/attachment-0013.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: near.jpg
Type: image/jpeg
Size: 59389 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080930/3ea71eee/attachment-0014.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moonrbw2_tex-2.jpg
Type: image/jpeg
Size: 18325 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080930/3ea71eee/attachment-0015.jpg>


More information about the osg-users mailing list