KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
kjb::Ned13_grid_cache Class Reference

This caches a bunch (potentially) of one-degree grids for you. More...

#include <nedgrid.h>

Public Member Functions

 Ned13_grid_cache (const std::vector< std::string > &path=std::vector< std::string >())
 
virtual ~Ned13_grid_cache ()
 dtor cleans up (releases all grid objects in the cache) More...
 
const Ned13_one_degree_gridfetch (const Ned13_one_degree_grid::IntegralLL &)
 return reference to grid with the given exact NW corner point More...
 
const Ned13_one_degree_gridfetch (double, double)
 reference to grid, reading from cache or loading if necessary More...
 
const Ned13_one_degree_gridfetch (const TopoFusion::pt &p)
 return reference to grid, from cache or loading if necessary More...
 
size_t cache_size () const
 return the number of grids in the cache More...
 

Detailed Description

This caches a bunch (potentially) of one-degree grids for you.

Constructor & Destructor Documentation

kjb::Ned13_grid_cache::Ned13_grid_cache ( const std::vector< std::string > &  path = std::vector<std::string>())
inline
virtual kjb::Ned13_grid_cache::~Ned13_grid_cache ( )
inlinevirtual

dtor cleans up (releases all grid objects in the cache)

Member Function Documentation

size_t kjb::Ned13_grid_cache::cache_size ( ) const
inline

return the number of grids in the cache

This is useful to prevent your cache from getting TOO big, because those tile files are quite large. So, you can poll the size occasionally, and throw away the cache when it gets excessive.

const Ned13_one_degree_grid & kjb::Ned13_grid_cache::fetch ( const Ned13_one_degree_grid::IntegralLL nw_corner)

return reference to grid with the given exact NW corner point

const Ned13_one_degree_grid & kjb::Ned13_grid_cache::fetch ( double  deg_lat,
double  deg_long 
)

reference to grid, reading from cache or loading if necessary

Returns
reference to grid containing the specified point
Parameters
deg_latdegrees of latitude of some point within the grid
deg_longdegrees of longitude (negative in USA) of point within grid
const Ned13_one_degree_grid& kjb::Ned13_grid_cache::fetch ( const TopoFusion::pt p)
inline

return reference to grid, from cache or loading if necessary


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