Hello,

I have read in an ive terrain database created with the following command:

osgdem --geocentric -d dted.geotiff --POLYGONAL --no-terrain-simplification -o 
terrain.osg

What I want to do is find the lat lon of a given vertex within the 
coordinateSystemNode.  I am able to read in the ive as a node and do a dynamic 
cast to a coordinateSystemNode.  I also have a nodevisitor set up that is able 
to pull out the vertex values that I need.  However, these vertex Vec3d values 
are in the local coordinate system of the node, not the world coordinates.  I 
know by looking at the terrain.osg file that the structure of the 
coordinateSystemNode is as follows:

CoordinateSystemNode
 - EllipsoidModel
 - MatrixTransform
 --   Matrix
  --  Geode
  ---    Geometry
  ----      ClusterCullingCallback
   ----     PrimitiveSets 2
   ----     VertexArray
   ----     NormalArray
   ----     ColorBinding OVERALL
   ----     ColorArray
   ----     TexCoordArray

I think I may have to somehow use the Matrix in the CoordinateSystemNode to get 
out the global xyz values from the vertex coordinates, then convert the global 
coordinates to lat lon using  osg::EllipsoidModel::convertXYZToLatLongHeight    
 

Is this the correct method?  Am I missing something that would make this 
process easier/more efficient?  Thanks much.

-Ethan

P.S. Sorry for all the questions lately, not trying to spam the forum too hard, 
I try to spend at least a few hours trying to figure anything out on my own 
before posting here.

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





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

Reply via email to