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

#include <ossimVpfCoverage.h>

Public Member Functions

 ossimVpfCoverage ()
 
virtual ~ossimVpfCoverage ()
 
bool openCoverage (ossimVpfLibrary *library, const ossimString &name, const ossimFilename &fileName)
 
const ossimFilenamegetPath () const
 
const ossimStringgetName () const
 
ossim_uint32 getNumberOfFeatureClasses () const
 
void print (ostream &out) const
 
bool getExtent (ossimVpfExtent &extent) const
 
ossimVpfLibrarygetLibrary ()
 
bool openFeatureClassSchema (ossimVpfFeatureClassSchema &schema)
 

Private Attributes

ossimVpfLibrarytheLibrary
 
ossimString theCoverageName
 
ossimFilename theCoverageNameFullPath
 

Detailed Description

Definition at line 23 of file ossimVpfCoverage.h.

Constructor & Destructor Documentation

◆ ossimVpfCoverage()

ossimVpfCoverage::ossimVpfCoverage ( )

Definition at line 19 of file ossimVpfCoverage.cpp.

20  :theLibrary(NULL),
21  theCoverageName(""),
23 {
24 }
ossimVpfLibrary * theLibrary
ossimString theCoverageName
ossimFilename theCoverageNameFullPath

◆ ~ossimVpfCoverage()

ossimVpfCoverage::~ossimVpfCoverage ( )
virtual

Definition at line 26 of file ossimVpfCoverage.cpp.

References theLibrary.

27 {
28  theLibrary = NULL;
29 }
ossimVpfLibrary * theLibrary

Member Function Documentation

◆ getExtent()

bool ossimVpfCoverage::getExtent ( ossimVpfExtent extent) const

Definition at line 67 of file ossimVpfCoverage.cpp.

References ossimFilename::dirCat(), ossimString::downcase(), ossimFilename::exists(), ossimVpfBoundingRecordTable::getExtent(), ossimVpfLibrary::getTileNames(), ossimVpfBoundingRecordTable::openTable(), theCoverageNameFullPath, and theLibrary.

68 {
69  bool result = false;
70  bool firstOneSetFlag = false;
71  ossimVpfExtent resultExtent;
72  ossimVpfExtent tempExtent;
73  if(theLibrary)
74  {
76  {
77  ossimVpfBoundingRecordTable boundingRecord;
78 
79  if(boundingRecord.openTable(theCoverageNameFullPath.dirCat("ebr")))
80  {
81  boundingRecord.getExtent(tempExtent);
82  resultExtent = tempExtent;
83  firstOneSetFlag = true;
84  result = true;
85  }
86  }
88  {
89  ossimVpfBoundingRecordTable boundingRecord;
90 
91  if(boundingRecord.openTable(theCoverageNameFullPath.dirCat("fbr")))
92  {
93  boundingRecord.getExtent(tempExtent);
94 
95  if(!firstOneSetFlag)
96  {
97  resultExtent = tempExtent;
98  firstOneSetFlag = true;
99  }
100  else
101  {
102  resultExtent = resultExtent + tempExtent;
103  }
104 
105  result = true;
106  }
107  }
108  std::vector<ossimString> tileNames;
109 
110  theLibrary->getTileNames(tileNames);
111 
112  for(int i = 0; i < (int)tileNames.size(); ++i)
113  {
114  ossimFilename tileName = tileNames[0];
115  ossimFilename tileDir;
116  if(theCoverageNameFullPath.dirCat(tileName).exists())
117  {
118  tileDir = theCoverageNameFullPath.dirCat(tileName);
119  }
120  else if(theCoverageNameFullPath.dirCat(tileName.downcase()).exists())
121  {
122  tileDir = theCoverageNameFullPath.dirCat(tileName.downcase());
123  }
124  if(tileDir != "")
125  {
126  if(tileDir.dirCat("ebr").exists())
127  {
128  ossimVpfBoundingRecordTable boundingRecord;
129 
130  if(boundingRecord.openTable(tileDir.dirCat("ebr")))
131  {
132  boundingRecord.getExtent(tempExtent);
133 
134  if(!firstOneSetFlag)
135  {
136  resultExtent = tempExtent;
137  firstOneSetFlag = true;
138  }
139  else
140  {
141  resultExtent = resultExtent + tempExtent;
142  }
143 
144  result = true;
145  }
146  }
147  if(tileDir.dirCat("fbr").exists())
148  {
149  ossimVpfBoundingRecordTable boundingRecord;
150 
151  if(boundingRecord.openTable(tileDir.dirCat("fbr")))
152  {
153  boundingRecord.getExtent(tempExtent);
154 
155  if(!firstOneSetFlag)
156  {
157  resultExtent = tempExtent;
158  firstOneSetFlag = true;
159  }
160  else
161  {
162  resultExtent = resultExtent + tempExtent;
163  }
164 
165  result = true;
166  }
167  }
168  }
169  }
170  }
171 
172  extent = resultExtent;
173 
174  return result;
175 }
ossimVpfLibrary * theLibrary
virtual bool openTable(const ossimFilename &tableName)
void getTileNames(std::vector< ossimString > &tileNames) const
bool exists() const
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
ossimFilename theCoverageNameFullPath
void getExtent(ossimVpfExtent &extent) const
ossimFilename dirCat(const ossimFilename &file) const

◆ getLibrary()

ossimVpfLibrary * ossimVpfCoverage::getLibrary ( )

◆ getName()

const ossimString & ossimVpfCoverage::getName ( ) const

Definition at line 53 of file ossimVpfCoverage.cpp.

References theCoverageName.

54 {
55  return theCoverageName;
56 }
ossimString theCoverageName

◆ getNumberOfFeatureClasses()

ossim_uint32 ossimVpfCoverage::getNumberOfFeatureClasses ( ) const

◆ getPath()

const ossimFilename & ossimVpfCoverage::getPath ( ) const

◆ openCoverage()

bool ossimVpfCoverage::openCoverage ( ossimVpfLibrary library,
const ossimString name,
const ossimFilename fileName 
)

Definition at line 31 of file ossimVpfCoverage.cpp.

References ossimFilename::dirCat(), ossimFilename::exists(), theCoverageName, theCoverageNameFullPath, and theLibrary.

Referenced by ossimVpfLibrary::getCoverage().

34 {
35  bool result = true;
36  theCoverageName = name;
37  theCoverageNameFullPath = fullPath;
38  theLibrary = library;
39 
41  {
42  result = false;
43  }
44 
45  return result;
46 }
ossimVpfLibrary * theLibrary
bool exists() const
ossimString theCoverageName
ossimFilename theCoverageNameFullPath
ossimFilename dirCat(const ossimFilename &file) const

◆ openFeatureClassSchema()

bool ossimVpfCoverage::openFeatureClassSchema ( ossimVpfFeatureClassSchema schema)

◆ print()

void ossimVpfCoverage::print ( ostream &  out) const

Definition at line 58 of file ossimVpfCoverage.cpp.

References ossimFilename::dirCat(), ossimVpfTable::openTable(), ossimVpfTable::print(), and theCoverageNameFullPath.

59 {
60  ossimVpfTable table;
61  if(table.openTable(theCoverageNameFullPath.dirCat("fcs")))
62  {
63  table.print(out);
64  }
65 }
virtual bool openTable(const ossimFilename &tableName)
ossimFilename theCoverageNameFullPath
ossimFilename dirCat(const ossimFilename &file) const
virtual void print(std::ostream &out) const

Member Data Documentation

◆ theCoverageName

ossimString ossimVpfCoverage::theCoverageName
private

Definition at line 44 of file ossimVpfCoverage.h.

Referenced by getName(), and openCoverage().

◆ theCoverageNameFullPath

ossimFilename ossimVpfCoverage::theCoverageNameFullPath
private

will hold the full path to this coverage.

Definition at line 49 of file ossimVpfCoverage.h.

Referenced by getExtent(), getPath(), openCoverage(), and print().

◆ theLibrary

ossimVpfLibrary* ossimVpfCoverage::theLibrary
private

Definition at line 43 of file ossimVpfCoverage.h.

Referenced by getExtent(), getLibrary(), openCoverage(), and ~ossimVpfCoverage().


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