Isis 3.0 Programmer Reference
Back | Home
ImageOverlap.h
Go to the documentation of this file.
1 #ifndef ImageOverlap_h
2 #define ImageOverlap_h
3 
26 #include <vector>
27 
28 #include <QString>
29 
30 #include <geos/geom/MultiPolygon.h>
31 
32 namespace Isis {
33 
56  class ImageOverlap {
57  public:
58  ImageOverlap();
59  ImageOverlap(QString serialNumber, geos::geom::MultiPolygon &polygon);
60  ImageOverlap(std::istream &inputStream);
61 
62  virtual ~ImageOverlap();
63 
64  // Set a new polygon
65  virtual void SetPolygon(const geos::geom::MultiPolygon &polygon);
66  virtual void SetPolygon(const geos::geom::MultiPolygon *polygon);
67 
68  // Add a serial number
69  void Add(QString &sn);
70 
71  // Return the number of serial numbers in this overlap area
72  int Size() const {
73  return p_serialNumbers.size();
74  };
75 
76  // Return the ith serial number
77  QString operator[](int index) const {
78  return p_serialNumbers[index];
79  };
80 
81  // Return the polygon
82  const geos::geom::MultiPolygon *Polygon() const {
83  return p_polygon;
84  };
85 
86  // Return the area of the polygon
87  virtual double Area();
88 
89  // Compare the serial numbers with another ImageOverlap
90  bool HasAnySameSerialNumber(ImageOverlap &other) const;
91 
92  // Does serial number exist in this ImageOverlap
93  bool HasSerialNumber(QString &sn) const;
94 
95  void Write(std::ostream &outputStream);
96  private:
97 
98  std::vector<QString> p_serialNumbers;
99  geos::geom::MultiPolygon *p_polygon;
100 
101  void Init();
102 
103  };
104 };
105 
106 #endif
virtual ~ImageOverlap()
Destroy this ImageOverlap object.
void Add(QString &sn)
This method will add a new serial number to the list of serial numbers alread associated with the ove...
virtual void SetPolygon(const geos::geom::MultiPolygon &polygon)
This method will replace the existing polygon that defines the overlap with a new one...
void Init()
Initialize this object to a known state.
bool HasAnySameSerialNumber(ImageOverlap &other) const
This method will return true if any serial number from this ImageOverlap is also in the other ImageOv...
virtual double Area()
This method will return the area of the polygon.
ImageOverlap()
Construct an empty ImageOverlap object.
Individual overlap container.
Definition: ImageOverlap.h:56
bool HasSerialNumber(QString &sn) const
This method will return true if input serial number exists in the ImageOverlap.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:20:13