Public Member Functions

sc_earth_elevation_square Class Reference

An object used internally to manage data from a single DEM file. More...

List of all members.

Public Member Functions

 sc_earth_elevation_square (int lat, int lon, const char *pathToDemFiles)
 constructor
 ~sc_earth_elevation_square ()
 destructor
double elevationForLatLon (double lat, double lon)
bool hasLandInGridSquare (double lat, double lon, ElevationPrecision gridSize)

Detailed Description

sc_earth_elevation_square is an object used internally to manage data from a single DEM file


Member Function Documentation

double sc_earth_elevation_square::elevationForLatLon ( double  lat,
double  lon 
)
Parameters:
latlatitude (degrees -90 to 90)
lonlongitude (degrees -180 to 180)
Returns:
approximate land elevation in km for the given lat/lon (degrees)

References kDegreesPerPixel.

Referenced by sc_earth_elevation::elevationForLatLon(), and hasLandInGridSquare().

bool sc_earth_elevation_square::hasLandInGridSquare ( double  lat,
double  lon,
ElevationPrecision  gridSize 
)
Parameters:
latlatitude (degrees -90 to 90)
lonlongitude (degrees -180 to 180)
gridSizesize of grid square to analyze
Returns:
true if there is any land in the grid square containing the given lat/lon (degrees)

References elevationForLatLon(), and kDegreesPerPixel.

Referenced by sc_earth_elevation::hasLandInGridSquare().