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

storage for a single NED13 grid tile, plus convenient access. More...

#include <nedgrid.h>

Classes

struct  IntegralLL
 integer-valued, latitude-style and longitude-style coordinates More...
 

Public Types

typedef std::vector< std::string > Path
 list of dirs to srch for tiles More...
 

Public Member Functions

 Ned13_one_degree_grid (const IntegralLL &ill, const Path &path)
 try to load a NED13 tile at a given geo location More...
 
 Ned13_one_degree_grid (int, int, const Path &)
 ctor saves the user some typing, but it's just syntactic sugar. More...
 
bool is_in_bounds (const IntegralLL &) const
 is the given location within this grid? More...
 
float elevation_meters (const IntegralLL &) const
 get the elevation, in meters, at the given point More...
 
float maximum_elevation () const
 determine the maximum elevation value in the grid More...
 
float minimum_elevation () const
 determine the minimum elevation, disregarding missing-data flag More...
 
std::pair< float, float > max_and_min_elevations () const
 determine extremal elevations, disregarding missing-data flag More...
 
void swap (Ned13_one_degree_grid &)
 
IntegralLL northwest_corner () const
 get the whole-degree location of the northwest corner of grid More...
 
IntegralLL southeast_corner () const
 get the whole-degree location of the southeast corner of grid More...
 

Detailed Description

storage for a single NED13 grid tile, plus convenient access.

This does not perform interpolation. Use the "elevation_meters" method to get the elevation of a point in the grid. "Ah," you ask, "but how to get the point I really want?"

To specify locations, there is a helper class defined inside this one: IntegralLL, which is based on integers, and stores latitude and longitude in units of one-third arcsecond; you can increment those values by +/- 1 to step through all grid points, until you are out of bounds.

Also you can generate an IntegralLL point from decimal degrees, but remember this will quantize your point by truncating, usually to the south and east, although computation artifacts can distort the effect, yielding a point sometimes apparently to the north and west (by a few centimeters).

The USGS tiles come with a thin margin around all four edges, so actually these tiles are 1 degree, 4 arcseconds per edge. Thus you can go to the "northwest corner," and keep going west or north by six more steps. Similarly at the southeast corner.

Also see the max and min functions – you might appreciate them because they disregard missing-data locations.

Member Typedef Documentation

typedef std::vector<std::string> kjb::Ned13_one_degree_grid::Path

list of dirs to srch for tiles

Constructor & Destructor Documentation

kjb::Ned13_one_degree_grid::Ned13_one_degree_grid ( const IntegralLL ill,
const Path path 
)

try to load a NED13 tile at a given geo location

Parameters
illlocation of a point in the grid (not necessarily at corner)
pathoptional list of directories where to look for tile files.

If the input path is empty, we by default assume a location on the local vision file server. If the path is not empty, we do not make that default assumption, and instead each entry in the path should be the name of a directory to look in.

kjb::Ned13_one_degree_grid::Ned13_one_degree_grid ( int  north_lat_deg,
int  west_lon_deg,
const Path p 
)

ctor saves the user some typing, but it's just syntactic sugar.

Member Function Documentation

float kjb::Ned13_one_degree_grid::elevation_meters ( const IntegralLL ill) const

get the elevation, in meters, at the given point

bool kjb::Ned13_one_degree_grid::is_in_bounds ( const IntegralLL ill) const

is the given location within this grid?

std::pair< float, float > kjb::Ned13_one_degree_grid::max_and_min_elevations ( ) const

determine extremal elevations, disregarding missing-data flag

float kjb::Ned13_one_degree_grid::maximum_elevation ( ) const
inline

determine the maximum elevation value in the grid

float kjb::Ned13_one_degree_grid::minimum_elevation ( ) const
inline

determine the minimum elevation, disregarding missing-data flag

GILL kjb::Ned13_one_degree_grid::northwest_corner ( ) const

get the whole-degree location of the northwest corner of grid

GILL kjb::Ned13_one_degree_grid::southeast_corner ( ) const

get the whole-degree location of the southeast corner of grid

void kjb::Ned13_one_degree_grid::swap ( Ned13_one_degree_grid q)

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