OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimOgrGdalTileSource.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts
6 //
7 // Description:
8 //
9 // Contains class implementaiton for the class "ossimOgrGdalTileSource".
10 //
11 //*******************************************************************
12 // $Id: ossimOgrGdalTileSource.cpp 20133 2011-10-12 19:03:47Z oscarkramer $
13 
14 #include <ossimOgrGdalTileSource.h>
15 
17  "ossimOgrGdalTileSource",
21 
22 //*******************************************************************
23 // Public Constructor:
24 //*******************************************************************
26  :
30 {
31  theObject = this;
34 }
35 
36 //*******************************************************************
37 // Destructor:
38 //*******************************************************************
40 {
42  close();
43 
44 }
45 
46 //*******************************************************************
47 // Public Method:
48 //*******************************************************************
50 {
52 }
53 
54 //*******************************************************************
55 // Public method:
56 //*******************************************************************
58  const char* prefix) const
59 {
61  {
62  theAnnotationSource->saveState(kwl, prefix);
63  }
64  return ossimImageHandler::saveState(kwl, prefix);
65 }
66 
67 //*******************************************************************
68 // Public method:
69 //*******************************************************************
71  const char* prefix)
72 {
73  if (ossimImageHandler::loadState(kwl, prefix))
74  {
76  if (open())
77  {
79  {
80  theAnnotationSource->loadState(kwl, prefix);
81  }
82  return true;
83  }
84  }
85 
86  return false;
87 }
88 
90 {
91  return 0;
92 }
93 
95 {
96  return 0;
97 }
98 
100 {
102 
103  return theGeometry;
104 }
105 
107 {
109 }
110 
112  const ossimIrect& tileRect, ossim_uint32 resLevel)
113 {
114  return theAnnotationSource->getTile(tileRect, resLevel);
115 }
116 
118 {
120 }
121 
123 {
125 }
126 
128 {
130 
131  if(theBounds.hasNans())
132  {
133  return theBounds.ul().x;
134  }
135 
136  return theBounds.height();
137 }
138 
140 {
142 
143  if(theBounds.hasNans())
144  {
145  return theBounds.ul().x;
146  }
147 
148  return theBounds.height();
149 }
150 
152 {
153  return 32;
154 }
155 
157 {
159 }
160 
162 {
164 }
165 
167 {
169 }
170 
172 {
174 }
175 
177 {
178  return theAnnotationSource->isOpen();
179 }
180 
182 {
184 }
185 
187 {
189 }
190 
192 {
194 }
195 
197 {
198  return theAnnotationSource->getView();
199 }
200 
202 {
203  return theAnnotationSource->getView();
204 }
205 
207 {
208  return theAnnotationSource->setView(baseObject);
209 }
210 
212 {
214  {
215  theAnnotationSource->setProperty(property);
216  }
217 }
218 
220 {
222  {
223  return theAnnotationSource->getProperty(name);
224  }
225 
226  return 0;
227 }
228 
229 void ossimOgrGdalTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
230 {
232  {
233  theAnnotationSource->getPropertyNames(propertyNames);
234  }
235 }
236 
237 std::multimap<long, ossimAnnotationObject*> ossimOgrGdalTileSource::getFeatureTable()
238 {
240  {
242  }
243  return std::multimap<long, ossimAnnotationObject*>();
244 }
245 
247 {
249  {
251  }
252 }
253 
255 {
257  {
259  }
260 }
261 
263 {
265  {
266  return theAnnotationSource->setCurrentEntry(entryIdx);
267  }
268  return false;
269 }
void setQuery(const ossimString &query)
ossimObject * theObject
ossimRefPtr< ossimImageGeometry > theGeometry
ossimRefPtr< ossimGdalOgrVectorAnnotation > theAnnotationSource
virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level=0) const
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
ossimFilename theImageFile
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
virtual void close()
Deletes the overview and clears the valid image vertices.
ossimUnitType
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry() const
Returns the image geometry object associated with this tile source or NULL if non defined...
Represents serializable keyword/value map.
bool valid() const
Definition: ossimRefPtr.h:75
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual std::multimap< long, ossimAnnotationObject * > getFeatureTable()
Pure virtual getFeatureTable method.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tileRect, ossim_uint32 resLevel=0)
ossim_uint32 height() const
Definition: ossimIrect.h:487
virtual ossim_uint32 getTileHeight() const
Returns the default processing tile height.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
const ossimIpt & ul() const
Definition: ossimIrect.h:274
virtual ossimObject * getView()
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual void setQuery(const ossimString &query)
Pure virtual setQuery method.
RTTI_DEF3(ossimOgrGdalTileSource, "ossimOgrGdalTileSource", ossimImageHandler, ossimViewInterface, ossimEsriShapeFileInterface)
virtual ossim_uint32 getTileWidth() const
Returns the default processing tile width.
ossimPixelType thePixelType
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
virtual void setProperty(ossimRefPtr< ossimProperty > property)
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.
double ossim_float64
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level=0) const
virtual bool setView(ossimObject *baseObject)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual ossim_uint32 getImageTileHeight() const
unsigned int ossim_uint32
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual bool setView(ossimObject *baseObject)
Sets the output view.
virtual bool isOpen() const
Derived classes must implement this method to be concrete.
virtual ossim_uint32 getTileWidth() const
void setGeometryBuffer(ossim_float64 distance, ossimUnitType type)
virtual ossim_uint32 getNumberOfDecimationLevels() const
ossimScalarType
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
virtual ossimScalarType getOutputScalarType() const
virtual ossimRefPtr< ossimImageGeometry > getInternalImageGeometry() const
Returns the image geometry object associated with this tile source or NULL if non defined...
This class defines an abstract Handler which all image handlers(loaders) should derive from...
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual ossim_uint32 getTileHeight() const
virtual double getMinPixelValue(ossim_uint32 band=0) const
Retuns the min pixel value.
virtual bool setCurrentEntry(ossim_uint32 entryIdx)
virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level=0) const
virtual void setGeometryBuffer(ossim_float64 distance, ossimUnitType type)
Pure virtual setGeometryBuffer method.
virtual ossim_uint32 getNumberOfInputBands() const
std::multimap< long, ossimAnnotationObject * > getFeatureTable()
bool hasNans() const
Definition: ossimIrect.h:337
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
ossim_int32 x
Definition: ossimIpt.h:141
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual void setProperty(ossimRefPtr< ossimProperty > property)
virtual ossim_uint32 getNumberOfOutputBands() const
float distance(double lat1, double lon1, double lat2, double lon2, int units)
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tileRect, ossim_uint32 resLevel=0)
bool setCurrentEntry(ossim_uint32 entryIdx)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual ossim_uint32 getImageTileWidth() const
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const