MI - Fimex
Public Member Functions | List of all members
MetNoFimex::GribFileIndex Class Reference

#include <GribFileIndex.h>

Public Member Functions

 GribFileIndex ()
 
 GribFileIndex (boost::filesystem::path gribFilePath, const std::vector< std::pair< std::string, boost::regex > > &members, bool ignoreExistingXml=false, std::map< std::string, std::string > options=std::map< std::string, std::string >())
 
 GribFileIndex (boost::filesystem::path gribFilePath, boost::filesystem::path grbmlFilePath, const std::vector< std::pair< std::string, boost::regex > > &members, bool ignoreExistingXml=false, std::map< std::string, std::string > options=std::map< std::string, std::string >())
 
 GribFileIndex (boost::filesystem::path gribmlFilePath)
 
virtual ~GribFileIndex ()
 
const std::vector< GribFileMessage > & listMessages () const
 
const std::stringgetUrl () const
 

Constructor & Destructor Documentation

MetNoFimex::GribFileIndex::GribFileIndex ( )
MetNoFimex::GribFileIndex::GribFileIndex ( boost::filesystem::path  gribFilePath,
const std::vector< std::pair< std::string, boost::regex > > &  members,
bool  ignoreExistingXml = false,
std::map< std::string, std::string options = std::mapstd::stringstd::string >() 
)

Initialize the gribFileIndex for the gribFile gribFilePath. If ignoreExistingXml = false, searches for existing indexes in

  • file.grbml
  • ENV{GRIB_FILE_INDEX}/file.grbml

Otherwise, it parses the grib-file and creates a index in memory.

Performance for getting an index of a 150MB grib-file with some 10s of messages:

  • remote NFS file, first time: 16s
  • file completely in memory: 1.1s
  • xml-file: 0.1s
Parameters
gribFilePathpath to first filename
memberstranslation of members to filenames
ignoreExistingXmlif file has been indexed before, the index will be used unless this option is set to true
optionsmap with several string options, currently, only earthfigure = proj4-string is allowed
MetNoFimex::GribFileIndex::GribFileIndex ( boost::filesystem::path  gribFilePath,
boost::filesystem::path  grbmlFilePath,
const std::vector< std::pair< std::string, boost::regex > > &  members,
bool  ignoreExistingXml = false,
std::map< std::string, std::string options = std::mapstd::stringstd::string >() 
)

Create a joined index from gribml and grib-file

Initialize the gribFileIndex for the gribFile gribFilePath. If ignoreExistingXml = false, searches for existing indexes in

  • file.grbml
  • ENV{GRIB_FILE_INDEX}/file.grbml

Otherwise, it parses the grib-file and creates a index in memory.

Performance for getting an index of a 150MB grib-file with some 10s of messages:

  • remote NFS file, first time: 16s
  • file completely in memory: 1.1s
  • xml-file: 0.1s
Parameters
gribFilePathpath to first filename (or empty)
grbmlFilePathpath to gribml to append information from
memberstranslation of members to filenames
ignoreExistingXmlif file has been indexed before, the index will be used unless this option is set to true
optionsmap with several string options, currently, only earthfigure = proj4-string is allowed
MetNoFimex::GribFileIndex::GribFileIndex ( boost::filesystem::path  gribmlFilePath)

Create an index from gribml.

Initialize the gribFileIndex for the gribFile gribFilePath. If ignoreExistingXml = false, searches for existing indexes in

  • file.grbml
  • ENV{GRIB_FILE_INDEX}/file.grbml

Otherwise, it parses the grib-file and creates a index in memory.

Performance for getting an index of a 150MB grib-file with some 10s of messages:

  • remote NFS file, first time: 16s
  • file completely in memory: 1.1s
  • xml-file: 0.1s
Parameters
gribmlFilePathpath to gribml to append information from
virtual MetNoFimex::GribFileIndex::~GribFileIndex ( )
virtual

Member Function Documentation

const std::string& MetNoFimex::GribFileIndex::getUrl ( ) const
inline
const std::vector<GribFileMessage>& MetNoFimex::GribFileIndex::listMessages ( ) const
inline

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