OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimTiling.h
Go to the documentation of this file.
1 //*******************************************************************
2 // Copyright (C) 2004 Garrett Potts
3 //
4 // License: MIT
5 //
6 // See LICENSE.txt file in the top level directory for more details.
7 //
8 // Author: Garrett Potts
9 //
10 // Description: implementation for image generator
11 //
12 //*************************************************************************
13 // $Id: ossimTiling.h 20103 2011-09-17 16:10:42Z dburken $
14 #ifndef ossimTiling_HEADER
15 #define ossimTiling_HEADER
16 #include <ossim/base/ossimObject.h>
17 #include <ossim/base/ossimDpt.h>
18 #include <ossim/base/ossimDrect.h>
19 #include <ossim/base/ossimIrect.h>
22 #include <ossim/base/ossimRefPtr.h>
23 
25 {
26 public:
27 
29  {
31  ossimTilingDeltaType_PER_PIXEL
32  };
33 
34  ossimTiling();
35 
36  bool initialize(const ossimMapProjection& proj,
37  const ossimIrect& boundingRect);
38 
39  bool next(ossimRefPtr<ossimMapProjection>& resultProjection,
40  ossimIrect& resultingBounds,
41  ossimString& resultingName)const;
42 
43  void reset();
44 
54  void setTilingDistance(const ossimDpt& tilingDistance,
55  ossimUnitType unitType);
56 
73  void setDelta(const ossimDpt& delta,
74  ossimTilingDeltaType deltaType);
75 
92  void setTileNameMask(const ossimString& mask);
93  ossimString getTileNameMask()const;
94 
95  bool getRowCol(ossim_int64& row,
96  ossim_int64& col,
97  ossim_int64 tileId)const;
98  bool getOrigin(ossimDpt& origin,
99  ossim_int64 tileId)const;
100  bool getOrigin(ossimDpt& origin,
101  ossim_int64 row,
102  ossim_int64 col)const;
103 
104  void setPaddingSizeInPixels(const ossimIpt& pizelOverlap);
105  ossimDpt getDeltaPerPixel()const;
106 
107  virtual bool saveState(ossimKeywordlist& kwl,
108  const char* prefix=0)const;
109  virtual bool loadState(const ossimKeywordlist& kwl,
110  const char* prefix=0);
111 
112  virtual std::ostream& print(std::ostream& out) const;
113 
114 protected:
115 
119  void getConvertedTilingDistance(ossimDpt& pt) const;
120 
123 
126 
135 
138 
150 
159 
171 
181 
187 
188  bool validate()const;
189  bool isAngularUnit(ossimUnitType unitType)const;
190  bool isLinearUnit(ossimUnitType unitType)const;
191  void getTileName(ossimString& resultingName,
192  ossim_int64 row,
193  ossim_int64 col,
194  ossim_int64 id)const;
195  void clampGeographic(ossimDrect& rect)const;
196 
197 TYPE_DATA
198 };
199 
200 #endif
ossimTilingDeltaType theDeltaType
Definition: ossimTiling.h:137
ossimUnitType theTilingDistanceUnitType
The unit type for "theDelta", and "theTilingDistance".
Definition: ossimTiling.h:125
ossimUnitType
Represents serializable keyword/value map.
ossim_int64 theTileId
Definition: ossimTiling.h:176
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Definition: ossimObject.cpp:95
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
ossimRefPtr< ossimMapProjection > theMapProjection
Definition: ossimTiling.h:173
ossim_int64 theTotalVerticalTiles
Definition: ossimTiling.h:178
ossimIrect theImageRect
Definition: ossimTiling.h:174
ossimDpt theDelta
If (theDeltaType == ossimTilingDeltaType_TOTAL_PIXELS) then this is the size of the tile in pixels li...
Definition: ossimTiling.h:134
virtual std::ostream & print(std::ostream &out) const
Generic print method.
#define TYPE_DATA
Definition: ossimRtti.h:339
unsigned int ossim_uint32
ossim_int64 theTotalTiles
Definition: ossimTiling.h:179
ossim_uint32 theNumberOfBytesPerPixelPerBand
Output number of bytes per pixel.
Definition: ossimTiling.h:170
ossim_int64 theOutputSizeInBytes
If set tiling size is controlled by the desired output size in bytes.
Definition: ossimTiling.h:149
ossim_int64 theTotalHorizontalTiles
Definition: ossimTiling.h:177
ossimDrect theTilingRect
Definition: ossimTiling.h:175
ossim_uint32 theNumberOfBands
Output number of bands.
Definition: ossimTiling.h:158
ossimString theTileNameMask
Definition: ossimTiling.h:180
ossimDpt theTilingDistance
The size of a tile in theTilingDistanceUnitType.
Definition: ossimTiling.h:122
#define OSSIM_DLL
ossimDpt thePaddingSizeInPixels
Definition: ossimTiling.h:172
long long ossim_int64
bool theEdgeToEdgeFlag
This flags the code to shift the tie point so that the edge of the pixel falls on the tile boundary...
Definition: ossimTiling.h:186
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23