I added the following to the end of the Create method in
frmts/northwood/grddataset.cpp:


    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.
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to