21 static GDALDriver *poOssimGdalDriver = 0;
30 #ifdef OSSIM_ID_ENABLED 31 static const char OSSIM_ID[] =
"$Id: ossimGdalDataset.cpp 23003 2014-11-24 17:13:40Z dburken $";
37 if (!poOssimGdalDriver)
40 poDriver = poOssimGdalDriver;
46 <<
"ossimGdalDataset::ossimGdalDataset entered..." 48 #ifdef OSSIM_ID_ENABLED 63 <<
"ossimGdalDataset::~ossimGdalDataset " 81 <<
"ossimGdalDataset::open DEBUG:" 82 <<
"\nCould not open: " << file.
c_str() << std::endl;
90 <<
"ossimGdalDataset::open DEBUG:" 91 <<
"\nOpened: " << file.
c_str() << std::endl;
105 <<
"ossimGdalDataset::Open entered..." 124 <<
"ossimGdalDataset::setImageHandler entered..." 145 sDescription = f.
c_str();
149 oOvManager.Initialize(
this, f.
c_str() );
158 eAccess = GA_ReadOnly;
163 <<
"ossimGdalDataset::init DEBUG:" 164 <<
"\nWidth: " << nRasterXSize
165 <<
"\nHeight: " << nRasterYSize
166 <<
"\nBands: " << nBands << std::endl;
169 for(
int iBand = 0; iBand < nBands; ++iBand )
175 SetBand( iBand+1, rb );
187 : GDALPamRasterBand(),
194 <<
"ossimGdalDatasetRasterBand::ossimGdalDatasetRasterBand entered..." 219 nBlockXSize = (nBlockXSize==0) ? 1 : nBlockXSize;
220 nBlockYSize = (nBlockYSize==0) ? 1 : nBlockYSize;
222 nBlocksPerRow = nRasterXSize / nBlockXSize;
223 nBlocksPerColumn = nRasterYSize / nBlockYSize;
224 if (nRasterXSize % nBlockXSize) ++nBlocksPerRow;
225 if (nRasterYSize % nBlockYSize) ++nBlocksPerColumn;
228 bForceCachedIO =
false;
244 ossimIpt startPt(nBlockXOff*nBlockXSize, nBlockYOff*nBlockYSize);
248 startPt.
y+nBlockYSize-1);
263 memset(pImage, 0, nBlockXSize * nBlockYSize);
274 <<
"ossimGdalDatasetRasterBand::GetNoDataValue entered..." 285 GDALDriver *poDriver;
287 if( poOssimGdalDriver == 0 )
289 poDriver =
new GDALDriver();
290 poOssimGdalDriver = poDriver;
292 poDriver->SetDescription(
"ossimGdalDataset" );
293 poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
296 GetGDALDriverManager()->RegisterDriver( poDriver );
void initGdalOverviewManager()
Calls gdal's oOvManager.Initialize.
void init()
Initializes this object from the image handler.
virtual ossimImageHandler * open(const ossimFilename &fileName, bool trySuffixFirst=true, bool openOverview=true) const
open that takes a filename.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
static GDALDataset * Open(GDALOpenInfo *)
Open for static gdal driver.
void setImageHandler(ossimImageHandler *ih)
Sets theImageHandler.
ossim_uint32 height() const
virtual ossim_uint32 getTileHeight() const
Returns the default processing tile height.
virtual ossimDataObjectStatus getDataObjectStatus() const
const ossimImageHandler * getImageHandler() const
virtual ossim_uint32 getTileWidth() const
Returns the default processing tile width.
virtual void unloadBand(void *dest, ossim_uint32 src_band, ossim_uint32 dest_band, const ossimIrect &dest_rect, ossimInterleaveType il_type=OSSIM_BSQ, OverwriteBandRule ow_type=NULL_RULE) const
This routine is designed for overwriting a selected band of the destination buffer 'dest' by an indep...
void setGdalAcces(GDALAccess access)
Set the access data member.
virtual const ossimFilename & getFilename() const
Returns the filename.
ossimGdalDatasetRasterBand(ossimGdalDataset *ds, int band, ossimImageHandler *ih)
Constructor that takes a ossimGdalDataset, band and image handler.
virtual ~ossimGdalDataset()
virtual destructor
virtual ~ossimGdalDatasetRasterBand()
virtual destructor
ossimGdalDataset This is a gdal data set that wraps an ossim image handler.
virtual ossimIrect getImageRectangle(ossim_uint32 resLevel=0) const
Returns zero-based bounding rectangle of the image.
ossim_uint32 width() const
ossimRefPtr< ossimImageHandler > theImageHandler
virtual CPLErr IReadBlock(int nBlockXOff, int nBlockYOff, void *pImage)
Read block method.
ossimGdalDatasetRasterBand Represents a single band within the image.
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
This class defines an abstract Handler which all image handlers(loaders) should derive from...
CPL_C_START void GDALRegister_ossimGdalDataset(void)
ossimGdalDataset()
default constructor
virtual double GetNoDataValue(int *pbSuccess=0)
This returns 0 right now and should probably be implemented if anything serious is to be done with th...
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
static ossimImageHandlerRegistry * instance()
ossimRefPtr< ossimImageHandler > theImageHandler
bool open(const ossimFilename &file)
open method.
GDALDataType toGdal(ossimScalarType) const
friend class ossimGdalDatasetRasterBand
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)