- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/gdal/DataSetLayer.cpp
r12292 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2007 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2007 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 151 151 0.0, 0.0, 1.0, 0.0, 152 152 geoTransform[0], geoTransform[3], 0.0, 1.0); 153 154 153 154 155 155 int nPixels = _dataset->GetRasterXSize(); 156 156 int nLines = _dataset->GetRasterYSize(); … … 162 162 locator->setDefinedInFile(true); 163 163 164 setLocator(locator.get()); 164 setLocator(locator.get()); 165 165 166 166 } … … 174 174 /* destination coordinate system. */ 175 175 /* -------------------------------------------------------------------- */ 176 void *hTransformArg = 177 GDALCreateGenImgProjTransformer( _dataset, pszSourceSRS, 178 NULL, pszSourceSRS, 176 void *hTransformArg = 177 GDALCreateGenImgProjTransformer( _dataset, pszSourceSRS, 178 NULL, pszSourceSRS, 179 179 TRUE, 0.0, 1 ); 180 180 … … 190 190 double adfDstGeoTransform[6]; 191 191 int nPixels=0, nLines=0; 192 if( GDALSuggestedWarpOutput( _dataset, 193 GDALGenImgProjTransform, hTransformArg, 192 if( GDALSuggestedWarpOutput( _dataset, 193 GDALGenImgProjTransform, hTransformArg, 194 194 adfDstGeoTransform, &nPixels, &nLines ) 195 195 != CE_None ) … … 210 210 osg::Matrixd::scale(static_cast<double>(nPixels-1), static_cast<double>(nLines-1), 1.0) * 211 211 matrix); 212 212 213 213 locator->setDefinedInFile(true); 214 214 215 setLocator(locator.get()); 215 setLocator(locator.get()); 216 216 } 217 217 else
