TsEnvelop.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 // Unit-Test TerraLib
21 #include "TsEnvelop.h"
22 
23 // TerraLib
24 //#include <terralib/common.h>
25 //#include <terralib/geometry.h>
26 
27 // STL
28 //#include <cstdio>
29 //#include <cstdlib>
30 //#include <cstring>
31 
33 
35 {
36  boxA = new te::gm::Envelope(-43.9329795837402, -20.6328010559082, -43.4036407470703, -20.1612071990967);
37  boxAEqual = new te::gm::Envelope(-43.9329795837402, -20.6328010559082, -43.4036407470703, -20.1612071990967);
38 
39  boxB= new te::gm::Envelope(-43.7329795837402, -20.3328010559082, 10.4036407470703, 10.1612071990967);
40  boxC= new te::gm::Envelope(-43.4036407470703, -20.6328010559082, 0, -20.1612071990967);
41  boxD= new te::gm::Envelope(-43.8329795837402, -20.4328010559082, -43.6036407470703, -20.2612071990967);
42  boxE= new te::gm::Envelope(43.9329795837402, -20.6328010559082, 43.4036407470703, -20.1612071990967);
43  boxF= new te::gm::Envelope(-43.7329795837402, -25.6328010559082, 10.4036407470703, -20.3328010559082); //touch B by a horiz line
44  boxG= new te::gm::Envelope(-43.4036407470703, -20.1612071990967, 25.4036407470703, 10.1612071990967 ); //touch A by a point)
45  boxH= new te::gm::Envelope(-43.7329795837402, 10.1612071990967, 0, 25.1612071990967 ); //touch G by a segment of line)
46 
47  boxAeB= new te::gm::Envelope(-43.7329795837402, -20.3328010559082 , -43.4036407470703, -20.1612071990967);
48  boxAeF= new te::gm::Envelope(-43.7329795837402, -20.6328010559082 , -43.4036407470703, -20.3328010559082);
49 
50  boxAexpandedB= new te::gm::Envelope(-43.9329795837402, -20.6328010559082,10.4036407470703, 10.1612071990967);
51  boxGexpandedA= new te::gm::Envelope(-43.9329795837402, -20.6328010559082,25.4036407470703, 10.1612071990967);
52 
53 }
54 
56 {
57  delete boxA;
58  delete boxAEqual;
59 
60  delete boxB;
61  delete boxC;
62  delete boxD;
63  delete boxE;
64  delete boxF;
65  delete boxG;
66  delete boxH;
67 
68  delete boxAeB;
69  delete boxAeF;
70  delete boxAexpandedB;
71 }
72 
74 {
75 //#ifdef TE_COMPILE_ALL
77 
78  CPPUNIT_ASSERT(box->m_llx == std::numeric_limits<double>::max() );
79  CPPUNIT_ASSERT(box->m_lly == std::numeric_limits<double>::max() );
80  CPPUNIT_ASSERT(box->m_urx == -(std::numeric_limits<double>::max() ) );
81  CPPUNIT_ASSERT(box->m_ury == -(std::numeric_limits<double>::max() ) );
82  delete box;
83 
84 //#endif
85 }
86 
88 {
89 //#ifdef TE_COMPILE_ALL
90  te::gm::Envelope* box = new te::gm::Envelope(1.1,1.1,2.2,2.2);
91  CPPUNIT_ASSERT(box->m_llx == 1.1);
92  CPPUNIT_ASSERT(box->m_lly == 1.1);
93  CPPUNIT_ASSERT(box->m_urx == 2.2);
94  CPPUNIT_ASSERT(box->m_ury == 2.2);
95  delete box;
96 
97 //#endif
98 }
99 
101 {
102 //#ifdef TE_COMPILE_ALL
103  te::gm::Envelope box_rhs(1.1,1.1,2.2,2.2);
104  te::gm::Envelope box(box_rhs);
105 
106  CPPUNIT_ASSERT(box.m_llx == 1.1);
107  CPPUNIT_ASSERT(box.m_lly == 1.1);
108  CPPUNIT_ASSERT(box.m_urx == 2.2);
109  CPPUNIT_ASSERT(box.m_ury == 2.2);
110 
111 //#endif
112 }
113 
115 {
116 //#ifdef TE_COMPILE_ALL
117  te::gm::Envelope box;
118  box.init(1.1,1.1,2.2,2.2);
119 
120  CPPUNIT_ASSERT(box.m_llx == 1.1);
121  CPPUNIT_ASSERT(box.m_lly == 1.1);
122  CPPUNIT_ASSERT(box.m_urx == 2.2);
123  CPPUNIT_ASSERT(box.m_ury == 2.2);
124 
125 //#endif
126 }
127 
129 {
130  CPPUNIT_ASSERT(boxA->equals(*boxAEqual) == true);
131 }
132 
134 {
135 //#ifdef TE_COMPILE_ALL
136  te::gm::Envelope box;
137  box.init(1.1,1.2,2.1,2.2);
138  const double llx = box.getLowerLeftX();
139  CPPUNIT_ASSERT(llx == 1.1);
140 
141  //Testing big number.decimal
142  const double llxB = boxB->getLowerLeftX();
143  CPPUNIT_ASSERT(llxB == -43.7329795837402);
144 
145 //#endif
146 }
147 
149 {
150 //#ifdef TE_COMPILE_ALL
151  te::gm::Envelope box;
152  box.init(1.1,1.2,2.1,2.2);
153  const double lly = box.getLowerLeftY();
154  CPPUNIT_ASSERT(lly == 1.2);
155 
156  //Testing big number.decimal
157  const double llyB = boxB->getLowerLeftY();
158  CPPUNIT_ASSERT(llyB == -20.3328010559082);
159 
160 //#endif
161 }
162 
164 {
165 //#ifdef TE_COMPILE_ALL
166  te::gm::Envelope box;
167  box.init(1.1,1.2,2.1,2.2);
168  const double urx = box.getUpperRightX();
169  CPPUNIT_ASSERT(urx == 2.1);
170 
171  //Testing big number.decimal
172  const double urxB = boxB->getUpperRightX();
173  CPPUNIT_ASSERT(urxB == 10.4036407470703);
174 
175 //#endif
176 }
177 
179 {
180 //#ifdef TE_COMPILE_ALL
181  te::gm::Envelope box;
182  box.init(1.1,1.2,2.1,2.2);
183  const double ury = box.getUpperRightY();
184  CPPUNIT_ASSERT(ury == 2.2);
185 
186  //Testing big number.decimal
187  const double uryB = boxB->getUpperRightY();
188  CPPUNIT_ASSERT(uryB == 10.1612071990967);
189 
190 //#endif
191 }
192 
194 {
195 //#ifdef TE_COMPILE_ALL
196  te::gm::Envelope box;
197  box.init(1.1,1.2,2.1,2.2);
198  te::gm::Coord2D llCoord2D = box.getLowerLeft();
199  CPPUNIT_ASSERT(llCoord2D.x == 1.1);
200  CPPUNIT_ASSERT(llCoord2D.y == 1.2);
201 
202 //#endif
203 }
204 
206 {
207 //#ifdef TE_COMPILE_ALL
208  te::gm::Envelope box;
209  box.init(1.1,1.2,2.1,2.2);
210  te::gm::Coord2D urCoord2D = box.getUpperRight();
211  CPPUNIT_ASSERT(urCoord2D.x == 2.1);
212  CPPUNIT_ASSERT(urCoord2D.y == 2.2);
213 
214 //#endif
215 }
216 
218 {
219 //#ifdef TE_COMPILE_ALL
220  te::gm::Envelope box;
221  box.init(1.1,1.1,2.2,2.2);
222  CPPUNIT_ASSERT(box.m_llx == 1.1);
223  CPPUNIT_ASSERT(box.m_lly == 1.1);
224  CPPUNIT_ASSERT(box.m_urx == 2.2);
225  CPPUNIT_ASSERT(box.m_ury == 2.2);
226 
227  box.makeInvalid();
228  CPPUNIT_ASSERT(box.m_llx == std::numeric_limits<double>::max() );
229  CPPUNIT_ASSERT(box.m_lly == std::numeric_limits<double>::max() );
230  CPPUNIT_ASSERT(box.m_urx == -(std::numeric_limits<double>::max()) );
231  CPPUNIT_ASSERT(box.m_ury == -(std::numeric_limits<double>::max()) );
232 
233 //#endif
234 }
235 
237 {
238 //#ifdef TE_COMPILE_ALL
239  te::gm::Envelope box;
240  box.init(1.1,1.2,2.1,2.2);
241  bool isValidRect = box.isValid();
242  CPPUNIT_ASSERT(isValidRect == true);
243  box.init(2.1,1.2,2.0,2.2);
244  isValidRect = box.isValid();
245  CPPUNIT_ASSERT(isValidRect == false);
246 
247 //#endif
248 }
249 
251 {
252 //#ifdef TE_COMPILE_ALL
253  te::gm::Envelope box;
254  box.init(1.1,1.1,2.2,2.2);
255  double width = box.getWidth();
256  double right = box.getHeight();
257  double area = box.getArea();
258  CPPUNIT_ASSERT(width == 1.1);
259  CPPUNIT_ASSERT(right == 1.1);
260  //CPPUNIT_ASSERT_area == 1.21);
261  CPPUNIT_ASSERT_DOUBLES_EQUAL(1.21, area, 0.000000001);
262 
263 //#endif
264 }
265 
267 {
268 //#ifdef TE_COMPILE_ALL
269  ////////te::gm::Envelope boxA(1.0,1.0,2.0,2.0);
270  ////////te::gm::Envelope boxAEqual(1.0,1.0,2.0,2.0);
271 
272  ////////te::gm::Envelope boxB(1.5,1.5,2.5,2.5);
273  ////////te::gm::Envelope boxC(2.0,1.0,3.0,2.0);
274  ////////te::gm::Envelope boxD(1.4,1.4,1.8,1.8);
275  ////////te::gm::Envelope boxE(10.22,10.22,11.22,11.22);
276  ////////te::gm::Envelope boxAeB(1.5,1.5,2.0,2.0);
277 
278  ////////te::gm::Envelope boxAexpandedB(1.0,1.0,2.5,2.5);
279 
280 
281  ////////CPPUNIT_ASSERT(boxA.equals( boxAEqual) == true);
282  ////////CPPUNIT_ASSERT(boxA.intersects( boxB) == true);
283  ////////CPPUNIT_ASSERT(boxA.intersects( boxC) == true); // only a vertical line
284  ////////CPPUNIT_ASSERT(boxA.intersects( boxE) == false); // disjoint
285 
286  ////////CPPUNIT_ASSERT(boxA.touches( boxC) == true);
287  ////////CPPUNIT_ASSERT(boxA.contains( boxD) == true);
288  ////////CPPUNIT_ASSERT(boxD.within( boxA) == true);
289  ////////CPPUNIT_ASSERT(boxA.disjoint( boxE) == true);
290  ////////te::gm::Envelope* boxAeB_res = boxA.intersection( boxB);
291  ////////CPPUNIT_ASSERT(boxAeB_res->equals(boxAeB));
292 
293  ////////boxA.expand(boxB);
294  ////////CPPUNIT_ASSERT(boxA.equals(boxAexpandedB) == true);
295 
296 //#endif
297 }
298 
300 {
301  CPPUNIT_ASSERT(boxA->intersects(*boxB) == true);
302  CPPUNIT_ASSERT(boxA->intersects(*boxC) == true); //by a vertical line
303  CPPUNIT_ASSERT(boxC->intersects(*boxA) == true); //by a vertical line
304 
305  CPPUNIT_ASSERT(boxA->intersects(*boxE) == false); // disjoint
306  CPPUNIT_ASSERT(boxA->intersects(*boxF) == true);
307  CPPUNIT_ASSERT(boxA->intersects(*boxG) == true); //by a point (urA)
308  CPPUNIT_ASSERT(boxB->intersects(*boxF) == true); //by a horiz line
309  CPPUNIT_ASSERT(boxF->intersects(*boxB) == true); //by a horiz line
310  CPPUNIT_ASSERT(boxG->intersects(*boxH) == true); //by a segment of horiz line
311 
312 }
313 
315 {
316  CPPUNIT_ASSERT(boxA->disjoint( *boxE) == true);
317  CPPUNIT_ASSERT(boxB->disjoint( *boxE) == true);
318  CPPUNIT_ASSERT(boxC->disjoint( *boxE) == true);
319  CPPUNIT_ASSERT(boxD->disjoint( *boxE) == true);
320  CPPUNIT_ASSERT(boxG->disjoint(*boxH) == false); //by a segment of horiz line
321 
322 }
323 
325 {
326  CPPUNIT_ASSERT(boxA->touches( *boxE) == false);
327  CPPUNIT_ASSERT(boxA->touches( *boxB) == false);
328  CPPUNIT_ASSERT(boxA->touches( *boxC) == true); //by a vertical line
329  CPPUNIT_ASSERT(boxA->touches( *boxG) == true); //by point corner urA
330 
331  CPPUNIT_ASSERT(boxB->touches( *boxF) == true); //by a vert line
332  CPPUNIT_ASSERT(boxF->touches( *boxB) == true); //by a vert line
333 
334  CPPUNIT_ASSERT(boxB->touches(*boxF) == true); //by a horiz line
335  CPPUNIT_ASSERT(boxF->touches(*boxB) == true); //by a horiz line
336 
337  CPPUNIT_ASSERT(boxG->touches(*boxH) == true); //by a segment of horiz line
338  CPPUNIT_ASSERT(boxH->touches(*boxG) == true); //by a segment of horiz line
339 }
340 
342 {
343  te::gm::Envelope boxAeB_res = boxA->intersection( *boxB); //rectangle
344  CPPUNIT_ASSERT(boxAeB_res.equals(*boxAeB) == true);
345  CPPUNIT_ASSERT_MESSAGE("Intersection should be a rectangle ", boxAeB_res.equals(*boxAeB) == true);
346 
347  te::gm::Envelope boxAeC = boxA->intersection( *boxC); //by a vertical line
348  bool isLine = (boxAeC.m_llx == boxAeC.m_urx);
349  CPPUNIT_ASSERT_MESSAGE("Intersection should be a vertical line ", isLine == true);
350 
351  te::gm::Envelope boxAeG = boxA->intersection( *boxG);
352  bool isPoint = ((boxAeG.m_llx == boxAeG.m_urx) && (boxAeG.m_lly == boxAeG.m_ury)); //it is a point
353  CPPUNIT_ASSERT_MESSAGE("Intersection should be a point ", isPoint == true);
354 
355  te::gm::Envelope boxBeF = boxB->intersection( *boxF); //by a horiz line
356  isLine = (boxBeF.m_lly == boxBeF.m_ury);
357  CPPUNIT_ASSERT_MESSAGE("Intersection should be a horizontal line ", isLine == true);
358 
359  te::gm::Envelope boxGeH = boxG->intersection( *boxH); //by a segment of horiz line
360  isLine = (boxGeH.m_lly == boxGeH.m_ury && boxGeH.m_llx != boxGeH.m_urx);
361  CPPUNIT_ASSERT_MESSAGE("Intersection should be a segment of horiz line ", isLine == true);
362 }
363 
364 
366 {
367  CPPUNIT_ASSERT(boxA->contains( *boxD) == true);
368 }
370 {
371  CPPUNIT_ASSERT(boxD->within( *boxA) == true);
372 }
373 
375 {
376  boxA->Union(*boxB);
377  CPPUNIT_ASSERT(boxA->equals(*boxAexpandedB) == true);
378 
379  boxG->Union(*boxA);
380  CPPUNIT_ASSERT(boxG->equals(*boxGexpandedA) == true);
381 }
382 
384 {
385 //#ifdef TE_COMPILE_ALL
386  //OuroPreto boxA
387  //te::gm::Envelope boxA(-43.9329795837402, -20.6328010559082, -43.4036407470703, -20.1612071990967);
388  //te::gm::Envelope boxAEqual(-43.9329795837402, -20.6328010559082, -43.4036407470703, -20.1612071990967);
389 
390  //te::gm::Envelope boxB(-43.7329795837402, -20.3328010559082, 10.4036407470703, 10.1612071990967);
391  //te::gm::Envelope boxC(-43.4036407470703, -20.6328010559082, 0, -20.1612071990967);
392  //te::gm::Envelope boxD(-43.8329795837402, -20.4328010559082, -43.6036407470703, -20.2612071990967);
393  //te::gm::Envelope boxE(43.9329795837402, -20.6328010559082, 43.4036407470703, -20.1612071990967);
394  //te::gm::Envelope boxF(-43.7329795837402, -25.6328010559082, 10.4036407470703, -20.3328010559082); //touch B by a horiz line
395  //te::gm::Envelope boxG(-43.4036407470703, -20.1612071990967, 10.4036407470703, 10.1612071990967 ); //touch A by a point)
396 
397  //te::gm::Envelope boxAeB(-43.7329795837402, -20.3328010559082 , -43.4036407470703, -20.1612071990967);
398  //te::gm::Envelope boxAeF(-43.7329795837402, -20.6328010559082 , -43.4036407470703, -20.3328010559082);
399 
400  //te::gm::Envelope boxAexpandedB(-43.9329795837402, -20.6328010559082,10.4036407470703, 10.1612071990967);
401 
402 
403  //CPPUNIT_ASSERT(boxA->equals(*boxAEqual) == true);
404  //CPPUNIT_ASSERT(boxA->intersects(*boxB) == true);
405  //CPPUNIT_ASSERT(boxA->touches( *boxB) == false);
406 
407  //CPPUNIT_ASSERT(boxA->intersects( boxC) == true); // only a vertical line
408  //CPPUNIT_ASSERT(boxC->intersects( boxA) == true); // only a vertical line
409  //CPPUNIT_ASSERT(boxA->touches( boxC) == true); // touches by a vertical line
410  //te::gm::Envelope* boxAeC = boxA->intersection( boxC);
411  //bool isLine = boxAeC->isValid(); //it is a vertical line
412 
413  //CPPUNIT_ASSERT(boxA->intersects( boxE) == false); // disjoint
414  //CPPUNIT_ASSERT(boxA->intersects( boxF) == true);
415  //CPPUNIT_ASSERT(boxA->intersects( boxG) == true); // only a point (urA)
416  //CPPUNIT_ASSERT(boxA->touches( boxG) == true); // only a poin corner urA
417  //te::gm::Envelope* boxAeG = boxA->intersection( boxG);
418  //bool isPoint = boxAeG->isValid(); //it is a point
419  ////CPPUNIT_ASSERT(boxAeG->isValid() == false); //it is a point
420 
421  //CPPUNIT_ASSERT(boxA->contains( boxD) == true);
422  //CPPUNIT_ASSERT(boxD->within( boxA) == true);
423  //CPPUNIT_ASSERT(boxA->disjoint( boxE) == true);
424 
425  //te::gm::Envelope* boxAeB_res = boxA->intersection( boxB);
426  //CPPUNIT_ASSERT(boxAeB_res->equals(boxAeB) == true);
427  //te::gm::Envelope* boxAeF_res = boxA->intersection( boxF);
428  //CPPUNIT_ASSERT(boxAeF_res->equals(boxAeF) == true);
429 
430  //CPPUNIT_ASSERT(boxB->touches( boxF) == true); //by line
431  //CPPUNIT_ASSERT(boxF->touches( boxB) == true); //by line
432  //CPPUNIT_ASSERT(boxB->intersects( boxF) == true); //by horiz line
433  //CPPUNIT_ASSERT(boxF->intersects( boxB) == true); //by horiz line
434 
435  //te::gm::Envelope* boxBeF = boxB->intersection( boxF); //returns a envelop, but it is a horiz line
436  //bool isLineHoriz = boxBeF->isValid();
437  //boxA->expand(boxB);
438  //CPPUNIT_ASSERT(boxA->equals(boxAexpandedB) == true);
439 
440  //delete boxAeC;
441  //delete boxAeG;
442  //delete boxAeB_res;
443  //delete boxAeF_res;
444  //delete boxBeF;
445 
446 //#endif
447 }
void tearDown()
Definition: TsEnvelop.cpp:55
void init(const double &llx, const double &lly, const double &urx, const double &ury)
It initializes (sets) the envelope bounds.
void makeInvalid()
It will invalidated the envelope.
Test suite for the Envelop Class.
Definition: TsEnvelop.h:59
void tcMakeInvalid()
Test Case: Invalidate the envelop.
Definition: TsEnvelop.cpp:217
void tcEquals()
Test Case: Check if the envelopes are "spatially equal".
Definition: TsEnvelop.cpp:128
double y
y-coordinate.
Definition: Coord2D.h:114
te::gm::Envelope * boxAeF
Definition: TsEnvelop.h:201
bool intersects(const Envelope &rhs) const
It returns true if the envelopes "spatially intersects".
void tcContains()
Test Case: Contains.
Definition: TsEnvelop.cpp:365
void tcEnvelopValid()
Test Case: Constructs an envelope with valid coordinates..
Definition: TsEnvelop.cpp:87
double x
x-coordinate.
Definition: Coord2D.h:113
void tcGetUpperRightX()
Test Case: Get the lower left X coordinate.
Definition: TsEnvelop.cpp:163
bool touches(const Envelope &rhs) const
It returns true if the envelopes "spatially touches".
const double & getUpperRightX() const
It returns a constant refernce to the x coordinate of the upper right corner.
void setUp()
Definition: TsEnvelop.cpp:34
void tcSpatialOperations()
Definition: TsEnvelop.cpp:266
double m_urx
Upper right corner x-coordinate.
const double & getLowerLeftY() const
It returns a constant refernce to the y coordinate of the lower left corner.
double getWidth() const
It returns the envelope width.
void tcWithin()
Test Case: Within.
Definition: TsEnvelop.cpp:369
An utility struct for representing 2D coordinates.
Definition: Coord2D.h:40
te::gm::Envelope * boxA
Definition: TsEnvelop.h:189
const double & getUpperRightY() const
It returns a constant refernce to the x coordinate of the upper right corner.
CPPUNIT_TEST_SUITE_REGISTRATION(TsEnvelop)
void tcEnvelopInit()
Test Case: Initialize a envelop.
Definition: TsEnvelop.cpp:114
void Union(const Envelope &rhs)
It updates the envelop with coordinates of another envelope.
void tcSpatialOperations1()
Definition: TsEnvelop.cpp:383
te::gm::Envelope * boxAEqual
Definition: TsEnvelop.h:190
bool disjoint(const Envelope &rhs) const
It returns true if this envelope is "spatially disjoint" from rhs envelope.
double m_llx
Lower left corner x-coordinate.
Test suite for the Envelop class.
te::gm::Envelope * boxG
Definition: TsEnvelop.h:197
An Envelope defines a 2D rectangular region.
bool within(const Envelope &rhs) const
It returns true if this envelope is "spatially within" the rhs envelope.
void tcIntersects()
Test Case: Intersects.
Definition: TsEnvelop.cpp:299
bool contains(const Envelope &rhs) const
It returns true if this envelope "spatially contains" the rhs envelope.
te::gm::Envelope * boxB
Definition: TsEnvelop.h:192
te::gm::Envelope * boxGexpandedA
Definition: TsEnvelop.h:203
double getArea() const
It returns the area of this envelope as measured in the spatial reference system of it...
te::gm::Envelope * boxF
Definition: TsEnvelop.h:196
bool equals(const Envelope &rhs) const
It returns true if the envelopes are "spatially equal".
double m_lly
Lower left corner y-coordinate.
te::gm::Envelope * boxE
Definition: TsEnvelop.h:195
void tcEnvelopInvalid()
Test Case: Constructs an envelope with invalid coordinates.
Definition: TsEnvelop.cpp:73
void tcGetLowerLeftCoord2D()
Test Case: Get the lower left Coord2D.
Definition: TsEnvelop.cpp:193
void tcGetUpperRightY()
Test Case: Get the lower left X coordinate.
Definition: TsEnvelop.cpp:178
void tcTouches()
Test Case: Touches.
Definition: TsEnvelop.cpp:324
double m_ury
Upper right corner y-coordinate.
void tcIntersection()
Test Case: Intersection.
Definition: TsEnvelop.cpp:341
void tcIsValidRect()
Definition: TsEnvelop.cpp:236
const double & getLowerLeftX() const
It returns a constant reference to the x coordinate of the lower left corner.
void tcGetLowerLeftX()
Test Case: Get the lower left X coordinate.
Definition: TsEnvelop.cpp:133
te::gm::Envelope * boxAexpandedB
Definition: TsEnvelop.h:202
Coord2D getUpperRight() const
It returns the upper right coordinate of the envelope.
te::gm::Envelope * boxC
Definition: TsEnvelop.h:193
te::gm::Envelope * boxH
Definition: TsEnvelop.h:198
void tcEnvelopCopy()
Test Case: Copy a envelop.
Definition: TsEnvelop.cpp:100
Envelope intersection(const Envelope &rhs) const
It returns an envelope that represents the point set intersection with another envelope.
Coord2D getLowerLeft() const
It returns the lower left coordinate of the envelope.
void tcDisjoint()
Test Case: Disjoint.
Definition: TsEnvelop.cpp:314
te::gm::Envelope * boxAeB
Definition: TsEnvelop.h:200
te::gm::Envelope * boxD
Definition: TsEnvelop.h:194
double getHeight() const
It returns the envelope height.
bool isValid() const
It tells if the rectangle is valid or not.
void tcGetUpperRightCoord2D()
Test Case: Get the lower left X coordinate.
Definition: TsEnvelop.cpp:205
void tcGetWidth_Right_Area()
Definition: TsEnvelop.cpp:250
void tcUnion()
Test Case: Updates the envelop with another envelop.
Definition: TsEnvelop.cpp:374
void tcGetLowerLeftY()
Test Case: Get the lower left Y coordinate.
Definition: TsEnvelop.cpp:148