Opened 20 years ago
Last modified 20 years ago
#490 closed defect (invalid)
How and when the IWriteBlock() function being called by the IRasterIO Function!
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Hi, Frank: Now, I am doing some work for adding a new image form. After had successfully added the Open() and Create() functions for my new image form, I tried to make the form can be written by calling my IWriteBlock() function.My IWriteBlock() funtion coded as below: CPLErr MHRasterBand::IWriteBlock(int nBlockXOff,int nBlockYOff, void * pImage ) { CPLError( CE_Failure, CPLE_AppDefined, "It is mhdataset writeblock." ); MHDataset *poGDS = (MHDataset *)poDS; CPLAssert( poGDS != NULL && nBlockXOff >= 0 && nBlockYOff >= 0 && pImage != NULL ); _MHDataWrite ( data, offset, count, pabuff );//my IO funtion return CE_None; } But , when I was tring to write some data to my new imgefile, I received the error as "WriteBlock() not supported for this dataset" instead of the debug info "It is mhdataset writeblock" .Although I had adapted the virtual function in my new form class, IRasterIO() still called the father class's (GDALRasterBand)! I am so erger to get help by you! Could you direct me when the IWriteBlock () being called and which way the IRasterIO() called the IWriteBlock().Thanks! By the way, I had could creat and open my new image files.
Note:
See TracTickets
for help on using tickets.