Try omitting the s_srs portion of the gdalwarp command to see if that makes any 
difference.

I believe dted files will need to be reprojected as well since VPB builds the 
database using the source data coordinate system.

-Shayne

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Atilla Selem
Sent: Friday, May 06, 2011 12:39 AM
To: [email protected]
Subject: Re: [osg-users] [vpb] Flat Database Generation in Meters reallyshocked 
me when i load it to my osg application..!!!

Hi Shayne, 
Hi Glenn,
Thanks for ur kind replies..

Shayne,
As you know MyTerrain.tif file projection info was;
Geographic ( Latitude / Longitude ) 
[N:36, E128] [N:38, E130] is in Utm Zone 52
Datum : WGS84
Unit : Arc degrees.

i tried to reproject MyTerrain.tif file using ur gdalwarp command like this..
gdalwarp -s_srs "proj=latlong +datum=WGS84" -t_srs "proj=utm +zone=52 
+datum=WGS84" MyTerrain.tif MyTerrainUtm.tif

command prompt displayed such an error;
ERROR 1 : Translating source or target SRS failed:
proj=latlong +datum=WGS84

Is gdalwarp command true in terms of parameters?
And one more question.. Should i run gdalwarp command for each of my dted-2 
files which have Geographic projection before using osgdem?

Thanks a lot,
Atilla.


S2LR wrote:
> Try using the following to reproject your data...
> 
> gdalwarp -s_srs "proj=latlong +datum=WGS84" -t_srs "proj=utm +zone=11 
> +datum=WGS84" infile outfile
> 
> Do this before using osgdem on your data files. UTM zone selection will be 
> dependent upon where your lat/lon is...
> 
> -Shayne
> 
> -----Original Message-----
> From:  [mailto:] On Behalf Of Atilla Selem
> Sent: Thursday, May 05, 2011 11:09 AM
> To: 
> Subject: Re:  [vpb] Flat Database Generation in Meters reallyshocked me when 
> i load it to my osg application..!!!
> 
> Hi Glenn,
> Thanks for the tip.. but i really need to know,
> 
> Where should i do reprojection? In my dted-2 files and/or in my GeoTiff.file 
> (since their projections are both Geographic - Lat/Lon) before executing 
> osgdem?
> Or should i do re-scaling or whatever after i load terrain in osg application?
> And What tool or command option should i use to reproject to UTM?
> 
> thanks in advance..
> 
> Atilla.
> 
> 
> 
> Glenn Waldron wrote:
> 
> > Atilla,osgdem is creating your model in what's called a "plate carre" 
> > projection -- in which degrees are simply reinterpreted as meters. That is 
> > why your 2x2 degree cell is appearing as 2x2 meters.
> > 
> > 
> > You need to reproject into a proper projected spatial reference system 
> > (like UTM) to get the correct extents.
> > 
> > 
> > Check the bottom of this page for tips:
> > http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem 
> > (http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem)
> > 
> > 
> > Glenn Waldron / Pelican Mapping / @glennwaldron
> > 
> > 
> > On Thu, May 5, 2011 at 12:25 PM, Atilla Selem < ()> wrote:
> > 
> > 
> > > Hi,
> > > 
> > > i have tried to generate a terrain (.ive) database using osgdem 
> > > commandline options in order to buid a flat database where coordinates 
> > > are in meters. After successfull generation i put that terrain in my osg 
> > > application and really shocked! Before telling you what i saw as the 
> > > output let me tell you my inputs.
> > >  - i have four Dted-2 elevation file,
> > >  - i have one GeoTiff image which is successfully mapped on dted files.
> > >  - Dteds are starting (from 36N, 128E to 38N, 130E). So there are 4 1x1 
> > > degree cells [ Total size is 2x2].
> > >  - GeoTiff image also extends from 36N, 128E to 38N, 130E. So it covers 
> > > [2x2] elevation file without no problem.
> > > 
> > > Dted and Image Coordinate Systems are:
> > > Geographic ( Latitude / Longitude )
> > > Datum : WGS84
> > > Unit : Arc degrees.
> > > 
> > > after putting dteds and image in seperate folders ( MyDted, MyImage ) i 
> > > executed the following vpb command to generate my flat database.
> > > 
> > > - osgdem -t MyDted -d MyImage -l 8 -v 0.1 -o MyTerrain_Flat.ive
> > > 
> > > after executig above line and loading Terrain_Flat.ive on my osg 
> > > application it was really difficult to find where is MyTerrain_Flat.ive 
> > > on my view.
> > > When i zoom in What i saw was a 2x2 meter flat database in osg size. 
> > > !!!It was located on x = 128 , y = 36 on my view according to ( 0,0,0) of 
> > > my scene!!!
> > > Real size of Dteds of Image was 178 km in Easting and 221 km in 
> > > Northing.. i have checked size and everythings was ok with Dted and Image.
> > > 
> > > Now the question is
> > > 1 - Is there a problem with vpb when creating flat database in meters?
> > > 2- Have i missed a command line option?
> > > 3- Why is the generated terrain covers 2x2 meters although it is 178 x 
> > > 221 km in real size?
> > > 4- Why it is located in x = 128 , y = 36 ? Those were Lower Left Lat/Lon 
> > > coordinates of dteds and image file?
> > > 4- Isn't it possible to generate real size flat terrains in meters in 
> > > x,y,z using vpb?
> > > 
> > > Any help is really appreciated...
> > > 
> > > ...
> > > 
> > > Thank you!
> > > 
> > > Cheers,
> > > Atilla
> > > 
> > > ------------------
> > > Read this topic online here:
> > > http://forum.openscenegraph.org/viewtopic.php?p=39045#39045 
> > > (http://forum.openscenegraph.org/viewtopic.php?p=39045#39045)
> > > 
> > > 
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > osg-users mailing list
> > > ()
> > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
> > > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > > 
> > > 
> > 
> > 
> > 
> 
> 
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=39053#39053
> 
> 
> 
> 
> 
> _______________________________________________
> osg-users mailing list
> 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> _______________________________________________
> osg-users mailing list
> 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
>  ------------------
> Post generated by Mail2Forum


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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to