diff --git a/gdal/keadataset.cpp b/gdal/keadataset.cpp index d07a9ac..7097966 100644 --- a/gdal/keadataset.cpp +++ b/gdal/keadataset.cpp @@ -250,11 +250,6 @@ GDALDataset *KEADataset::Create( const char * pszFilename, if( pszValue != nullptr ) nattblockSize = atol( pszValue ); - hsize_t npageSize = kealib::KEA_PAGE_SIZE; - pszValue = CSLFetchNameValue( papszParmList, "PAGESIZE" ); - if( pszValue != nullptr ) - npageSize = atol( pszValue ); - unsigned int nmdcElmts = kealib::KEA_MDC_NELMTS; pszValue = CSLFetchNameValue( papszParmList, "MDC_NELMTS" ); if( pszValue != nullptr ) @@ -301,7 +296,7 @@ GDALDataset *KEADataset::Create( const char * pszFilename, H5::H5File *keaImgH5File = kealib::KEAImageIO::createKEAImage( pszFilename, GDAL_to_KEA_Type( eType ), nXSize, nYSize, nBands, - nullptr, nullptr, npageSize, nimageblockSize, + nullptr, nullptr, nimageblockSize, nattblockSize, nmdcElmts, nrdccNElmts, nrdccNBytes, nrdccW0, nsieveBuf, nmetaBlockSize, ndeflate ); diff --git a/include/libkea/KEACommon.h b/include/libkea/KEACommon.h index 19b32c0..d697548 100644 --- a/include/libkea/KEACommon.h +++ b/include/libkea/KEACommon.h @@ -137,7 +137,6 @@ namespace kealib{ static const unsigned int KEA_DEFLATE( 1 ); // 1 static const hsize_t KEA_IMAGE_CHUNK_SIZE( 512 ); // 512 static const hsize_t KEA_ATT_CHUNK_SIZE( 10000 ); // 10000 - static const hsize_t KEA_PAGE_SIZE(8192); // 8192 enum KEADataType { diff --git a/include/libkea/KEAImageIO.h b/include/libkea/KEAImageIO.h index ad42e65..5de994c 100644 --- a/include/libkea/KEAImageIO.h +++ b/include/libkea/KEAImageIO.h @@ -126,7 +126,7 @@ namespace kealib{ // remove band from file virtual void removeImageBand(const uint32_t bandIndex); - static H5::H5File* createKEAImage(const std::string &fileName, KEADataType dataType, uint32_t xSize, uint32_t ySize, uint32_t numImgBands, std::vector *bandDescrips=NULL, KEAImageSpatialInfo *spatialInfo=NULL, uint32_t imageBlockSize=KEA_IMAGE_CHUNK_SIZE, uint32_t attBlockSize=KEA_ATT_CHUNK_SIZE, hsize_t pageSize=KEA_PAGE_SIZE, int mdcElmts=KEA_MDC_NELMTS, hsize_t rdccNElmts=KEA_RDCC_NELMTS, hsize_t rdccNBytes=KEA_RDCC_NBYTES, double rdccW0=KEA_RDCC_W0, hsize_t sieveBuf=KEA_SIEVE_BUF, hsize_t metaBlockSize=KEA_META_BLOCKSIZE, uint32_t deflate=KEA_DEFLATE); + static H5::H5File* createKEAImage(const std::string &fileName, KEADataType dataType, uint32_t xSize, uint32_t ySize, uint32_t numImgBands, std::vector *bandDescrips=NULL, KEAImageSpatialInfo *spatialInfo=NULL, uint32_t imageBlockSize=KEA_IMAGE_CHUNK_SIZE, uint32_t attBlockSize=KEA_ATT_CHUNK_SIZE, int mdcElmts=KEA_MDC_NELMTS, hsize_t rdccNElmts=KEA_RDCC_NELMTS, hsize_t rdccNBytes=KEA_RDCC_NBYTES, double rdccW0=KEA_RDCC_W0, hsize_t sieveBuf=KEA_SIEVE_BUF, hsize_t metaBlockSize=KEA_META_BLOCKSIZE, uint32_t deflate=KEA_DEFLATE); static bool isKEAImage(const std::string &fileName); static H5::H5File* openKeaH5RW(const std::string &fileName, int mdcElmts=KEA_MDC_NELMTS, hsize_t rdccNElmts=KEA_RDCC_NELMTS, hsize_t rdccNBytes=KEA_RDCC_NBYTES, double rdccW0=KEA_RDCC_W0, hsize_t sieveBuf=KEA_SIEVE_BUF, hsize_t metaBlockSize=KEA_META_BLOCKSIZE); static H5::H5File* openKeaH5RDOnly(const std::string &fileName, int mdcElmts=KEA_MDC_NELMTS, hsize_t rdccNElmts=KEA_RDCC_NELMTS, hsize_t rdccNBytes=KEA_RDCC_NBYTES, double rdccW0=KEA_RDCC_W0, hsize_t sieveBuf=KEA_SIEVE_BUF, hsize_t metaBlockSize=KEA_META_BLOCKSIZE); diff --git a/src/libkea/KEAImageIO.cpp b/src/libkea/KEAImageIO.cpp index 6031020..053edaa 100644 --- a/src/libkea/KEAImageIO.cpp +++ b/src/libkea/KEAImageIO.cpp @@ -2967,7 +2967,7 @@ namespace kealib{ } } - H5::H5File* KEAImageIO::createKEAImage(const std::string &fileName, KEADataType dataType, uint32_t xSize, uint32_t ySize, uint32_t numImgBands, std::vector *bandDescrips, KEAImageSpatialInfo * spatialInfo, uint32_t imageBlockSize, uint32_t attBlockSize, hsize_t pageSize, int mdcElmts, hsize_t rdccNElmts, hsize_t rdccNBytes, double rdccW0, hsize_t sieveBuf, hsize_t metaBlockSize, uint32_t deflate) + H5::H5File* KEAImageIO::createKEAImage(const std::string &fileName, KEADataType dataType, uint32_t xSize, uint32_t ySize, uint32_t numImgBands, std::vector *bandDescrips, KEAImageSpatialInfo * spatialInfo, uint32_t imageBlockSize, uint32_t attBlockSize, int mdcElmts, hsize_t rdccNElmts, hsize_t rdccNBytes, double rdccW0, hsize_t sieveBuf, hsize_t metaBlockSize, uint32_t deflate) { KEAStackPrintState printState; @@ -2982,10 +2982,7 @@ namespace kealib{ keaAccessPlist.setMetaBlockSize(metaBlockSize); // CREATE THE HDF FILE - EXISTING FILE WILL BE TRUNCATED - H5::FileCreatPropList keaPlist = H5::FileCreatPropList(); - keaPlist.setFileSpaceStrategy(H5F_FSPACE_STRATEGY_AGGR, false, 0); - keaPlist.setFileSpacePagesize(pageSize); - keaImgH5File = new H5::H5File( fileName, H5F_ACC_TRUNC, keaPlist, keaAccessPlist); + keaImgH5File = new H5::H5File( fileName, H5F_ACC_TRUNC, H5::FileCreatPropList::DEFAULT, keaAccessPlist); //////////// CREATE GLOBAL HEADER //////////////// keaImgH5File->createGroup( KEA_DATASETNAME_HEADER );