OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Flat Database Generation in Meters really shocked me when i load it to my osg application..!!!


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> VirtualPlanetBuilder [vpb]
View previous topic :: View next topic  
Author Message
strongbutshy
Newbie


Joined: 01 Mar 2011
Posts: 17

PostPosted: Thu May 05, 2011 4:27 pm    Post subject:
Flat Database Generation in Meters really shocked me when i load it to my osg application..!!!
Reply with quote

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
Back to top
View user's profile Send private message
Glenn Waldron
Guest





PostPosted: Thu May 05, 2011 4:47 pm    Post subject:
Flat Database Generation in Meters really shocked me when i load it to my osg application..!!!
Reply with quote

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


Glenn Waldron / Pelican Mapping / @glennwaldron


On Thu, May 5, 2011 at 12:25 PM, Atilla Selem < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
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





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
strongbutshy
Newbie


Joined: 01 Mar 2011
Posts: 17

PostPosted: Thu May 05, 2011 5:08 pm    Post subject:
Re: Flat Database Generation in Meters really shocked me when i load it to my osg application..!!! - "plate carre"
Reply with quote

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


Glenn Waldron / Pelican Mapping / @glennwaldron


On Thu, May 5, 2011 at 12:25 PM, Atilla Selem < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
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





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Glenn Waldron
Guest





PostPosted: Thu May 05, 2011 5:22 pm    Post subject:
Flat Database Generation in Meters really shocked me when i load it to my osg application..!!!
Reply with quote

I recommend reprojecting them first. You can use gdalwarp, or a tool like Global Mapper.

You may also want to investigate osgEarth as an alternative approach to doing terrain with OSG.
Glenn Waldron / Pelican Mapping / @glennwaldron


On Thu, May 5, 2011 at 1:08 PM, Atilla Selem < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
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:
Quote:
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:

Quote:
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




Quote:
On Thu, May 5, 2011 at 12:25 PM, Atilla Selem < ()> wrote:

Quote:
 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:


Quote:
Quote:
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)



 ------------------
Post generated by Mail2Forum


------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=39053#39053






_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




------------------
Post generated by Mail2Forum
Back to top
S2LR
Appreciator


Joined: 13 Nov 2010
Posts: 208

PostPosted: Thu May 05, 2011 6:43 pm    Post subject:
Flat Database Generation in Meters reallyshocked me when i load it to my osg application..!!!
Reply with quote

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:
Quote:
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:

Quote:
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








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
strongbutshy
Newbie


Joined: 01 Mar 2011
Posts: 17

PostPosted: Fri May 06, 2011 6:39 am    Post subject:
Re: Flat Database Generation in Meters reallyshocked me when i load it to my osg application..!!!
Reply with quote

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:
Quote:
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:

Quote:
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








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
strongbutshy
Newbie


Joined: 01 Mar 2011
Posts: 17

PostPosted: Fri May 06, 2011 11:39 am    Post subject:
Re: Flat Database Generation in Meters really shocked me when i load it to my osg application..!!!
Reply with quote

Hi Glenn,
i have reprojected MyTerrainImage.tif from GCS ( Geographic coordinate system ) to UTM using GlobalMapper successfully,
Should i re-project Dted-2 Elevation files to UTM projection as well?
İf so;
Should i use osgdem command like this;

osgdem --cs "+proj=utm +zone=52" -d MyDteds - MyImage -o...
or without --cs and projection info ( since they are already projected)

osgdem -d MyDteds - MyImage -o...

???

thx,
atilla.



Glenn Waldron wrote:
I recommend reprojecting them first. You can use gdalwarp, or a tool like Global Mapper.

You may also want to investigate osgEarth as an alternative approach to doing terrain with OSG.
Glenn Waldron / Pelican Mapping / @glennwaldron


On Thu, May 5, 2011 at 1:08 PM, Atilla Selem < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
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:
Quote:
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:

Quote:
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




Quote:
On Thu, May 5, 2011 at 12:25 PM, Atilla Selem < ()> wrote:

Quote:
 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:


Quote:
Quote:
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)



 ------------------
Post generated by Mail2Forum


------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=39053#39053






_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
S2LR
Appreciator


Joined: 13 Nov 2010
Posts: 208

PostPosted: Fri May 06, 2011 3:38 pm    Post subject:
Flat Database Generation in Meters reallyshocked me when i load it to my osg application..!!!
Reply with quote

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: [mailto:] On Behalf Of Atilla Selem
Sent: Friday, May 06, 2011 12:39 AM
To:
Subject: Re: [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:
Quote:
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:

Quote:
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:


Quote:
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



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








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> VirtualPlanetBuilder [vpb] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Load an obj file and mapping a given ... aaa3d General 3 Mon Aug 06, 2018 2:27 pm View latest post
No new posts Load OSG trimesh to ODE: Read Vertice... TKoller General 2 Fri Jul 20, 2018 3:06 pm View latest post
No new posts Fix hardware mipmap generation for cu... Farshid Lashkari Submission 0 Wed Jul 18, 2018 3:47 pm View latest post
No new posts Model(s) load ~10 times longer in 3.6... davisjamesf General 16 Wed Jul 04, 2018 7:18 pm View latest post
No new posts FbxPlugin: Check existance of file be... bbjorn Submission 1 Thu May 03, 2018 10:58 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP