From 15f866a322a06735d747fbe6b205e22aeaff2b77 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 9 Nov 2015 15:10:50 +0000 Subject: [PATCH] Addded setting of the Locator CoordinateSystemType git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15177 16af8721-9629-0410-8352-f15c8da7e697 --- src/osgPlugins/shp/ESRIShapeReaderWriter.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/osgPlugins/shp/ESRIShapeReaderWriter.cpp b/src/osgPlugins/shp/ESRIShapeReaderWriter.cpp index 5a87720ea..520e02665 100644 --- a/src/osgPlugins/shp/ESRIShapeReaderWriter.cpp +++ b/src/osgPlugins/shp/ESRIShapeReaderWriter.cpp @@ -103,6 +103,19 @@ class ESRIShapeReaderWriter : public osgDB::ReaderWriter osgTerrain::Locator* locator = new osgTerrain::Locator; sp.getGeode()->setUserData(locator); + if (projstring.compare(0,6,"GEOCCS")==0) + { + locator->setCoordinateSystemType(osgTerrain::Locator::GEOCENTRIC); + } + else if (projstring.compare(0,6,"PROJCS")==0) + { + locator->setCoordinateSystemType(osgTerrain::Locator::PROJECTED); + } + else if (projstring.compare(0,6,"GEOGCS")==0) + { + locator->setCoordinateSystemType(osgTerrain::Locator::GEOGRAPHIC); + } + locator->setFormat("WKT"); locator->setCoordinateSystem(projstring); locator->setDefinedInFile(false);