Isis Developer Reference
ImageOverlap.h
Go to the documentation of this file.
1#ifndef ImageOverlap_h
2#define ImageOverlap_h
8/* SPDX-License-Identifier: CC0-1.0 */
9
10#include <vector>
11
12#include <QString>
13
14#include <geos/geom/MultiPolygon.h>
15
16namespace Isis {
17
41 public:
43 ImageOverlap(QString serialNumber, geos::geom::MultiPolygon &polygon);
44 ImageOverlap(std::istream &inputStream);
45
46 virtual ~ImageOverlap();
47
48 // Set a new polygon
49 virtual void SetPolygon(const geos::geom::MultiPolygon &polygon);
50 virtual void SetPolygon(const geos::geom::MultiPolygon *polygon);
51
52 // Add a serial number
53 void Add(QString &sn);
54
55 // Return the number of serial numbers in this overlap area
56 int Size() const {
57 return p_serialNumbers.size();
58 };
59
60 // Return the ith serial number
61 QString operator[](int index) const {
62 return p_serialNumbers[index];
63 };
64
65 // Return the polygon
66 const geos::geom::MultiPolygon *Polygon() const {
67 return p_polygon;
68 };
69
70 // Return the area of the polygon
71 virtual double Area();
72
73 // Compare the serial numbers with another ImageOverlap
74 bool HasAnySameSerialNumber(ImageOverlap &other) const;
75
76 // Does serial number exist in this ImageOverlap
77 bool HasSerialNumber(QString &sn) const;
78
79 void Write(std::ostream &outputStream);
80 private:
81
82 std::vector<QString> p_serialNumbers;
83 geos::geom::MultiPolygon *p_polygon;
84
85 void Init();
86
87 };
88};
89
90#endif
Individual overlap container.
Definition ImageOverlap.h:40
const geos::geom::MultiPolygon * Polygon() const
Definition ImageOverlap.h:66
virtual void SetPolygon(const geos::geom::MultiPolygon &polygon)
This method will replace the existing polygon that defines the overlap with a new one.
Definition ImageOverlap.cpp:100
virtual double Area()
This method will return the area of the polygon.
Definition ImageOverlap.cpp:176
int Size() const
Definition ImageOverlap.h:56
void Add(QString &sn)
This method will add a new serial number to the list of serial numbers alread associated with the ove...
Definition ImageOverlap.cpp:156
QString operator[](int index) const
Definition ImageOverlap.h:61
ImageOverlap()
Construct an empty ImageOverlap object.
Definition ImageOverlap.cpp:25
bool HasAnySameSerialNumber(ImageOverlap &other) const
This method will return true if any serial number from this ImageOverlap is also in the other ImageOv...
Definition ImageOverlap.cpp:185
bool HasSerialNumber(QString &sn) const
This method will return true if input serial number exists in the ImageOverlap.
Definition ImageOverlap.cpp:206
virtual ~ImageOverlap()
Destroy this ImageOverlap object.
Definition ImageOverlap.cpp:78
void Write(std::ostream &outputStream)
Definition ImageOverlap.cpp:127
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16