[osg-users] [vpb] Correct way to get texture data from USGS or any other source?

Elias Tarasov elias.tarasov at gmail.com
Tue Jun 9 14:05:19 PDT 2015


Hello!
Thanks for quick reply, it helped to solve a problem.

SMesserschmidt wrote:
> Am 09.06.2015 um 11:35 schrieb Elias Tarasov:
> 
> > Hello!
> > I try to build map using vpb in ECEF.
> > According to manuals i've read it needs to start:
> > vpbmaster --geocentric -t texture_file -o output_file
> > So, clearly i need georeferenced texture file.
> > On that page:
> > http://www.osgvisual.org/projects/osgvisual/wiki/OsgTerrainData
> > there is a bunch of links to get data. Since --geocentric option allows not to use elevation data, then only textures are needed.
> > 
> 
> Who told you this? Of course you can use elevation data in geocentric 
> mode ...
> Simply use -t for imagery and -d for digitial elevation data
> 

The book is called "OpenSceneGraph 3 Cookbook"
Authors: 
Rui Wang
Xuelei Qian
Citation:
To build databases in geographic coordinate, we can simply use the --geocentric
option while executing vbpmaster. The complete command is:
# vpbmaster -t data/TrueMarble.4km.10800x5400.tif --geocentric
-o output/out.osgb
Don't doubt the arguments we used this time. Yes, there is no -d option and thus no 
elevation map specified. As we have already indicated to use the geocentric system 
to build from the source, VPB will automatically use flat sea-level elevation data and 
construct the earth geometry according to the given GeoTiff imagery.

> 
> 
> > 
> > And here is a problem: i can't get georeferenced textures from USGS.
> > 
> They are referenced, but in a non-supported coordinate frame. I never 
> had problems of this kind yet.
> But there are definitively geo-referenced data-sets on USGS, as I'm 
> using them myself.
> 

Yes, they are. Just in a different projection, it seems.

> 
> Use LandSAT imagery, which is WGS84 projected, so there should no 
> problems here.
> 

Actually, problems are exist. This is the LandSat image from USGS

c:\Terrain\EPP191R025_7F19990915>gdalinfo test_texture.tif
Driver: GTiff/GeoTIFF
Files: test_texture.tif
Size is 17884, 16140
Coordinate System is:
PROJCS["WGS 84 / UTM zone 33N",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",15],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32633"]]
Origin = (391518.750000000000000,5685165.750000000000000)
Pixel Size = (14.250000000000000,-14.250000000000000)
Metadata:
  AREA_OR_POINT=Point
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  391518.750, 5685165.750) ( 13d26'37.19"E, 51d18'26.83"N)
Lower Left  (  391518.750, 5455170.750) ( 13d30'34.78"E, 49d14'22.90"N)
Upper Right (  646365.750, 5685165.750) ( 17d 5'58.23"E, 51d17'56.30"N)
Lower Right (  646365.750, 5455170.750) ( 17d 0'37.84"E, 49d13'54.52"N)
Center      (  518942.250, 5570168.250) ( 15d15'57.15"E, 50d17' 0.02"N)
Band 1 Block=17884x1 Type=Byte, ColorInterp=Red
Band 2 Block=17884x1 Type=Byte, ColorInterp=Green
Band 3 Block=17884x1 Type=Byte, ColorInterp=Blue

Now datum is WGS84, but vpbmaster shows again
Error: vpbmaster can not run without all source data being in the correct destination coordinates system, please reproject them.

Maybe because PROJCS["WGS 84 / UTM zone 33N", not just WGS84?


> 
> If you need some sample data I can share a small set on googledrive etc.
> 

That's very kind, Sebastian, but the problem seems to have been solved already.

To use data with vpb i need to reproject them.

gdalwarp -s_srs EPSG:2238 -t_srs EPSG:4326 src.tif dst.tif

Now produced *.osgb image looks correctly into OSG viewer. However, it also looks quite plain. So elevation data is needed?

Thanks a lot!

Elias

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

Post generated by Mail2Forum

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








More information about the osg-users mailing list