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

#include <ossimVpfBoundingRecordTable.h>

Inheritance diagram for ossimVpfBoundingRecordTable:
ossimVpfTable

Public Member Functions

 ossimVpfBoundingRecordTable ()
 
virtual bool openTable (const ossimFilename &tableName)
 
void getExtent (ossimVpfExtent &extent) const
 
- Public Member Functions inherited from ossimVpfTable
 ossimVpfTable ()
 
virtual ~ossimVpfTable ()
 
virtual void closeTable ()
 
virtual void print (std::ostream &out) const
 
int getNumberOfRows () const
 
int getNumberOfColumns () const
 
ossimString getColumnName (int idx) const
 
virtual bool isClosed () const
 
virtual void reset () const
 
virtual bool goToRow (long row) const
 
vpf_table_typegetVpfTableData ()
 
std::vector< ossimStringgetColumnValues (const ossimString &columnName) const
 
std::vector< ossimStringgetColumnValues (long columnNumber) const
 
ossimString getColumnValueAsString (row_type &row, long columnNumber) const
 
ossimString getColumnValueAsString (ossim_int32 rowNumber, long columnNumber) const
 
ossimString getColumnValueAsString (const ossimString &columnName)
 
ossim_int32 getColumnPosition (const ossimString &columnName) const
 

Protected Attributes

ossimVpfExtent theExtent
 
- Protected Attributes inherited from ossimVpfTable
vpf_table_typetheTableInformation
 
ossimFilename theTableName
 

Detailed Description

Definition at line 6 of file ossimVpfBoundingRecordTable.h.

Constructor & Destructor Documentation

◆ ossimVpfBoundingRecordTable()

ossimVpfBoundingRecordTable::ossimVpfBoundingRecordTable ( )

Definition at line 3 of file ossimVpfBoundingRecordTable.cpp.

5 {
6 }

Member Function Documentation

◆ getExtent()

void ossimVpfBoundingRecordTable::getExtent ( ossimVpfExtent extent) const

Definition at line 102 of file ossimVpfBoundingRecordTable.cpp.

References theExtent.

Referenced by ossimVpfCoverage::getExtent().

103 {
104  extent = theExtent;
105 }

◆ openTable()

bool ossimVpfBoundingRecordTable::openTable ( const ossimFilename tableName)
virtual

Will open the table. Will return OSSIM_OK if it was successful or OSSIM_ERROR if unsuccessful.

Reimplemented from ossimVpfTable.

Definition at line 8 of file ossimVpfBoundingRecordTable.cpp.

References ossimVpfTable::closeTable(), free_row(), get_table_element(), ossimVpfTable::getColumnPosition(), ossimVpfTable::getNumberOfRows(), is_vpf_null_float(), n, ossimVpfTable::openTable(), read_next_row(), read_row(), ossimVpfTable::reset(), theExtent, and ossimVpfTable::theTableInformation.

Referenced by ossimVpfCoverage::getExtent().

9 {
10  bool result = false;
11  theExtent = ossimVpfExtent(0,0,0,0);
12  bool firstOneSetFlag = false;
13 
14  if(ossimVpfTable::openTable(tableName))
15  {
16  ossim_int32 xminIdx = getColumnPosition("XMIN");
17  ossim_int32 yminIdx = getColumnPosition("YMIN");
18  ossim_int32 xmaxIdx = getColumnPosition("XMAX");
19  ossim_int32 ymaxIdx = getColumnPosition("YMAX");
20 
21  if((xminIdx < 0)||
22  (yminIdx < 0)||
23  (xmaxIdx < 0)||
24  (ymaxIdx < 0))
25  {
26  closeTable();
27  }
28  else
29  {
30  if(getNumberOfRows() > 0)
31  {
32  result = true;
33  reset();
34  ossim_int32 n = 1;
35 
36  ossim_float32 xmin;
37  ossim_float32 ymin;
38  ossim_float32 xmax;
39  ossim_float32 ymax;
40 
41  row_type row;
42  for(int rowIdx = 1; rowIdx < getNumberOfRows(); ++rowIdx)
43  {
44  if(rowIdx == 1)
45  {
46  row = read_row(rowIdx,
48  }
49  else
50  {
52  }
53  get_table_element(xminIdx,
54  row,
56  &xmin,
57  &n);
58  get_table_element(yminIdx,
59  row,
61  &ymin,
62  &n);
63  get_table_element(xmaxIdx,
64  row,
66  &xmax,
67  &n);
68  get_table_element(ymaxIdx,
69  row,
71  &ymax,
72  &n);
73  if(!is_vpf_null_float(xmin)&&
74  !is_vpf_null_float(ymin)&&
75  !is_vpf_null_float(xmax)&&
76  !is_vpf_null_float(ymax))
77  {
78  if(!firstOneSetFlag)
79  {
81  ymin,
82  xmax,
83  ymax);
84  firstOneSetFlag = true;
85  }
86  else
87  {
89  ymin,
90  xmax,
91  ymax);
92  }
93  }
95  }
96  }
97  }
98  }
99  return result;
100 }
vpf_table_type * theTableInformation
Definition: ossimVpfTable.h:81
void free_row(row_type row, vpf_table_type table)
virtual void closeTable()
int getNumberOfRows() const
float ossim_float32
row_type read_row(ossim_int32 row_number, vpf_table_type table)
virtual bool openTable(const ossimFilename &tableName)
ossim_int32 getColumnPosition(const ossimString &columnName) const
os2<< "> n<< " > nendobj n
int is_vpf_null_float(float num)
virtual void reset() const
void * get_table_element(ossim_int32 field_number, row_type row, vpf_table_type table, void *value, ossim_int32 *count)
row_type read_next_row(vpf_table_type table)
int ossim_int32

Member Data Documentation

◆ theExtent

ossimVpfExtent ossimVpfBoundingRecordTable::theExtent
protected

Definition at line 15 of file ossimVpfBoundingRecordTable.h.

Referenced by getExtent(), and openTable().


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