OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimPdalReaderFactory.cpp
Go to the documentation of this file.
1 //**************************************************************************************************
2 //
3 // OSSIM (http://trac.osgeo.org/ossim/)
4 //
5 // License: LGPL -- See LICENSE.txt file in the top level directory for more details.
6 //
7 //**************************************************************************************************
8 // $Id$
9 
10 #include "ossimPdalReaderFactory.h"
11 #include <ossim/base/ossimTrace.h>
12 #include "ossimPdalFileReader.h"
13 #include "ossimRialtoReader.h"
14 
16 
18 
20 {
21  m_instance = 0;
22 }
23 
25 {
26  if (!m_instance)
27  {
29  }
30  return m_instance;
31 }
32 
34 {
36 
37  reader = new ossimPdalFileReader;
38  if (!reader->open(fileName))
39  {
40  reader = new ossimRialtoReader;
41  if (!reader->open(fileName))
42  reader = 0;
43  }
44  return reader.release();
45 }
46 
48  const char* prefix) const
49 {
51  if (!reader->loadState(kwl, prefix))
52  {
53  reader = new ossimRialtoReader;
54  if (!reader->loadState(kwl, prefix))
55  reader = 0;
56  }
57 
58  return reader.release();
59 }
60 
62 {
63  ossimRefPtr<ossimObject> result = 0;
64  if (typeName == "ossimPdalFileReader")
65  {
66  result = new ossimPdalFileReader;
67  }
68  else if (typeName == "ossimPdalTileDbReader")
69  {
70  result = new ossimRialtoReader;
71  }
72  return result.release();
73 }
74 
76  const char* prefix) const
77 {
78  return (ossimObject*) open(kwl, prefix);
79 }
80 
81 void ossimPdalReaderFactory::getTypeNameList(std::vector<ossimString>& typeList) const
82 {
83  typeList.push_back(ossimString("ossimPdalFileReader"));
84  typeList.push_back(ossimString("ossimPdalTileDbReader"));
85 }
86 
87 void ossimPdalReaderFactory::getSupportedExtensions(std::vector<ossimString>& extensionList) const
88 {
89  extensionList.push_back(ossimString("las"));
90  extensionList.push_back(ossimString("laz"));
91  extensionList.push_back(ossimString("sqlite"));
92 }
93 
95 {
96 }
97 
99 {
100 }
101 
103 {
104 }
105 
106 
virtual bool open(const ossimFilename &imageFile)=0
Method to open input point cloud dataset.
virtual void getSupportedExtensions(std::vector< ossimString > &extList) const
Represents serializable keyword/value map.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Definition: ossimSource.cpp:66
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
virtual ossimObject * createObject(const ossimString &typeName) const
static ossimPdalReaderFactory * m_instance
static instance of this class
static ossimPdalReaderFactory * instance()
RTTI_DEF1(ossimPdalReaderFactory, "ossimPdalReaderFactory", ossimPointCloudHandlerFactory)
Factory for PNG image reader.
T * release()
Definition: ossimRefPtr.h:93
virtual ~ossimPdalReaderFactory()
virtual destructor
virtual ossimPdalReader * open(const ossimFilename &fileName) const
void operator=(const ossimPdalReaderFactory &)
hidden from use copy constructor
ossimPdalReaderFactory()
hidden from use default constructor