modis_dataset::impl Class Reference

Public Member Functions

int data_type () const
 
const te::rst::Gridgrid () const
 
 impl (const std::map< std::string, std::map< std::string, std::string > > &tile_idx, const std::string subdataset_prefix, const std::string subdataset_suffix, std::size_t max_pixel_cache_size, std::size_t max_block_cache_size, std::size_t max_raster_cache_size)
 
void query (const double &longitude, const double &latitude, const unsigned char **values, const std::vector< boost::gregorian::date > **times) const
 
 ~impl ()
 

Private Member Functions

std::vector< unsigned char * > * alloc_blocks () const
 
unsigned char * check_in_block_cache (unsigned int col, unsigned int row) const
 
unsigned char * check_in_disk (unsigned int col, unsigned int row) const
 
unsigned char * check_in_raster_cache (unsigned int col, unsigned int row) const
 
void extract_block_data (std::vector< unsigned char * > &blocks, const std::vector< te::rst::Raster * > &rasters, unsigned int block_x, unsigned int block_y) const
 
void load_dataset_grid_info ()
 
void load_dataset_tile_info ()
 
void load_time_info ()
 
unsigned char * sync_cache_from_blocks (const std::vector< unsigned char * > &blocks, unsigned int col, unsigned int row) const
 
unsigned char * sync_cache_from_rasters (const std::vector< te::rst::Raster * > &rasters, unsigned int col, unsigned int row) const
 

Private Attributes

unsigned int m_blk_h
 
unsigned int m_blk_size
 
unsigned int m_blk_w
 
fifo_cache< std::vector< unsigned char * > > * m_block_cache
 
te::srs::Converterm_converter
 
extract_pixel_data_fnct_t m_extract_pixel_data
 
te::rst::Gridm_grid
 
unsigned int m_modis_tile_h
 
unsigned int m_modis_tile_h_offset
 
unsigned int m_modis_tile_v_offset
 
unsigned int m_modis_tile_w
 
unsigned int m_nblks_per_tile
 
unsigned int m_nblks_x
 
unsigned int m_nblks_y
 
unsigned int m_ntiles_x
 
unsigned int m_ntiles_y
 
fifo_cache< unsigned char > * m_pixel_cache
 
int m_pixel_data_type_size
 
fifo_cache< std::vector< te::rst::Raster * > > * m_raster_cache
 
std::string m_subdataset_prefix
 
std::string m_subdataset_suffix
 
const std::map< std::string, std::map< std::string, std::string > > * m_tile_idx
 
std::vector< boost::gregorian::date > m_times
 
unsigned int m_tot_blocks_in_x
 
int m_value_data_type
 

Detailed Description

Definition at line 19 of file modis_dataset.cpp.

Constructor & Destructor Documentation

modis_dataset::impl::impl ( const std::map< std::string, std::map< std::string, std::string > > &  tile_idx,
const std::string  subdataset_prefix,
const std::string  subdataset_suffix,
std::size_t  max_pixel_cache_size,
std::size_t  max_block_cache_size,
std::size_t  max_raster_cache_size 
)
modis_dataset::impl::~impl ( )

Definition at line 153 of file modis_dataset.cpp.

References m_block_cache, m_converter, m_grid, m_pixel_cache, and m_raster_cache.

Member Function Documentation

std::vector< unsigned char * > * modis_dataset::impl::alloc_blocks ( ) const
inlineprivate

Definition at line 387 of file modis_dataset.cpp.

References m_blk_size, and m_times.

Referenced by sync_cache_from_rasters().

unsigned char * modis_dataset::impl::check_in_block_cache ( unsigned int  col,
unsigned int  row 
) const
inlineprivate
unsigned char * modis_dataset::impl::check_in_disk ( unsigned int  col,
unsigned int  row 
) const
inlineprivate
unsigned char * modis_dataset::impl::check_in_raster_cache ( unsigned int  col,
unsigned int  row 
) const
inlineprivate
int modis_dataset::impl::data_type ( ) const
inline

Definition at line 222 of file modis_dataset.cpp.

References m_value_data_type.

Referenced by modis_dataset::data_type().

void modis_dataset::impl::extract_block_data ( std::vector< unsigned char * > &  blocks,
const std::vector< te::rst::Raster * > &  rasters,
unsigned int  block_x,
unsigned int  block_y 
) const
inlineprivate
const te::rst::Grid * modis_dataset::impl::grid ( ) const
inline

Definition at line 227 of file modis_dataset.cpp.

References m_grid.

Referenced by modis_dataset::grid().

void modis_dataset::impl::load_time_info ( )
private

Definition at line 517 of file modis_dataset.cpp.

References m_tile_idx, and m_times.

Referenced by impl().

void modis_dataset::impl::query ( const double &  longitude,
const double &  latitude,
const unsigned char **  values,
const std::vector< boost::gregorian::date > **  times 
) const
inline
unsigned char * modis_dataset::impl::sync_cache_from_blocks ( const std::vector< unsigned char * > &  blocks,
unsigned int  col,
unsigned int  row 
) const
inlineprivate
unsigned char * modis_dataset::impl::sync_cache_from_rasters ( const std::vector< te::rst::Raster * > &  rasters,
unsigned int  col,
unsigned int  row 
) const
inlineprivate

Member Data Documentation

unsigned int modis_dataset::impl::m_blk_h
private
unsigned int modis_dataset::impl::m_blk_size
private

Definition at line 85 of file modis_dataset.cpp.

Referenced by alloc_blocks(), and load_dataset_tile_info().

unsigned int modis_dataset::impl::m_blk_w
private
fifo_cache<std::vector<unsigned char*> >* modis_dataset::impl::m_block_cache
private

Definition at line 81 of file modis_dataset.cpp.

Referenced by check_in_block_cache(), impl(), sync_cache_from_rasters(), and ~impl().

te::srs::Converter* modis_dataset::impl::m_converter
private

Definition at line 79 of file modis_dataset.cpp.

Referenced by impl(), and ~impl().

extract_pixel_data_fnct_t modis_dataset::impl::m_extract_pixel_data
private

Definition at line 76 of file modis_dataset.cpp.

Referenced by impl(), and sync_cache_from_blocks().

te::rst::Grid* modis_dataset::impl::m_grid
private

Definition at line 78 of file modis_dataset.cpp.

Referenced by grid(), load_dataset_grid_info(), query(), sync_cache_from_blocks(), and ~impl().

unsigned int modis_dataset::impl::m_modis_tile_h_offset
private

Definition at line 93 of file modis_dataset.cpp.

Referenced by check_in_disk(), and load_dataset_grid_info().

unsigned int modis_dataset::impl::m_modis_tile_v_offset
private

Definition at line 94 of file modis_dataset.cpp.

Referenced by check_in_disk(), and load_dataset_grid_info().

unsigned int modis_dataset::impl::m_nblks_per_tile
private
unsigned int modis_dataset::impl::m_nblks_x
private
unsigned int modis_dataset::impl::m_nblks_y
private

Definition at line 87 of file modis_dataset.cpp.

Referenced by load_dataset_tile_info().

unsigned int modis_dataset::impl::m_ntiles_x
private

Definition at line 91 of file modis_dataset.cpp.

Referenced by check_in_raster_cache(), impl(), and load_dataset_grid_info().

unsigned int modis_dataset::impl::m_ntiles_y
private

Definition at line 92 of file modis_dataset.cpp.

Referenced by load_dataset_grid_info().

fifo_cache<unsigned char>* modis_dataset::impl::m_pixel_cache
private

Definition at line 80 of file modis_dataset.cpp.

Referenced by impl(), query(), sync_cache_from_blocks(), and ~impl().

int modis_dataset::impl::m_pixel_data_type_size
private

Definition at line 97 of file modis_dataset.cpp.

Referenced by load_dataset_tile_info(), and sync_cache_from_blocks().

fifo_cache<std::vector<te::rst::Raster*> >* modis_dataset::impl::m_raster_cache
private

Definition at line 82 of file modis_dataset.cpp.

Referenced by check_in_disk(), check_in_raster_cache(), impl(), and ~impl().

std::string modis_dataset::impl::m_subdataset_prefix
private

Definition at line 74 of file modis_dataset.cpp.

Referenced by check_in_disk(), load_dataset_grid_info(), and load_dataset_tile_info().

std::string modis_dataset::impl::m_subdataset_suffix
private

Definition at line 75 of file modis_dataset.cpp.

Referenced by check_in_disk(), load_dataset_grid_info(), and load_dataset_tile_info().

const std::map<std::string, std::map <std::string, std::string > >* modis_dataset::impl::m_tile_idx
private
std::vector<boost::gregorian::date> modis_dataset::impl::m_times
private
unsigned int modis_dataset::impl::m_tot_blocks_in_x
private

Definition at line 95 of file modis_dataset.cpp.

Referenced by check_in_block_cache(), impl(), and sync_cache_from_rasters().

int modis_dataset::impl::m_value_data_type
private

Definition at line 96 of file modis_dataset.cpp.

Referenced by data_type(), impl(), and load_dataset_tile_info().


The documentation for this class was generated from the following file: