| 518 | | padfGeoTransform[0] = poGRB->dfMinX; |
|---|
| 519 | | padfGeoTransform[1] = ( (poGRB->dfMaxX - poGRB->dfMinX)/ |
|---|
| 520 | | (nRasterXSize - 1) ); |
|---|
| | 518 | /* calculate pixel size first */ |
|---|
| | 519 | padfGeoTransform[1] = (poGRB->dfMaxX - poGRB->dfMinX)/(nRasterXSize - 1); |
|---|
| | 520 | padfGeoTransform[5] = (poGRB->dfMinY - poGRB->dfMaxY)/(nRasterYSize - 1); |
|---|
| | 521 | |
|---|
| | 522 | /* then calculate image origin */ |
|---|
| | 523 | padfGeoTransform[0] = poGRB->dfMinX - padfGeoTransform[1] / 2; |
|---|
| | 524 | padfGeoTransform[3] = poGRB->dfMaxY - padfGeoTransform[5] / 2; |
|---|
| | 525 | |
|---|
| | 526 | /* tilt/rotation does not supported by the GS grids */ |
|---|
| | 527 | padfGeoTransform[4] = 0.0; |
|---|