/usr/include/ossim/imaging/ossimVpfAnnotationFeatureInfo.h is in libossim-dev 2.2.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | //*******************************************************************
//
// License: MIT
//
// See LICENSE.txt file in the top level directory for more details.
//
// Author: Garrett Potts
//
//*************************************************************************
// $Id: ossimVpfAnnotationFeatureInfo.h 19636 2011-05-24 16:48:45Z gpotts $
#ifndef ossimVpfAnnotationFeatureInfo_HEADER
#define ossimVpfAnnotationFeatureInfo_HEADER
#include <ossim/base/ossimRefPtr.h>
#include <ossim/base/ossimRgbVector.h>
#include <ossim/base/ossimString.h>
#include <ossim/base/ossimGeoPolygon.h>
#include <ossim/imaging/ossimGeoAnnotationObject.h>
#include <ossim/vec/ossimVpfCoverage.h>
#include <ossim/base/ossimFontInformation.h>
class ossimGeoAnnotationObject;
class ossimVpfCoverage;
class ossimVpfFeatureClassSchema;
class ossimPolyLine;
class OSSIMDLLEXPORT ossimVpfAnnotationFeatureInfo : public ossimObject
{
public:
enum ossimVpfAnnotationFeatureType
{
ossimVpfAnnotationFeatureType_UNKNOWN = 0,
ossimVpfAnnotationFeatureType_POINT = 1,
ossimVpfAnnotationFeatureType_LINE = 2,
ossimVpfAnnotationFeatureType_POLYGON = 3,
ossimVpfAnnotationFeatureType_TEXT = 4,
};
ossimVpfAnnotationFeatureInfo(const ossimString& featureName = "",
const ossimRgbVector& penColor = ossimRgbVector(255,255,255),
const ossimRgbVector& brushColor = ossimRgbVector(255,255,255),
const ossimDpt& pointRadius=ossimDpt(1,1),
int thickness=0,
bool enabledFlag = true);
~ossimVpfAnnotationFeatureInfo();
void setCoverage(const ossimVpfCoverage& coverage)
{
theCoverage = coverage;
}
const ossimVpfCoverage& getCoverage()const
{
return theCoverage;
}
ossimVpfCoverage& getCoverage()
{
return theCoverage;
}
void setColor(const ossimRgbVector& color)
{
setPenColor(color);
setBrushColor(color);
}
void setPenColor(const ossimRgbVector& penColor)
{
thePenColor = penColor;
}
ossimRgbVector getPenColor()const
{
return thePenColor;
}
void setBrushColor(const ossimRgbVector& brushColor)
{
theBrushColor = brushColor;
}
ossimRgbVector getBrushColor()const
{
return theBrushColor;
}
void setFillEnabledFlag(bool flag)
{
theFillEnabledFlag = flag;
}
bool getFillEnabledFlag()const
{
return theFillEnabledFlag;
}
void setEnabledFlag(bool flag);
bool getEnabledFlag()const
{
return theEnabledFlag;
}
void setThickness(int thickness)
{
theThickness = thickness;
}
int getThickness()const
{
return theThickness;
}
void setName(const ossimString& name)
{
theName = name;
}
const ossimString& getName()const
{
return theName;
}
bool isPoint()const
{
return (theFeatureType == ossimVpfAnnotationFeatureType_POINT);
}
bool isLine()const
{
return (theFeatureType == ossimVpfAnnotationFeatureType_LINE);
}
bool isPolygon()const
{
return (theFeatureType == ossimVpfAnnotationFeatureType_POLYGON);
}
bool isText()const
{
return (theFeatureType == ossimVpfAnnotationFeatureType_TEXT);
}
void getFontInformation(ossimFontInformation& fontInfo)const
{
fontInfo = theFontInformation;
}
void setFontInformation(const ossimFontInformation& fontInfo)
{
theFontInformation = fontInfo;
}
void setPointRadius(const ossimDpt& radius)
{
thePointRadius = radius;
}
ossimDpt getPointRadius()const
{
return thePointRadius;
}
void setDrawingFeaturesToAnnotation();
ossimIrect getBoundingProjectedRect()const;
void transform(ossimImageGeometry* proj);
void buildFeature();
void deleteAllObjects();
void drawAnnotations(ossimRgbImage* tile);
bool saveState(ossimKeywordlist& kwl,
const char* prefix=0)const;
bool loadState(const ossimKeywordlist& kwl,
const char* prefix=0);
ossimString getFeatureTypeAsString()const;
ossimVpfAnnotationFeatureType getFeatureTypeFromString(const ossimString& featureType)const;
private:
void readAttributes(ossimPolyLine& polyLine, ossimVpfTable& table, int row);
void readAttributes(ossimGeoPolygon& polygon, ossimVpfTable& table, int row);
protected:
ossimString theName;
ossimString theDescription;
ossimRgbVector thePenColor;
ossimRgbVector theBrushColor;
ossimVpfCoverage theCoverage;
ossimDpt thePointRadius;
int theThickness;
bool theFillEnabledFlag;
bool theEnabledFlag;
ossimVpfAnnotationFeatureType theFeatureType;
ossimFontInformation theFontInformation;
std::vector<ossimRefPtr<ossimGeoAnnotationObject> > theAnnotationArray;
void buildTxtFeature(const ossimFilename& table,
const ossimString& tableKey,
const ossimFilename& primitive,
const ossimString& primitiveKey);
void buildEdgFeature(const ossimFilename& table,
const ossimString& tableKey,
const ossimFilename& primitive,
const ossimString& primitiveKey);
void buildPointFeature(const ossimString& primitiveName,
const ossimFilename& table,
const ossimString& tableKey,
const ossimFilename& primitive,
const ossimString& primitiveKey);
void buildFaceFeature(const ossimFilename& table,
const ossimString& tableKey,
const ossimFilename& primitive,
const ossimString& primitiveKey);
void readEdge(ossimPolyLine& polyLine,
int rowNumber,
int colPosition,
ossimVpfTable& edgeTable);
int readTableCellAsInt (int rowNumber, // should replace calls to readRngId, readStartEdgeId with this
int colNumber,
ossimVpfTable& table);
int readRngId(int rowNumber,
int colNumber,
ossimVpfTable& faceTable);
int readStartEdgeId(int rowNumber,
int colNumber,
ossimVpfTable& rngTable);
void readGeoPolygon(ossimGeoPolygon& polygon,
int faceId,
int startEdgeId,
ossimVpfTable& edgTable);
ossimDpt* getXy(vpf_table_type table, row_type row, ossim_int32 pos, ossim_int32* count);
int getEdgeKeyId (vpf_table_type& table, row_type& row, int col);
TYPE_DATA
};
#endif
|