diff --git a/examples/osgdem/GNUmakefile b/examples/osgdem/GNUmakefile index 751d6e403..6eb6ef28d 100644 --- a/examples/osgdem/GNUmakefile +++ b/examples/osgdem/GNUmakefile @@ -4,9 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgdem.cpp\ -INC += $(GDAL_INCLUDES) - -LIBS += -losgProducer -lProducer -losgTerrain -losgFX -losgGL2 -losgText -losgGA -losgDB -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgProducer -lProducer -losgTerrain -losgFX -losgGL2 -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgdem/GNUmakefile.inst b/examples/osgdem/GNUmakefile.inst index 56ef37b1f..c2f7c365f 100644 --- a/examples/osgdem/GNUmakefile.inst +++ b/examples/osgdem/GNUmakefile.inst @@ -4,13 +4,6 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgdem.cpp\ -ifneq ("$(GDAL_INCLUDES)","") -INC += $(GDAL_INCLUDES) -endif - -ifneq ("$(GDAL_LIB_DIR)","") -LDFLAGS += -L$(GDAL_LIB_DIR) -endif LIBS += -losgProducer -lProducer -losgTerrain -losgFX -losgGL2 -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) diff --git a/examples/osgdem/osgdem.cpp b/examples/osgdem/osgdem.cpp index 58089a17e..3da5fa0d1 100644 --- a/examples/osgdem/osgdem.cpp +++ b/examples/osgdem/osgdem.cpp @@ -51,8 +51,6 @@ #include -#include - class GraphicsContext { public: GraphicsContext() @@ -73,30 +71,6 @@ class GraphicsContext { Producer::ref_ptr rs; }; -char *SanitizeSRS( const char *pszUserInput ) - -{ - OGRSpatialReferenceH hSRS; - char *pszResult = NULL; - - CPLErrorReset(); - - hSRS = OSRNewSpatialReference( NULL ); - if( OSRSetFromUserInput( hSRS, pszUserInput ) == OGRERR_NONE ) - OSRExportToWkt( hSRS, &pszResult ); - else - { - CPLError( CE_Failure, CPLE_AppDefined, - "Translating source or target SRS failed:\n%s", - pszUserInput ); - exit( 1 ); - } - - OSRDestroySpatialReference( hSRS ); - - return pszResult; -} - osg::Matrixd computeGeoTransForRange(double xMin, double xMax, double yMin, double yMax) { osg::Matrixd matrix; @@ -352,7 +326,7 @@ int main( int argc, char **argv ) if (arguments.read(pos, "--cs",def)) { - currentCS = !def.empty() ? SanitizeSRS(def.c_str()) : ""; + currentCS = !def.empty() ? osgTerrain::DataSet::coordinateSystemStringToWTK(def) : ""; std::cout<<"--cs "<