diff --git a/external/mdal/frmts/mdal_gdal.cpp b/external/mdal/frmts/mdal_gdal.cpp index 5552384afd0..4bb5284169f 100644 --- a/external/mdal/frmts/mdal_gdal.cpp +++ b/external/mdal/frmts/mdal_gdal.cpp @@ -29,15 +29,15 @@ void MDAL::GdalDataset::init( const std::string &dsName ) void MDAL::GdalDataset::parseParameters() { - mNBands = static_cast( GDALGetRasterCount( mHDataset ) ); + mNBands = static_cast( GDALGetRasterCount( mHDataset ) ); if ( mNBands == 0 ) throw MDAL_Status::Err_InvalidData; GDALGetGeoTransform( mHDataset, mGT ); // in case of error it returns Identid - mXSize = static_cast( GDALGetRasterXSize( mHDataset ) ); //raster width in pixels + mXSize = static_cast( GDALGetRasterXSize( mHDataset ) ); //raster width in pixels if ( mXSize == 0 ) throw MDAL_Status::Err_InvalidData; - mYSize = static_cast( GDALGetRasterYSize( mHDataset ) ); //raster height in pixels + mYSize = static_cast( GDALGetRasterYSize( mHDataset ) ); //raster height in pixels if ( mYSize == 0 ) throw MDAL_Status::Err_InvalidData; mNPoints = mXSize * mYSize; @@ -72,13 +72,13 @@ bool MDAL::LoaderGdal::meshes_equals( const MDAL::GdalDataset *ds1, const MDAL:: bool MDAL::LoaderGdal::initVertices( Vertices &vertices ) { Vertex *VertexsPtr = vertices.data(); - uint mXSize = meshGDALDataset()->mXSize; - uint mYSize = meshGDALDataset()->mYSize; + unsigned int mXSize = meshGDALDataset()->mXSize; + unsigned int mYSize = meshGDALDataset()->mYSize; const double *mGT = meshGDALDataset()->mGT; - for ( uint y = 0; y < mYSize; ++y ) + for ( unsigned int y = 0; y < mYSize; ++y ) { - for ( uint x = 0; x < mXSize; ++x, ++VertexsPtr ) + for ( unsigned int x = 0; x < mXSize; ++x, ++VertexsPtr ) { // VertexsPtr->setId(x + mXSize*y); VertexsPtr->x = mGT[0] + ( x + 0.5 ) * mGT[1] + ( y + 0.5 ) * mGT[2]; @@ -111,14 +111,14 @@ bool MDAL::LoaderGdal::initVertices( Vertices &vertices ) void MDAL::LoaderGdal::initFaces( Vertices &Vertexs, Faces &Faces, bool is_longitude_shifted ) { int reconnected = 0; - uint mXSize = meshGDALDataset()->mXSize; - uint mYSize = meshGDALDataset()->mYSize; + unsigned int mXSize = meshGDALDataset()->mXSize; + unsigned int mYSize = meshGDALDataset()->mYSize; size_t i = 0; - for ( uint y = 0; y < mYSize - 1; ++y ) + for ( unsigned int y = 0; y < mYSize - 1; ++y ) { - for ( uint x = 0; x < mXSize - 1; ++x ) + for ( unsigned int x = 0; x < mXSize - 1; ++x ) { if ( is_longitude_shifted && ( Vertexs[x + mXSize * y].x > 0.0 ) && @@ -195,7 +195,7 @@ MDAL::LoaderGdal::metadata_hash MDAL::LoaderGdal::parseMetadata( GDALMajorObject void MDAL::LoaderGdal::parseRasterBands( const MDAL::GdalDataset *cfGDALDataset ) { - for ( uint i = 1; i <= cfGDALDataset->mNBands; ++i ) // starts with 1 .... ehm.... + for ( unsigned int i = 1; i <= cfGDALDataset->mNBands; ++i ) // starts with 1 .... ehm.... { // Get Band GDALRasterBandH gdalBand = GDALGetRasterBand( cfGDALDataset->mHDataset, static_cast( i ) ); @@ -262,10 +262,10 @@ void MDAL::LoaderGdal::addDataToOutput( GDALRasterBandH raster_band, std::shared assert( raster_band ); double nodata = GDALGetRasterNoDataValue( raster_band, nullptr ); - uint mXSize = meshGDALDataset()->mXSize; - uint mYSize = meshGDALDataset()->mYSize; + unsigned int mXSize = meshGDALDataset()->mXSize; + unsigned int mYSize = meshGDALDataset()->mYSize; - for ( uint y = 0; y < mYSize; ++y ) + for ( unsigned int y = 0; y < mYSize; ++y ) { // buffering per-line CPLErr err = GDALRasterIO( @@ -287,9 +287,9 @@ void MDAL::LoaderGdal::addDataToOutput( GDALRasterBandH raster_band, std::shared throw MDAL_Status::Err_InvalidData; } - for ( uint x = 0; x < mXSize; ++x ) + for ( unsigned int x = 0; x < mXSize; ++x ) { - uint idx = x + mXSize * y; + unsigned int idx = x + mXSize * y; double val = mPafScanline[x]; bool noData = false; if ( MDAL::equals( val, nodata ) ) @@ -324,7 +324,7 @@ void MDAL::LoaderGdal::addDataToOutput( GDALRasterBandH raster_band, std::shared void MDAL::LoaderGdal::activateFaces( std::shared_ptr tos ) { // Activate only Faces that do all Vertex's outputs with some data - for ( uint idx = 0; idx < meshGDALDataset()->mNVolumes; ++idx ) + for ( unsigned int idx = 0; idx < meshGDALDataset()->mNVolumes; ++idx ) { Face elem = mMesh->faces.at( idx ); diff --git a/external/mdal/frmts/mdal_gdal.hpp b/external/mdal/frmts/mdal_gdal.hpp index be9a0bb22fd..530a0655987 100644 --- a/external/mdal/frmts/mdal_gdal.hpp +++ b/external/mdal/frmts/mdal_gdal.hpp @@ -35,11 +35,11 @@ namespace MDAL std::string mProj; GDALDatasetH mHDataset; - uint mNBands; /* number of bands */ - uint mXSize; /* number of x pixels */ - uint mYSize; /* number of y pixels */ - uint mNPoints; /* nodes count */ - uint mNVolumes; /* Faces count */ + unsigned int mNBands; /* number of bands */ + unsigned int mXSize; /* number of x pixels */ + unsigned int mYSize; /* number of y pixels */ + unsigned int mNPoints; /* nodes count */ + unsigned int mNVolumes; /* Faces count */ double mGT[6]; /* affine transform matrix */ private: