Hello I trying to make geotiff from float array . when I try to set geotransform information I get this error : "Dataset does not support the AddBand() method."
The part of my code that i used to make geotiff listed below (the part of code that error occurred ): poDriver=GetGDALDriverManager()->GetDriverByName(pszFormat); poDstDS = poDriver->Create( outStr.c_str(), outWidth, outHeight, 1,GDT_Float32,papszOptions ); double adfGeoTransform[6] = { static_cast<double>(west), static_cast<double>(OUTPUT_PIXEL_METER), 0.0, static_cast<double>(north), 0.0, static_cast<double>(-OUTPUT_PIXEL_METER) }; OGRSpatialReference oSRS; char *pszSRS_WKT = NULL; GDALRasterBand *poBand; rasterData=new float[outWidth*outHeight]; OGRErr err=poDstDS->SetGeoTransform(adfGeoTransform); oSRS.importFromProj4("+proj=merc +ellps=WGS84 +datum=WGS84 +lon_0=0.0 +a=6378137.0 +b=6356752.314 +units=m"); Note : The err value is 3 . What is wrong with this code ? thanks
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev