LSDTopoTools
 All Classes Files Functions Variables Friends Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LSDRasterInfo Class Reference

Object that stores georeferencing information. This information is also stored with the raster, it is seperated here mainly to compare different datasets. More...

#include <LSDRasterInfo.hpp>

Public Member Functions

 LSDRasterInfo ()
 an empty create function
 
 LSDRasterInfo (string filename, string extension)
 This function reads the file.
 
 LSDRasterInfo (LSDRaster &Raster)
 This gets the information from an existing raster.
 
 LSDRasterInfo (LSDIndexRaster &IRaster)
 This gets the information from an existing index raster.
 
bool operator== (LSDRasterInfo &LSDRI)
 The equality operator.
 
bool operator!= (LSDRasterInfo &LSDRI)
 The inequality operator.
 
void get_UTM_information (int &UTM_zone, bool &is_North)
 this function gets the UTM_zone and a boolean that is true if the map is in the northern hemisphere More...
 
bool check_if_point_is_in_raster (float X_coordinate, float Y_coordinate)
 this check to see if a point is within the raster More...
 
int get_NRows () const
 
int get_NCols () const
 
float get_XMinimum () const
 
float get_YMinimum () const
 
float get_DataResolution () const
 
int get_NoDataValue () const
 
map< string, string > get_GeoReferencingStrings () const
 

Protected Member Functions

void read_header (string filename, string extension)
 Read a header The supported formats are .asc, .flt and .bil which are both exported and imported by arcmap. The filename is the string of characters before the '.' in the extension and the extension is the characters after the '.'. If the full filename is my_dem.01.asc then: filename = "my_dem.01" and extension = "asc". For float files both a data file and a header are read the header file must have the same filename, before extention, of the raster data, and the extension must be .hdr. More...
 

Protected Attributes

int NRows
 Number of rows.
 
int NCols
 Number of columns.
 
float XMinimum
 Minimum X coordinate.
 
float YMinimum
 Minimum Y coordinate.
 
float DataResolution
 Data resolution.
 
int NoDataValue
 No data value.
 
map< string, string > GeoReferencingStrings
 A map of strings for holding georeferencing information.
 

Detailed Description

Object that stores georeferencing information. This information is also stored with the raster, it is seperated here mainly to compare different datasets.

Member Function Documentation

bool LSDRasterInfo::check_if_point_is_in_raster ( float  X_coordinate,
float  Y_coordinate 
)

this check to see if a point is within the raster

Parameters
X_coordinatethe x location of the point
Y_coordinatethe y location of the point
Returns
is_in_raster a boolean telling if the point is in the raster
Author
SMM
Date
13/11/2014
float LSDRasterInfo::get_DataResolution ( ) const
inline
Returns
Data resolution as an integer.
map<string,string> LSDRasterInfo::get_GeoReferencingStrings ( ) const
inline
Returns
map containing the georeferencing strings
int LSDRasterInfo::get_NCols ( ) const
inline
Returns
Number of columns as an integer.
int LSDRasterInfo::get_NoDataValue ( ) const
inline
Returns
No Data Value as an integer.
int LSDRasterInfo::get_NRows ( ) const
inline
Returns
Number of rows as an integer.
void LSDRasterInfo::get_UTM_information ( int &  UTM_zone,
bool &  is_North 
)

this function gets the UTM_zone and a boolean that is true if the map is in the northern hemisphere

Parameters
UTM_zonethe UTM zone. Replaced in function.
is_Northa boolean that is true if the DEM is in the northern hemisphere. replaced in function
Author
SMM
Date
22/12/2014
float LSDRasterInfo::get_XMinimum ( ) const
inline
Returns
Minimum X coordinate as an integer.
float LSDRasterInfo::get_YMinimum ( ) const
inline
Returns
Minimum Y coordinate as an integer.
void LSDRasterInfo::read_header ( string  filename,
string  extension 
)
protected

Read a header The supported formats are .asc, .flt and .bil which are both exported and imported by arcmap. The filename is the string of characters before the '.' in the extension and the extension is the characters after the '.'. If the full filename is my_dem.01.asc then: filename = "my_dem.01" and extension = "asc". For float files both a data file and a header are read the header file must have the same filename, before extention, of the raster data, and the extension must be .hdr.

Parameters
filenamethe prefix of the file
extensionthis is either "asc", "flt", or "bil"
Author
SMM
Date
01/01/12

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