OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Private Attributes | List of all members
ossimLasInfo Class Reference

LAS LIDAR info object. More...

#include <ossimLasInfo.h>

Inheritance diagram for ossimLasInfo:
ossimInfoBase ossimReferenced

Public Member Functions

 ossimLasInfo ()
 default constructor More...
 
virtual ~ossimLasInfo ()
 virtual destructor More...
 
virtual bool open (const ossimFilename &file)
 open method. More...
 
virtual std::ostream & print (std::ostream &out) const
 Print method. More...
 
- Public Member Functions inherited from ossimInfoBase
 ossimInfoBase ()
 default constructor More...
 
virtual bool open (std::shared_ptr< ossim::istream > &str, const std::string &connectionString)
 open method. More...
 
void setProcessOverviewFlag (bool flag)
 Sets the overview flag. More...
 
bool getProcessOverviewFlag () const
 Method to get the overview flag. More...
 
virtual bool getKeywordlist (ossimKeywordlist &kwl) const
 Method to dump info to a keyword list. More...
 
virtual bool getKeywordlist (ossimKeywordlist &kwl, ossim_uint32 entryIndex) const
 Method to dump info to a keyword list. More...
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 

Private Attributes

ossimFilename m_file
 

Additional Inherited Members

- Protected Member Functions inherited from ossimInfoBase
virtual ~ossimInfoBase ()
 virtual destructor More...
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Attributes inherited from ossimInfoBase
bool theOverviewFlag
 

Detailed Description

LAS LIDAR info object.

Definition at line 25 of file ossimLasInfo.h.

Constructor & Destructor Documentation

◆ ossimLasInfo()

ossimLasInfo::ossimLasInfo ( )

default constructor

Definition at line 21 of file ossimLasInfo.cpp.

22  : m_file()
23 {
24 }
ossimFilename m_file
Definition: ossimLasInfo.h:54

◆ ~ossimLasInfo()

ossimLasInfo::~ossimLasInfo ( )
virtual

virtual destructor

Definition at line 26 of file ossimLasInfo.cpp.

27 {
28 }

Member Function Documentation

◆ open()

bool ossimLasInfo::open ( const ossimFilename file)
virtual

open method.

Parameters
fileFile name to open.
Returns
true on success false on error.

Reimplemented from ossimInfoBase.

Definition at line 30 of file ossimLasInfo.cpp.

References ossimString::c_str(), ossimLasHdr::checkSignature(), and m_file.

31 {
32  bool result = false;
33  std::ifstream istr;
34  istr.open(file.c_str(), std::ios_base::in | std::ios_base::binary);
35  if ( istr.is_open() )
36  {
37  ossimLasHdr hdr;
38  result = hdr.checkSignature(istr);
39  if (result) m_file = file;
40  }
41  return result;
42 }
std::basic_ifstream< char > ifstream
Class for char input file streams.
Definition: ossimIosFwd.h:44
bool checkSignature(std::istream &in) const
Checks for LASF in first four bytes.
ossimFilename m_file
Definition: ossimLasInfo.h:54
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

◆ print()

std::ostream & ossimLasInfo::print ( std::ostream &  out) const
virtual

Print method.

Parameters
outStream to print to.
Returns
std::ostream&

Implements ossimInfoBase.

Definition at line 44 of file ossimLasInfo.cpp.

References ossimString::c_str(), ossimLasHdr::checkSignature(), m_file, ossimLasHdr::print(), and ossimLasHdr::readStream().

45 {
46  std::ifstream istr;
47  istr.open(m_file.c_str(), std::ios_base::in | std::ios_base::binary);
48  if ( istr.is_open() )
49  {
50  ossimLasHdr hdr;
51  if ( hdr.checkSignature(istr) )
52  {
53  istr.seekg(0, std::ios_base::beg);
54  hdr.readStream(istr);
55  hdr.print(out);
56  }
57  }
58  return out;
59 }
std::ostream & print(std::ostream &out) const
print method.
std::basic_ifstream< char > ifstream
Class for char input file streams.
Definition: ossimIosFwd.h:44
bool checkSignature(std::istream &in) const
Checks for LASF in first four bytes.
ossimFilename m_file
Definition: ossimLasInfo.h:54
void readStream(std::istream &in)
Method to initialize from input stream.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

Member Data Documentation

◆ m_file

ossimFilename ossimLasInfo::m_file
private

Definition at line 54 of file ossimLasInfo.h.

Referenced by open(), and print().


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