[osg-users] Shapefiles & Coordinate System Conversions
aftacer at gmail.com
Thu Jul 24 07:19:06 PDT 2008
I am brand new to OSG and I am still wading through all the information and
examples learning as much as I can. I am working on my latest exercise in
which I am overylaying a shapefile onto a terrain database that I have. The
shapefile consists of bodies of water (lakes) in California. I created the
terrain database using osgdem and some DTED data that I have for a small
portion of California. I know that the shapefile consists of lat, lon,
height data ( thanks to osgconv ) and I wanted to convert those data to
x,y,z coordinates in the coordinate system of the terrain. I did this by
using a node visitor for the shapefile node after reading it in with
readNodeFile. I accessed the ArrayData via the Geode instance and then
looped through the data using the ellipsoid model from the terrain's
coordinate system to convert the lat,long,height data. Then all I had to do
was the overlay stuff and add it to the root node.
Anyway, what I really want to know is if there is a better solution for
converting the lat,long,height data or am I on track?
Any existing examples or code snippets would be much appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users