@@ -102,7 +102,7 @@ class Raster
102
102
@param w width of raster
103
103
@param h height of raster
104
104
*/
105
- Raster (const uint w, const uint h) : Raster() { allocate (w, h); }
105
+ Raster (const unsigned int w, const unsigned int h) : Raster() { allocate (w, h); }
106
106
107
107
/* *
108
108
copies settable parameters from parent raster
@@ -139,7 +139,7 @@ class Raster
139
139
@param w width of raster
140
140
@param h height of raster
141
141
*/
142
- void allocate (const uint w, const uint h)
142
+ void allocate (const unsigned int w, const unsigned int h)
143
143
{
144
144
m_width = w;
145
145
m_height = h;
@@ -185,7 +185,10 @@ class Raster
185
185
@param ch height of sub image
186
186
@return the sub image with updated xpos & ypos and correct cellsize parameter
187
187
*/
188
- Raster crop_ll (const uint cx, const uint cy, const uint cw, const uint ch) const
188
+ Raster crop_ll (const unsigned int cx,
189
+ const unsigned int cy,
190
+ const unsigned int cw,
191
+ const unsigned int ch) const
189
192
{
190
193
int cyn = m_height - (cy + ch);
191
194
return crop (cx, cyn, cw, ch);
@@ -280,7 +283,10 @@ class Raster
280
283
@param ch height of sub image
281
284
@return the sub image with updated xpos & ypos and correct cellsize parameter
282
285
*/
283
- Raster crop (const uint cx, const uint cy, const uint cw, const uint ch) const
286
+ Raster crop (const unsigned int cx,
287
+ const unsigned int cy,
288
+ const unsigned int cw,
289
+ const unsigned int ch) const
284
290
{
285
291
Raster dst_raster;
286
292
crop (cx, cy, cw, ch, dst_raster);
@@ -308,12 +314,12 @@ class Raster
308
314
/* *
309
315
@return raster width in pixels
310
316
*/
311
- uint get_width () const { return m_width; }
317
+ unsigned int get_width () const { return m_width; }
312
318
313
319
/* *
314
320
@return raster height in pixels
315
321
*/
316
- uint get_height () const { return m_height; }
322
+ unsigned int get_height () const { return m_height; }
317
323
318
324
/* *
319
325
get tile position in geo coordinates
@@ -374,14 +380,17 @@ class Raster
374
380
@param r row
375
381
@return raw pointer
376
382
*/
377
- T* get_ptr (const uint r) const { return m_data.get () + r * m_width; }
383
+ T* get_ptr (const unsigned int r) const { return m_data.get () + r * m_width; }
378
384
379
385
/* *
380
386
get raw pointer to beginning of raster row (lower left is origin)
381
387
@param r row
382
388
@return raw pointer
383
389
*/
384
- T* get_ptr_ll (const uint r) const { return m_data.get () + (m_height - 1 - r) * m_width; }
390
+ T* get_ptr_ll (const unsigned int r) const
391
+ {
392
+ return m_data.get () + (m_height - 1 - r) * m_width;
393
+ }
385
394
386
395
/* *
387
396
get value at raster position
@@ -390,7 +399,7 @@ class Raster
390
399
@param c column
391
400
@return value
392
401
*/
393
- T& value (const uint r, const uint c) const { return get_ptr (r)[c]; }
402
+ T& value (const unsigned int r, const unsigned int c) const { return get_ptr (r)[c]; }
394
403
395
404
/* *
396
405
get value at raster position (using lower left coordinate system)
@@ -399,15 +408,15 @@ class Raster
399
408
@param c column
400
409
@return value
401
410
*/
402
- T& value_ll (const uint r, const uint c) const { return get_ptr_ll (r)[c]; }
411
+ T& value_ll (const unsigned int r, const unsigned int c) const { return get_ptr_ll (r)[c]; }
403
412
404
413
/* *
405
414
get x component of geo/world coordinates at column c
406
415
407
416
@param c column
408
417
@return x geo coordinates
409
418
*/
410
- double col2x (const uint c) const { return m_xpos + (c + 0.5 ) * m_cellsize; }
419
+ double col2x (const unsigned int c) const { return m_xpos + (c + 0.5 ) * m_cellsize; }
411
420
412
421
int x2col (double x) const
413
422
{
@@ -445,7 +454,7 @@ class Raster
445
454
@param c column
446
455
@return x geo coordinates
447
456
*/
448
- double row2y (const uint r_tl) const
457
+ double row2y (const unsigned int r_tl) const
449
458
{
450
459
int r_ll = m_height - 1 - r_tl;
451
460
return m_ypos + (r_ll + 0.5 ) * m_cellsize;
@@ -458,7 +467,7 @@ class Raster
458
467
@param r row from lower left
459
468
@return y geo coordinates
460
469
*/
461
- double row_ll2y (const uint r_ll) const { return m_ypos + (r_ll + 0.5 ) * m_cellsize; }
470
+ double row_ll2y (const unsigned int r_ll) const { return m_ypos + (r_ll + 0.5 ) * m_cellsize; }
462
471
463
472
/* *
464
473
get x component of geo/world coordinates at column c
@@ -467,7 +476,7 @@ class Raster
467
476
@param c column from lower left
468
477
@return x geo coordinates
469
478
*/
470
- double col_ll2x (const uint c) const { return col2x (c); }
479
+ double col_ll2x (const unsigned int c) const { return col2x (c); }
471
480
472
481
/* *
473
482
is raster empty
@@ -523,8 +532,8 @@ class Raster
523
532
524
533
private:
525
534
// raster width and height
526
- uint m_width = 0 ;
527
- uint m_height = 0 ;
535
+ unsigned int m_width = 0 ;
536
+ unsigned int m_height = 0 ;
528
537
529
538
// tile position in world coordinates
530
539
double m_xpos = 0 ;
0 commit comments