[gdal-dev] Error in GDALWarp to NWT_GRD

jramm jamessramm at gmail.com
Thu Jul 14 04:07:42 PDT 2016

I added the following to the end of the Create method in

    vsi_l_offset nFileSize = 1024 + nXSize * nYSize * 2;
    if (VSIFTruncateL(poDS->fp, nFileSize) != 0) {
		CPLError(CE_Failure, CPLE_FileIO,
				"Failed to allocate space for GRD file");
		delete poDS;
		return NULL;
    poDS->FlushCache(); // Write the header to disk.

Unfortunately still receiving the error. I wonder if it would be better if I
explicitly write the zeros with VSIFWriteL?

View this message in context: http://osgeo-org.1560.x6.nabble.com/Error-in-GDALWarp-to-NWT-GRD-tp5276136p5276347.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.

More information about the gdal-dev mailing list