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 

Height of terrain


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
bhanu406
Newbie


Joined: 18 Nov 2016
Posts: 14

PostPosted: Fri Mar 03, 2017 7:56 am    Post subject:
Height of terrain
Reply with quote

Hi,
How can i get height of the terrain on a given x/y vlaue. My terrain is flat database(EPSG:3857).
...

Thank you!

Cheers,
Bhanu
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10791

PostPosted: Fri Mar 03, 2017 8:26 am    Post subject:
Height of terrain
Reply with quote

On 3 March 2017 at 07:56, Bhanu Chandra <> wrote:
Quote:
How can i get height of the terrain on a given x/y vlaue. My terrain is flat database(EPSG:3857).

osgSim::HeightAboveTerrain might fit the bill....


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


Joined: 18 Nov 2016
Posts: 14

PostPosted: Fri Mar 03, 2017 8:54 am    Post subject:
Reply with quote

Hi,
I tried with following expression
double X = 8489499, Y = 1115164, Z = 0;
uble height = sgSim::HeightAboveTerrain::computeHeightAboveTerrain(terrain.get(),osg::Vec3(X, Y, Z));
I am getting height value as 0. Can any one help me.
...

Thank you!

Cheers,
Bhanu
Back to top
View user's profile Send private message
bhanu406
Newbie


Joined: 18 Nov 2016
Posts: 14

PostPosted: Fri Mar 03, 2017 9:03 am    Post subject:
Reply with quote

Hi,
In above expression height is double. Sorry for the mistake
...

Thank you!

Cheers,
Bhanu
Back to top
View user's profile Send private message
SMesserschmidt (Sebastian Messerschmidt)
Forum Moderator


Joined: 10 Sep 2013
Posts: 704

PostPosted: Fri Mar 03, 2017 12:30 pm    Post subject:
Height of terrain
Reply with quote

Hi Bhanu,

We surely cannot help you without the data you use.
But try to use a Z-Value that is actually _above_ the the terrain might
help.

Cheers
Sebastian

Quote:
Hi,
I tried with following expression
double X = 8489499, Y = 1115164, Z = 0;
uble height = sgSim::HeightAboveTerrain::computeHeightAboveTerrain(terrain.get(),osg::Vec3(X, Y, Z));
I am getting height value as 0. Can any one help me.
...

Thank you!

Cheers,
Bhanu

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









------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
shayne.tueller
Guest





PostPosted: Fri Mar 03, 2017 3:30 pm    Post subject:
Height of terrain
Reply with quote

If your database is in geocentric coordinates, a z value of zero puts you at the equator somewhere...most likely where there is no terrain data.


Make sure your geocentric coordinates are correct for where you have terrain data.






Sent via the Samsung Galaxy S® 5 ACTIVE™, an AT&T 4G LTE smartphone



-------- Original message --------
From: Sebastian Messerschmidt <>
Date: 3/3/17 5:28 AM (GMT-07:00)
To:
Subject: Re: Height of terrain

Hi Bhanu,

We surely cannot help you without the data you use.
But try to use a Z-Value that is actually _above_ the the terrain might
help.

Cheers
Sebastian

Quote:
Hi,
I tried with following expression
double X = 8489499, Y = 1115164, Z = 0;
uble height = sgSim::HeightAboveTerrain::computeHeightAboveTerrain(terrain.get(),osg::Vec3(X, Y, Z));
I am getting height value as 0. Can any one help me.
...

Thank you!

Cheers,
Bhanu

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









------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General 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 How to query height of terrain given ... vinothrajendran4 VirtualPlanetBuilder [vpb] 0 Tue Mar 14, 2017 2:43 pm View latest post
No new posts problem with shapefile height when lo... vinothrajendran4 General 2 Thu Feb 16, 2017 12:22 pm View latest post
No new posts Error building terrain with shapefile... robertosfield VirtualPlanetBuilder [vpb] 0 Mon Feb 06, 2017 9:11 am View latest post
No new posts Error building terrain with shapefile... vinothrajendran4 VirtualPlanetBuilder [vpb] 0 Mon Feb 06, 2017 6:24 am View latest post
No new posts How to change terrain elevation manua... vinothrajendran4 VirtualPlanetBuilder [vpb] 1 Wed Jan 04, 2017 5:00 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