@@ -29,15 +29,15 @@ void MDAL::GdalDataset::init( const std::string &dsName )
29
29
30
30
void MDAL::GdalDataset::parseParameters ()
31
31
{
32
- mNBands = static_cast <uint >( GDALGetRasterCount ( mHDataset ) );
32
+ mNBands = static_cast <unsigned int >( GDALGetRasterCount ( mHDataset ) );
33
33
if ( mNBands == 0 ) throw MDAL_Status::Err_InvalidData;
34
34
35
35
GDALGetGeoTransform ( mHDataset , mGT ); // in case of error it returns Identid
36
36
37
- mXSize = static_cast <uint >( GDALGetRasterXSize ( mHDataset ) ); // raster width in pixels
37
+ mXSize = static_cast <unsigned int >( GDALGetRasterXSize ( mHDataset ) ); // raster width in pixels
38
38
if ( mXSize == 0 ) throw MDAL_Status::Err_InvalidData;
39
39
40
- mYSize = static_cast <uint >( GDALGetRasterYSize ( mHDataset ) ); // raster height in pixels
40
+ mYSize = static_cast <unsigned int >( GDALGetRasterYSize ( mHDataset ) ); // raster height in pixels
41
41
if ( mYSize == 0 ) throw MDAL_Status::Err_InvalidData;
42
42
43
43
mNPoints = mXSize * mYSize ;
@@ -72,13 +72,13 @@ bool MDAL::LoaderGdal::meshes_equals( const MDAL::GdalDataset *ds1, const MDAL::
72
72
bool MDAL::LoaderGdal::initVertices ( Vertices &vertices )
73
73
{
74
74
Vertex *VertexsPtr = vertices.data ();
75
- uint mXSize = meshGDALDataset ()->mXSize ;
76
- uint mYSize = meshGDALDataset ()->mYSize ;
75
+ unsigned int mXSize = meshGDALDataset ()->mXSize ;
76
+ unsigned int mYSize = meshGDALDataset ()->mYSize ;
77
77
const double *mGT = meshGDALDataset ()->mGT ;
78
78
79
- for ( uint y = 0 ; y < mYSize ; ++y )
79
+ for ( unsigned int y = 0 ; y < mYSize ; ++y )
80
80
{
81
- for ( uint x = 0 ; x < mXSize ; ++x, ++VertexsPtr )
81
+ for ( unsigned int x = 0 ; x < mXSize ; ++x, ++VertexsPtr )
82
82
{
83
83
// VertexsPtr->setId(x + mXSize*y);
84
84
VertexsPtr->x = mGT [0 ] + ( x + 0.5 ) * mGT [1 ] + ( y + 0.5 ) * mGT [2 ];
@@ -111,14 +111,14 @@ bool MDAL::LoaderGdal::initVertices( Vertices &vertices )
111
111
void MDAL::LoaderGdal::initFaces ( Vertices &Vertexs, Faces &Faces, bool is_longitude_shifted )
112
112
{
113
113
int reconnected = 0 ;
114
- uint mXSize = meshGDALDataset ()->mXSize ;
115
- uint mYSize = meshGDALDataset ()->mYSize ;
114
+ unsigned int mXSize = meshGDALDataset ()->mXSize ;
115
+ unsigned int mYSize = meshGDALDataset ()->mYSize ;
116
116
117
117
size_t i = 0 ;
118
118
119
- for ( uint y = 0 ; y < mYSize - 1 ; ++y )
119
+ for ( unsigned int y = 0 ; y < mYSize - 1 ; ++y )
120
120
{
121
- for ( uint x = 0 ; x < mXSize - 1 ; ++x )
121
+ for ( unsigned int x = 0 ; x < mXSize - 1 ; ++x )
122
122
{
123
123
if ( is_longitude_shifted &&
124
124
( Vertexs[x + mXSize * y].x > 0.0 ) &&
@@ -195,7 +195,7 @@ MDAL::LoaderGdal::metadata_hash MDAL::LoaderGdal::parseMetadata( GDALMajorObject
195
195
196
196
void MDAL::LoaderGdal::parseRasterBands ( const MDAL::GdalDataset *cfGDALDataset )
197
197
{
198
- for ( uint i = 1 ; i <= cfGDALDataset->mNBands ; ++i ) // starts with 1 .... ehm....
198
+ for ( unsigned int i = 1 ; i <= cfGDALDataset->mNBands ; ++i ) // starts with 1 .... ehm....
199
199
{
200
200
// Get Band
201
201
GDALRasterBandH gdalBand = GDALGetRasterBand ( cfGDALDataset->mHDataset , static_cast <int >( i ) );
@@ -262,10 +262,10 @@ void MDAL::LoaderGdal::addDataToOutput( GDALRasterBandH raster_band, std::shared
262
262
assert ( raster_band );
263
263
264
264
double nodata = GDALGetRasterNoDataValue ( raster_band, nullptr );
265
- uint mXSize = meshGDALDataset ()->mXSize ;
266
- uint mYSize = meshGDALDataset ()->mYSize ;
265
+ unsigned int mXSize = meshGDALDataset ()->mXSize ;
266
+ unsigned int mYSize = meshGDALDataset ()->mYSize ;
267
267
268
- for ( uint y = 0 ; y < mYSize ; ++y )
268
+ for ( unsigned int y = 0 ; y < mYSize ; ++y )
269
269
{
270
270
// buffering per-line
271
271
CPLErr err = GDALRasterIO (
@@ -287,9 +287,9 @@ void MDAL::LoaderGdal::addDataToOutput( GDALRasterBandH raster_band, std::shared
287
287
throw MDAL_Status::Err_InvalidData;
288
288
}
289
289
290
- for ( uint x = 0 ; x < mXSize ; ++x )
290
+ for ( unsigned int x = 0 ; x < mXSize ; ++x )
291
291
{
292
- uint idx = x + mXSize * y;
292
+ unsigned int idx = x + mXSize * y;
293
293
double val = mPafScanline [x];
294
294
bool noData = false ;
295
295
if ( MDAL::equals ( val, nodata ) )
@@ -324,7 +324,7 @@ void MDAL::LoaderGdal::addDataToOutput( GDALRasterBandH raster_band, std::shared
324
324
void MDAL::LoaderGdal::activateFaces ( std::shared_ptr<Dataset> tos )
325
325
{
326
326
// Activate only Faces that do all Vertex's outputs with some data
327
- for ( uint idx = 0 ; idx < meshGDALDataset ()->mNVolumes ; ++idx )
327
+ for ( unsigned int idx = 0 ; idx < meshGDALDataset ()->mNVolumes ; ++idx )
328
328
{
329
329
Face elem = mMesh ->faces .at ( idx );
330
330
0 commit comments