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

#include <ossimVpfFeatureClass.h>

Public Member Functions

 ossimVpfFeatureClass ()
 
bool openFeatureClass (const ossimString &featureClassName, const ossimFilename &featureClassFullPath, const ossimFilename &table1, const ossimString &columnNameIdTable1, const ossimFilename &table2, const ossimString &columnNameIdTable2)
 
const ossimStringgetName () const
 
ossimFilename getTable1 () const
 
ossimFilename getTable2 () const
 

Static Public Member Functions

static bool isPrimitive (const ossimString &featureName)
 
static bool isSimpleFeature (const ossimString &featureName)
 
static bool isComplexFeature (const ossimString &featureName)
 
static bool isFeature (const ossimString &featureName)
 
static bool isJoin (const ossimString &featureName)
 

Private Attributes

ossimFilename theFeatureClassFullPath
 
ossimString theFeatureClassName
 
ossimFilename theTableName1
 
ossimString theColumnNameId1
 
ossimFilename theTableName2
 
ossimString theColumnNameId2
 

Detailed Description

Definition at line 9 of file ossimVpfFeatureClass.h.

Constructor & Destructor Documentation

◆ ossimVpfFeatureClass()

ossimVpfFeatureClass::ossimVpfFeatureClass ( )

Definition at line 16 of file ossimVpfFeatureClass.cpp.

17 {
18 }

Member Function Documentation

◆ getName()

const ossimString & ossimVpfFeatureClass::getName ( ) const

Definition at line 51 of file ossimVpfFeatureClass.cpp.

52 {
53  return theFeatureClassName;
54 
55 }

◆ getTable1()

ossimFilename ossimVpfFeatureClass::getTable1 ( ) const

Definition at line 143 of file ossimVpfFeatureClass.cpp.

References ossimFilename::dirCat().

144 {
146 }
ossimFilename theFeatureClassFullPath
ossimFilename dirCat(const ossimFilename &file) const

◆ getTable2()

ossimFilename ossimVpfFeatureClass::getTable2 ( ) const

Definition at line 148 of file ossimVpfFeatureClass.cpp.

References ossimFilename::dirCat().

149 {
151 }
ossimFilename theFeatureClassFullPath
ossimFilename dirCat(const ossimFilename &file) const

◆ isComplexFeature()

bool ossimVpfFeatureClass::isComplexFeature ( const ossimString featureName)
static

This just specifies if the input is a comples feature.

.cft Complex feature table.

Definition at line 107 of file ossimVpfFeatureClass.cpp.

References ossimString::downcase(), and ossimString::trim().

108 {
109  const char* suffix = strrchr(featureName.trim(), '.');
110 
111  if (!suffix)
112  {
113  return false;
114  }
115 
116  ossimString value = ossimString(suffix).downcase();
117 
118  return (value == ".cft");
119 }
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48

◆ isFeature()

bool ossimVpfFeatureClass::isFeature ( const ossimString featureName)
static

Will use the isComplexFeature and isSimpleFeature to determine if the input is a feature

Definition at line 121 of file ossimVpfFeatureClass.cpp.

122 {
123  return (isSimpleFeature(featureName) || isComplexFeature(featureName));
124 }
static bool isComplexFeature(const ossimString &featureName)
static bool isSimpleFeature(const ossimString &featureName)

◆ isJoin()

bool ossimVpfFeatureClass::isJoin ( const ossimString featureName)
static

Will specifiy if it is a join table.

Some of the join table type are:

.cjt Complex join table .pjt Point join table .ljt Line join table .ajt area join table .tjt text join table

Definition at line 126 of file ossimVpfFeatureClass.cpp.

References ossimString::c_str(), and ossimString::downcase().

127 {
128  ossimString value = strrchr(featureName.c_str(), '.');
129  if(value == "")
130  {
131  return false;
132  }
133 
134  value = value.downcase();
135 
136  return ( (value == ".cjt")||
137  (value == ".pjt")||
138  (value == ".ljt")||
139  (value == ".ajt")||
140  (value == ".tjt"));
141 }
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
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

◆ isPrimitive()

bool ossimVpfFeatureClass::isPrimitive ( const ossimString featureName)
static

This will specify if this feature is a primitive. the names of certain primitives are:

end Entity node primitive cnd Connected node primitive edg Edge Primitive fac Face Primitive txt Text primitive

Definition at line 57 of file ossimVpfFeatureClass.cpp.

References ossimString::downcase(), and ossimString::trim().

Referenced by ossimVpfFeatureClassSchema::setFeatureClassMapping().

58 {
59  // make sure we have forward slashes
60  ossimFilename filename(featureName.trim());
61  // filename.convertBackToForwardSlashes();
62 
63  ossimString copyOfFeature = filename;
64 
65  // find
66  const char* temp = strrchr(copyOfFeature.c_str(), '/');
67 
68  ossimString value;
69  if(temp)
70  {
71  ++temp;
72  value = temp;
73  }
74  else
75  {
76 
77  value = copyOfFeature;
78  }
79 
80  value = value.downcase();
81  return( (value == "end") ||
82  (value == "cnd") ||
83  (value == "edg") ||
84  (value == "fac") ||
85  (value == "txt") );
86 }
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48

◆ isSimpleFeature()

bool ossimVpfFeatureClass::isSimpleFeature ( const ossimString featureName)
static

This just specifies if the input is a simple feature.

Some of the simple features are:

.pft Point feature table .lft Line feature table .aft area feature table .tft text feature table

Definition at line 88 of file ossimVpfFeatureClass.cpp.

References ossimString::c_str(), ossimString::downcase(), and ossimString::trim().

89 {
90  // find the suffix
91  ossimString value = strrchr(featureName.trim().c_str(), '.');
92 
93  // the suffix will be null or empty string if not found.
94  if(value == "")
95  {
96  return false;
97  }
98  // make case insensitive
99  value = value.downcase();
100 
101  return ( (value == ".pft")||
102  (value == ".lft")||
103  (value == ".aft")||
104  (value == ".tft"));
105 }
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
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

◆ openFeatureClass()

bool ossimVpfFeatureClass::openFeatureClass ( const ossimString featureClassName,
const ossimFilename featureClassFullPath,
const ossimFilename table1,
const ossimString columnNameIdTable1,
const ossimFilename table2,
const ossimString columnNameIdTable2 
)

Will initialize the feature class for this coverage and do some validation.

Definition at line 21 of file ossimVpfFeatureClass.cpp.

References ossimVpfTable::openTable().

27 {
28  theFeatureClassFullPath = featureClassFullPath;
29  theFeatureClassName = featureClassName;
30  theTableName1 = table1;
31  theColumnNameId1 = columnNameIdTable1;
32  theTableName2 = table2;
33  theColumnNameId2 = columnNameIdTable2;
34 
35  ossimVpfTable t1;
36  ossimVpfTable t2;
37 
38  ossimFilename t1Name = getTable1();
39  ossimFilename t2Name = getTable2();
40 
41  if((!t1.openTable(t1Name))||
42  (!t2.openTable(t2Name)))
43  {
44 
45  return false;
46  }
47 
48  return true;
49 }
virtual bool openTable(const ossimFilename &tableName)
ossimFilename theFeatureClassFullPath
ossimFilename getTable2() const
ossimFilename getTable1() const

Member Data Documentation

◆ theColumnNameId1

ossimString ossimVpfFeatureClass::theColumnNameId1
private

Definition at line 86 of file ossimVpfFeatureClass.h.

◆ theColumnNameId2

ossimString ossimVpfFeatureClass::theColumnNameId2
private

Definition at line 88 of file ossimVpfFeatureClass.h.

◆ theFeatureClassFullPath

ossimFilename ossimVpfFeatureClass::theFeatureClassFullPath
private

Definition at line 83 of file ossimVpfFeatureClass.h.

◆ theFeatureClassName

ossimString ossimVpfFeatureClass::theFeatureClassName
private

Definition at line 84 of file ossimVpfFeatureClass.h.

◆ theTableName1

ossimFilename ossimVpfFeatureClass::theTableName1
private

Definition at line 85 of file ossimVpfFeatureClass.h.

◆ theTableName2

ossimFilename ossimVpfFeatureClass::theTableName2
private

Definition at line 87 of file ossimVpfFeatureClass.h.


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