LASReader contains one header file LAS.hpp and one implementation file LAS.cpp. Two structs declared in LAS namespace:
- Parameter
- LASFile
Parameter struct holds textual information of any single mandatory or optional parameter that has been read from input file, such as VERS, STRT or LIC.
LASFile struct holds all the information that could be read from input file.
The following example programm creates a LAS::LASFile pointer through a constructor that takes
one argument std::string path and automatically reads the input file. Then the pointer is used to access
data (value and unit) that correspond to 'STEP' mnemonic in the file, other information and index values.
int main()
{
std::string path = ".../.../*.las";
LAS::LASFile* lasFile = new LAS::LASFile(path);
std::cout << lasFile->step().value << std::endl;
std::cout << lasFile->step().unit << std::endl;
std::cout << lasFile->other() std::endl;
for (auto const& x : lasFile->index())
std::cout << x << std::endl;
delete lasFile;
return 0;
}- Holds mnemonic of the parameter.
- Holds unit, associated with the mnemonic.
- Holds value, associated with the mnemonic.
- Holds description, associated with the mnemonic.
- Creates empty
LAS::LASFileobject with mandatory fields specified.
- Same as
LASFile(), but takes the path of input file.
- Reads the contents of file specified by
pathintoLAS::LASFileobject on which it was called.
- Outputs the header of las file into console.
- Returns the value of
Parameterwith mnemonic 'VERS'.
Access the mandatory and optional parameters from sections '~Version Information' and '~Well Information'
These functions take no arguments and return value of type is LAS::Parameter, whose fields can be accessed via .
operator like this: lasFile.srart().unit or lasFile.null().value, where lasFile is an object of type LAS::LASFile.
- Returns textual value from '~Other Information' section.
- Returns the list of all parameters that were read from '~Parameter Information' section.
- Returns the list of all parameters that were read from '~Curve Information' section.
- Returns the list of index values.
- Returns the 2D list of all data values corresponfing to their index values. Size of first dimension of
data()return value is the same as size ofindex()return value.