[osg-users] Add get/setCoordinateSystemType to osg::CoordinateSystemNode?

Glenn Waldron gwaldron at gmail.com
Wed Jun 18 05:27:29 PDT 2008


On Wed, Jun 18, 2008 at 8:06 AM, Robert Osfield <robert.osfield at gmail.com>
wrote:

> On Wed, Jun 18, 2008 at 12:41 PM, Glenn Waldron <gwaldron at gmail.com>
> wrote:
> > Robert,
> >
> > I propose that osg::CoordinateSystemNode should have the same
> > get/setCoordinateSystemType() methods that are found in
> osgTerrain::Locator.
> > Without them, it is not possible to differentiate between a geocentric
> and a
> > projected plate carre projection.
> >
> > If you agree, I will submit the change. Thanks.
>
> I have no objection, the only thing to be wary of is if the coordinate
> system string and the type disagree - this would be a garbage
> in/garbage out issue, if the user sets things correctly, they will
> agree, if they mess up there won't be an automatic way of checking
> i.e. you'd need something like PROJ to check.


The real issue that I'm facing is this: when you use osgdem with WGS84 input
data, but without the --geocentric flag, you get a database with a projected
coordinate system (specifically Plate Carree projection).

However, the CoordinateSystemNode reports a WGS84 WKT, and the
osgTerrain::Locator node reports WGS84/PROJECTED (a type disagreement) --
both of which I would argue are incorrect.

In this scenario, the WKT should actually be a variant of this:

PROJCS["World_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Equirectangular"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],UNIT["Meter",1]]

Now, when you do use --geocentric, the WGS84 WKT is OK since one can assume
that this implies a geocentric database (since the OSG cannot use angular
coordinates :)

Anyway I guess this is more of a VPB issue. I appreciate your thoughts on
the matter.

Glenn

-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080618/3e5a731e/attachment.htm>


More information about the osg-users mailing list