| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
CPLErr GS7BGDataset::GetGeoTransform( double *padfGeoTransform ) |
|---|
| 6 |
{ |
|---|
| 7 |
if( padfGeoTransform == NULL ) |
|---|
| 8 |
return CE_Failure; |
|---|
| 9 |
|
|---|
| 10 |
GS7BGRasterBand *poGRB = (GS7BGRasterBand *)GetRasterBand( 1 ); |
|---|
| 11 |
|
|---|
| 12 |
if( poGRB == NULL ) |
|---|
| 13 |
{ |
|---|
| 14 |
padfGeoTransform[0] = 0; |
|---|
| 15 |
padfGeoTransform[1] = 1; |
|---|
| 16 |
padfGeoTransform[2] = 0; |
|---|
| 17 |
padfGeoTransform[3] = 0; |
|---|
| 18 |
padfGeoTransform[4] = 0; |
|---|
| 19 |
padfGeoTransform[5] = 1; |
|---|
| 20 |
return CE_Failure; |
|---|
| 21 |
} |
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
CPLPushErrorHandler( CPLQuietErrorHandler ); |
|---|
| 25 |
CPLErr eErr = GDALPamDataset::GetGeoTransform( padfGeoTransform ); |
|---|
| 26 |
CPLPopErrorHandler(); |
|---|
| 27 |
|
|---|
| 28 |
if( eErr == CE_None ) |
|---|
| 29 |
return CE_None; |
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
padfGeoTransform[1] = (poGRB->dfMaxX - poGRB->dfMinX)/(nRasterXSize - 1); |
|---|
| 33 |
padfGeoTransform[5] = (poGRB->dfMinY - poGRB->dfMaxY)/(nRasterYSize - 1); |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
padfGeoTransform[0] = poGRB->dfMinX - padfGeoTransform[1] / 2; |
|---|
| 37 |
padfGeoTransform[3] = poGRB->dfMaxY - padfGeoTransform[5] / 2; |
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
padfGeoTransform[4] = 0.0; |
|---|
| 41 |
padfGeoTransform[2] = 0.0; |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
return CE_None; |
|---|
| 45 |
} |
|---|