[osg-users] osg::CoordinateSystemNode
Robert Osfield
robert.osfield at gmail.com
Wed Apr 6 09:06:43 PDT 2016
HI Filip,
The osg::CoordinateSystemNode is a data container node that stores the
coordinate system details of it's subgraph. It's use is passive, other
functions in the OSG or client apps query the CoordinateSystemNode to find
out what coordinate system it's subgraph is in. So if you generated a
database you'd decorate it with a CoordinateSystemNode to be able to tell
other functions above the coordinate system you've used. It's not for
actively transforming for one coordinate system to another.
The CoordinateSystemNode "has a" optional osg::EllipsoidModel object that
can be used for converting between Earth Center Earth Fixed (ECEF) and
lats/longs/height.
How you manage the coordinate system in your application is up to you,
there are a number of different ways to represent it with the OSG. In
general I'd recommend using local coordinate frames for your actual data,
decorating this local coordinate frame with a MatrixTransform that places
the local coodinate frame in world coords. For GIS database type work,
such as provided by osgEarth and VirtualPlanetBuilder this approach is
utilized, with a CoordinateSystemNode decorating the whole database.
Robert.
On 6 April 2016 at 16:07, Filip Arlet <filip89 at seznam.cz> wrote:
> Hi,
>
> I'm working on a project for displaying geospatial data. I usually have
> data in some coordinate reference system. What I want now is transform them
> into another coordinate reference system (wgs84). Its not a big problem
> transforming coordinates on load or preparing data, but I would like to do
> it on the fly. Ie. keep data in one coordinate system and transfrom them to
> another. I found osg::CoordinateSystemNode but I cannot find any examples
> how to use it. Its CoordinateSystemNode class that I'm looking for? How to
> setup its params (preferably using Proj or GDAL or SRID) ?
>
> The transformation doesnt really have to be precise (I can always tranfer
> all data from one coordinate system to another if I want to publish data in
> different CRS, but supporting two coordinate reference systems at once
> would need to have data loaded twice).
>
> Is this even possible ? I mean transforming coordinate systems using 4x4
> matrix ?
>
> Thank you!
>
> Cheers,
> Filip
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=66748#66748
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160406/99344a16/attachment-0003.htm>
More information about the osg-users
mailing list