ug4
|
#include <file_io_asc.h>
Public Member Functions | |
number | at (size_t r, size_t c) const |
number | cell_size () const |
const Field< number > & | field () const |
FileReaderASC () | |
void | load_file (const char *filename) |
number | lower_left_corner_x () const |
number | lower_left_corner_y () const |
number | no_data_value () const |
size_t | num_columns () const |
size_t | num_rows () const |
void | set_field (Field< number > *field) |
set an external field in which the data will be loaded More... | |
~FileReaderASC () | |
Private Attributes | |
number | m_cellSize |
Field< number > * | m_field |
vector2 | m_llcorner |
number | m_noDataValue |
SmartPtr< Field< number > > | m_privateField |
ug::FileReaderASC::FileReaderASC | ( | ) |
References m_field, m_privateField, and make_sp().
ug::FileReaderASC::~FileReaderASC | ( | ) |
|
inline |
References ug::Field< T >::at(), and m_field.
|
inline |
References m_cellSize.
Referenced by ug::LoadGridFromASC(), and ug::LoadHeightfieldFromASC().
References m_field.
Referenced by load_file(), ug::LoadGridFromASC(), and set_field().
void ug::FileReaderASC::load_file | ( | const char * | filename | ) |
References ug::Field< T >::at(), field(), m_cellSize, m_field, m_llcorner, m_noDataValue, name, ug::Field< T >::resize_no_copy(), ug::ToLower(), UG_COND_THROW, and UG_THROW.
Referenced by ug::LoadGridFromASC(), and ug::LoadHeightfieldFromASC().
|
inline |
References m_llcorner.
Referenced by ug::LoadGridFromASC(), and ug::LoadHeightfieldFromASC().
|
inline |
References m_llcorner.
Referenced by ug::LoadGridFromASC(), and ug::LoadHeightfieldFromASC().
|
inline |
References m_noDataValue.
Referenced by ug::LoadGridFromASC(), and ug::LoadHeightfieldFromASC().
|
inline |
References m_field, and ug::Field< T >::width().
|
inline |
References ug::Field< T >::height(), and m_field.
set an external field in which the data will be loaded
By default data is loaded into the internal field of the FileReader. If you want to provide a field into which the data shall be loaded, e.g. to avoid memory duplication and copying, you may use this method. In this case you should make sure that the provided field instance outlives the FileReaders instance. Call this method with NULL to indicate that the internal field shall be used again.
References field(), m_field, and m_privateField.
Referenced by ug::LoadHeightfieldFromASC().
|
private |
Referenced by cell_size(), and load_file().
Referenced by at(), field(), FileReaderASC(), load_file(), num_columns(), num_rows(), and set_field().
|
private |
Referenced by load_file(), lower_left_corner_x(), and lower_left_corner_y().
|
private |
Referenced by load_file(), and no_data_value().
Referenced by FileReaderASC(), and set_field().