Hello All,
I am trying to make a terrain using the largest blue marble imagery
for texture and 90 meter SRTM data for geometry.
I used gdal_translate to get the blue marble texture imagery into
shape like this:
gdal_translate -gcp 0 0 -90 90 -gcp 21600 0 0 90 -gcp 21600 21600 0 0
-a_ullr -90 90 0 0 -a_srs EPSG:4326
world.topo.bathy.200407.3x21600x21600.B1.png
world.topo.bathy.200407.3x21600x21600.B1.anchors.tif
Then, I cropped out a rectangle using
gdal_translate -projwin 0 10 10 0
world.topo.bathy.200407.3x21600x21600.B1.anchors.tif outfile.tif
Resulting in this (after gdaladdo):
gdalinfo africa_0_10_10_0.tif
Driver: GTiff/GeoTIFF
Size is 2400, 2400
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.2572235630016,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (-0.000000,10.000000)
Pixel Size = (0.00416667,-0.00416667)
Metadata:
AREA_OR_POINT=Area
Corner Coordinates:
Upper Left ( 0.0000000, 10.0000000) ( 0d 0'0.01"E, 10d 0'0.00"N)
Lower Left ( 0.0000000, 0.0000000) ( 0d 0'0.01"E, 0d 0'0.00"N)
Upper Right ( 10.0000000, 10.0000000) ( 10d 0'0.00"E, 10d 0'0.00"N)
Lower Right ( 10.0000000, 0.0000000) ( 10d 0'0.00"E, 0d 0'0.00"N)
Center ( 5.0000000, 5.0000000) ( 5d 0'0.00"E, 5d 0'0.00"N)
Band 1 Block=2400x3 Type=Byte, ColorInterp=Red
Overviews: 1200x1200, 600x600, 300x300, 150x150, 75x75, 38x38,
19x19, 10x10, 5x5, 3x3
Band 2 Block=2400x3 Type=Byte, ColorInterp=Green
Overviews: 1200x1200, 600x600, 300x300, 150x150, 75x75, 38x38,
19x19, 10x10, 5x5, 3x3
Band 3 Block=2400x3 Type=Byte, ColorInterp=Blue
Overviews: 1200x1200, 600x600, 300x300, 150x150, 75x75, 38x38,
19x19, 10x10, 5x5, 3x3
Here's the resulting file after I did something similar to the SRTM data:
gdalinfo srtm_0_10_10_0.tif
Driver: GTiff/GeoTIFF
Size is 1200, 1200
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.2572235630016,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (-0.000000,10.000000)
Pixel Size = (0.00833333,-0.00833333)
Metadata:
AREA_OR_POINT=Area
Corner Coordinates:
Upper Left ( -0.0000001, 10.0000003) ( 0d 0'0.00"W, 10d 0'0.00"N)
Lower Left ( -0.0000001, 0.0000004) ( 0d 0'0.00"W, 0d 0'0.00"N)
Upper Right ( 9.9999999, 10.0000003) ( 10d 0'0.00"E, 10d 0'0.00"N)
Lower Right ( 9.9999999, 0.0000004) ( 10d 0'0.00"E, 0d 0'0.00"N)
Center ( 4.9999999, 5.0000003) ( 5d 0'0.00"E, 5d 0'0.00"N)
Band 1 Block=1200x3 Type=Int16, ColorInterp=Gray
Overviews: 600x600, 300x300, 150x150, 75x75, 38x38, 19x19, 10x10,
5x5, 3x3, 2x2
When I combine these two and build a terrain using osgdem like this:
osgdem -t africa_0_10_10_0.tif -d srtm_0_10_10_0.tif -l 8 -v 5 -o
africa.ive -a africa.osga
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.
Thanks in advance,
David Colbert
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/