xsi/Geometry.xsi

filter: Statementstmt 95.1% 78 / 82 Branchbran 50.9% 108 / 212 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 63.2% 186 / 294 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« xsi/index/MonotoneChain.xsi ↑ Summary xsi/algorithm.xsi »
1 MODULE = Geo::Geos PACKAGE = Geo::Geos::Geometry
2 PROTOTYPES: DISABLE
3  
4 14 ▶int Geometry::getSRID()
Branch: 1 branch
BranchTrueFalseTotal
int Geometry::getSRID() 0 14 14
5  
6 6 void Geometry::setSRID(int newSRID)
7  
8 17 ▶bool Geometry::isEmpty()
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::isEmpty() 5 12 17
9  
10 14 ▶bool Geometry::isSimple()
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::isSimple() 14 0 14
11  
12 6 ▶bool Geometry::isRectangle()
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::isRectangle() 1 5 6
13  
14 6 ▶bool Geometry::isValid()
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::isValid() 6 0 6
15  
16 15 ▶size_t Geometry::getNumPoints()
Branch: 1 branch
BranchTrueFalseTotal
size_t Geometry::getNumPoints() 0 15 15
17  
18 9 ▶int Geometry::getDimension()
Branch: 1 branch
BranchTrueFalseTotal
int Geometry::getDimension() 0 9 9
19  
20 15 ▶int Geometry::getCoordinateDimension()
Branch: 1 branch
BranchTrueFalseTotal
int Geometry::getCoordinateDimension() 0 15 15
21  
22 15 ▶int Geometry::getBoundaryDimension()
Branch: 1 branch
BranchTrueFalseTotal
int Geometry::getBoundaryDimension() 0 15 15
23  
24 11 ▶int Geometry::getNumGeometries()
Branch: 1 branch
BranchTrueFalseTotal
int Geometry::getNumGeometries() 0 11 11
25  
26 4 ▶Sv Geometry::reverse() { RETVAL = Helper::uplift(THIS->reverse()); }
Branch: 2 branches
BranchTrueFalseTotal
Sv Geometry::reverse() { RETVAL = Helper::uplift(THIS->reverse()); } 4 0 4
Sv Geometry::reverse() { RETVAL = Helper::uplift(THIS->reverse()); } 4 0 4
27  
28 Sv Geometry::getGeometryN(size_t n) {
29 13 ▶ auto g = THIS->getGeometryN(n);
Branch: 1 branch
BranchTrueFalseTotal
auto g = THIS->getGeometryN(n); 13 0 13
30 13 ▶ if (g) RETVAL = Helper::uplift(g->clone());
Branch: 3 branches
BranchTrueFalseTotal
if (g) RETVAL = Helper::uplift(g->clone()); 13 0 13
if (g) RETVAL = Helper::uplift(g->clone()); 13 0 13
if (g) RETVAL = Helper::uplift(g->clone()); 13 0 13
31 0 else XSRETURN_UNDEF;
32 }
33  
34 Coordinate* Geometry::getCoordinate() {
35 22 // avoid mem-leak due to https://trac.osgeo.org/geos/ticket/918
36 if (THIS->isEmpty()) XSRETURN_UNDEF;
37 22 ▶ 
Branch: 2 branches
BranchTrueFalseTotal
22 0 22
8 14 22
38 auto c = THIS->getCoordinate();
39 14 ▶ if (c) RETVAL = new Coordinate(*c);
Branch: 1 branch
BranchTrueFalseTotal
if (c) RETVAL = new Coordinate(*c); 14 0 14
40 14 ▶ else XSRETURN_UNDEF;
Branch: 2 branches
BranchTrueFalseTotal
else XSRETURN_UNDEF; 14 0 14
else XSRETURN_UNDEF; 14 0 14
41 0 }
42  
43 14 ▶std::string Geometry::getGeometryType()
Branch: 1 branch
BranchTrueFalseTotal
std::string Geometry::getGeometryType() 14 0 14
44  
45 32 ▶int Geometry::getGeometryTypeId()
Branch: 1 branch
BranchTrueFalseTotal
int Geometry::getGeometryTypeId() 0 32 32
46  
47 221 ▶std::string Geometry::toString (...)
Branch: 1 branch
BranchTrueFalseTotal
std::string Geometry::toString (...) 221 0 221
48  
49 6 ▶std::string Geometry::toText()
Branch: 1 branch
BranchTrueFalseTotal
std::string Geometry::toText() 6 0 6
50  
51 15 ▶bool Geometry::equalsExact(Geometry& other, double tolerance = 0) { RETVAL = THIS->equalsExact(&other, tolerance); }
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::equalsExact(Geometry& other, double tolerance = 0) { RETVAL = THIS->equalsExact(&other, tolerance); } 15 0 15
52  
53 7 ▶bool Geometry::equals(Geometry& other) { RETVAL = THIS->equals(&other); }
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::equals(Geometry& other) { RETVAL = THIS->equals(&other); } 7 0 7
54  
55 6 ▶int Geometry::compareTo(Geometry& other) { RETVAL = THIS->compareTo(&other); }
Branch: 1 branch
BranchTrueFalseTotal
int Geometry::compareTo(Geometry& other) { RETVAL = THIS->compareTo(&other); } 0 6 6
56  
57 7 ▶Sv Geometry::getBoundary() { RETVAL = Helper::uplift(THIS->getBoundary()); }
Branch: 2 branches
BranchTrueFalseTotal
Sv Geometry::getBoundary() { RETVAL = Helper::uplift(THIS->getBoundary()); } 7 0 7
Sv Geometry::getBoundary() { RETVAL = Helper::uplift(THIS->getBoundary()); } 7 0 7
58  
59 8 ▶double Geometry::getArea()
Branch: 1 branch
BranchTrueFalseTotal
double Geometry::getArea() 0 8 8
60  
61 7 ▶double Geometry::getLength()
Branch: 1 branch
BranchTrueFalseTotal
double Geometry::getLength() 0 7 7
62  
63 7 ▶double Geometry::distance(Geometry& g) { RETVAL = THIS->distance(&g); }
Branch: 1 branch
BranchTrueFalseTotal
double Geometry::distance(Geometry& g) { RETVAL = THIS->distance(&g); } 0 7 7
64  
65 6 ▶bool Geometry::isWithinDistance(Geometry& g, double distance) { RETVAL = THIS->isWithinDistance(&g, distance); }
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::isWithinDistance(Geometry& g, double distance) { RETVAL = THIS->isWithinDistance(&g, distance); } 6 0 6
66  
67 7 Point* Geometry::getCentroid() { RETVAL = THIS->getCentroid(); }
68 7 ▶ 
Branch: 2 branches
BranchTrueFalseTotal
7 0 7
7 0 7
69 6 Point* Geometry::getInteriorPoint() { RETVAL = THIS->getInteriorPoint(); }
70 6 ▶ 
Branch: 2 branches
BranchTrueFalseTotal
6 0 6
6 0 6
71 6 ▶Sv Geometry::symDifference(Geometry& other) { RETVAL = Helper::uplift(THIS->symDifference(&other)); }
Branch: 2 branches
BranchTrueFalseTotal
Sv Geometry::symDifference(Geometry& other) { RETVAL = Helper::uplift(THIS->symDifference(&other)); } 6 0 6
Sv Geometry::symDifference(Geometry& other) { RETVAL = Helper::uplift(THIS->symDifference(&other)); } 6 0 6
72  
73 7 ▶Sv Geometry::difference(Geometry& other) { RETVAL = Helper::uplift(THIS->difference(&other)); }
Branch: 2 branches
BranchTrueFalseTotal
Sv Geometry::difference(Geometry& other) { RETVAL = Helper::uplift(THIS->difference(&other)); } 7 0 7
Sv Geometry::difference(Geometry& other) { RETVAL = Helper::uplift(THIS->difference(&other)); } 7 0 7
74  
75 6 ▶Sv Geometry::Union(Geometry& other) { RETVAL = Helper::uplift(THIS->Union(&other)); }
Branch: 2 branches
BranchTrueFalseTotal
Sv Geometry::Union(Geometry& other) { RETVAL = Helper::uplift(THIS->Union(&other)); } 6 0 6
Sv Geometry::Union(Geometry& other) { RETVAL = Helper::uplift(THIS->Union(&other)); } 6 0 6
76  
77 6 ▶Sv Geometry::intersection(Geometry& other) { RETVAL = Helper::uplift(THIS->intersection(&other)); }
Branch: 2 branches
BranchTrueFalseTotal
Sv Geometry::intersection(Geometry& other) { RETVAL = Helper::uplift(THIS->intersection(&other)); } 6 0 6
Sv Geometry::intersection(Geometry& other) { RETVAL = Helper::uplift(THIS->intersection(&other)); } 6 0 6
78  
79 6 ▶Sv Geometry::convexHull() { RETVAL = Helper::uplift(THIS->convexHull()); }
Branch: 2 branches
BranchTrueFalseTotal
Sv Geometry::convexHull() { RETVAL = Helper::uplift(THIS->convexHull()); } 6 0 6
Sv Geometry::convexHull() { RETVAL = Helper::uplift(THIS->convexHull()); } 6 0 6
80  
81 Sv Geometry::buffer(double distance, SV* arg2 = NULL, SV* arg3 = NULL) {
82 Geometry* r;
83 18 ▶ if (!arg2) r = THIS->buffer(distance);
Branch: 2 branches
BranchTrueFalseTotal
if (!arg2) r = THIS->buffer(distance); 6 12 18
if (!arg2) r = THIS->buffer(distance); 6 0 6
84 else {
85 12 ▶ int quadrantSegments = SvIV(arg2);
Branch: 1 branch
BranchTrueFalseTotal
int quadrantSegments = SvIV(arg2); 12 0 12
86 12 ▶ if (arg3) {
Branch: 1 branch
BranchTrueFalseTotal
if (arg3) { 6 6 12
87 6 ▶ int endCapStyle = SvIV(arg3);
Branch: 1 branch
BranchTrueFalseTotal
int endCapStyle = SvIV(arg3); 6 0 6
88 6 ▶ r = THIS->buffer(distance, quadrantSegments, endCapStyle);
Branch: 1 branch
BranchTrueFalseTotal
r = THIS->buffer(distance, quadrantSegments, endCapStyle); 6 0 6
89 } else {
90 6 ▶ r = THIS->buffer(distance, quadrantSegments);
Branch: 1 branch
BranchTrueFalseTotal
r = THIS->buffer(distance, quadrantSegments); 6 0 6
91 }
92 }
93 18 ▶ RETVAL = Helper::uplift(r);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = Helper::uplift(r); 18 0 18
94 }
95  
96 6 ▶bool Geometry::coveredBy(Geometry& other) { RETVAL = THIS->coveredBy(&other); }
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::coveredBy(Geometry& other) { RETVAL = THIS->coveredBy(&other); } 6 0 6
97  
98 6 ▶bool Geometry::covers(Geometry& other) { RETVAL = THIS->covers(&other); }
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::covers(Geometry& other) { RETVAL = THIS->covers(&other); } 6 0 6
99  
100 6 ▶bool Geometry::overlaps(Geometry& other) { RETVAL = THIS->overlaps(&other); }
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::overlaps(Geometry& other) { RETVAL = THIS->overlaps(&other); } 0 6 6
101  
102 6 ▶bool Geometry::contains(Geometry& other) { RETVAL = THIS->contains(&other); }
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::contains(Geometry& other) { RETVAL = THIS->contains(&other); } 6 0 6
103  
104 6 ▶bool Geometry::within(Geometry& other) { RETVAL = THIS->within(&other); }
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::within(Geometry& other) { RETVAL = THIS->within(&other); } 6 0 6
105  
106 6 ▶bool Geometry::crosses(Geometry& other) { RETVAL = THIS->crosses(&other); }
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::crosses(Geometry& other) { RETVAL = THIS->crosses(&other); } 0 6 6
107  
108 6 ▶bool Geometry::intersects(Geometry& other) { RETVAL = THIS->intersects(&other); }
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::intersects(Geometry& other) { RETVAL = THIS->intersects(&other); } 6 0 6
109  
110 6 ▶bool Geometry::touches(Geometry& other) { RETVAL = THIS->touches(&other); }
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::touches(Geometry& other) { RETVAL = THIS->touches(&other); } 0 6 6
111  
112 6 ▶bool Geometry::disjoint(Geometry& other) { RETVAL = THIS->disjoint(&other); }
Branch: 1 branch
BranchTrueFalseTotal
bool Geometry::disjoint(Geometry& other) { RETVAL = THIS->disjoint(&other); } 0 6 6
113  
114 6 ▶Sv Geometry::getEnvelope() { RETVAL = Helper::uplift(THIS->getEnvelope()); }
Branch: 2 branches
BranchTrueFalseTotal
Sv Geometry::getEnvelope() { RETVAL = Helper::uplift(THIS->getEnvelope()); } 6 0 6
Sv Geometry::getEnvelope() { RETVAL = Helper::uplift(THIS->getEnvelope()); } 6 0 6
115  
116 7 ▶Sv Geometry::clone() { RETVAL = Helper::uplift(THIS->clone()); }
Branch: 2 branches
BranchTrueFalseTotal
Sv Geometry::clone() { RETVAL = Helper::uplift(THIS->clone()); } 7 0 7
Sv Geometry::clone() { RETVAL = Helper::uplift(THIS->clone()); } 7 0 7
117  
118 PrecisionModel* Geometry::getPrecisionModel() {
119 6 auto pm = THIS->getPrecisionModel();
120 6 ▶ RETVAL = new PrecisionModel(*pm);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = new PrecisionModel(*pm); 6 0 6
121 6 ▶}
Branch: 4 branches
BranchTrueFalseTotal
} 6 0 6
} 6 0 6
} 6 0 6
} 0 0 0
122  
123 Array Geometry::getCoordinates() {
124 7 ▶ auto seq = std::unique_ptr<CoordinateSequence>(THIS->getCoordinates());
Branch: 1 branch
BranchTrueFalseTotal
auto seq = std::unique_ptr<CoordinateSequence>(THIS->getCoordinates()); 7 0 7
125 7 ▶ RETVAL = Helper::convert_copy(seq.get());
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = Helper::convert_copy(seq.get()); 7 0 7
126 }
127  
128 Sv Geometry::relate(Geometry& other, SV* arg = NULL) {
129 12 ▶ if (!arg) RETVAL = xs::out<IntersectionMatrix*>(THIS->relate(&other));
Branch: 3 branches
BranchTrueFalseTotal
if (!arg) RETVAL = xs::out<IntersectionMatrix*>(THIS->relate(&other)); 6 6 12
if (!arg) RETVAL = xs::out<IntersectionMatrix*>(THIS->relate(&other)); 6 0 6
if (!arg) RETVAL = xs::out<IntersectionMatrix*>(THIS->relate(&other)); 6 0 6
130 else {
131 12 ▶ std::string intersectionPattern { SvPV_nolen(arg) };
Branch: 1 branch
BranchTrueFalseTotal
std::string intersectionPattern { SvPV_nolen(arg) }; 6 0 6
132 6 ▶ RETVAL = Simple(THIS->relate(&other, intersectionPattern));
Branch: 2 branches
BranchTrueFalseTotal
RETVAL = Simple(THIS->relate(&other, intersectionPattern)); 6 0 6
RETVAL = Simple(THIS->relate(&other, intersectionPattern)); 6 0 6
133 6 }
134 }
135  
136  
137 7 void Geometry::normalize()
138  
139 BOOT {
140 46 ▶ auto this_stash = Stash(__PACKAGE__);
Branch: 1 branch
BranchTrueFalseTotal
auto this_stash = Stash(__PACKAGE__); 46 0 46
141 552 ▶ xs::exp::create_constants(this_stash, {
Branch: 4 branches
BranchTrueFalseTotal
xs::exp::create_constants(this_stash, { 46 0 46
xs::exp::create_constants(this_stash, { 46 0 46
xs::exp::create_constants(this_stash, { 506 46 552
xs::exp::create_constants(this_stash, { 0 0 0
142 {"TYPE_GEOS_POINT", GeometryTypeId::GEOS_POINT},
143 {"TYPE_GEOS_LINESTRING", GeometryTypeId::GEOS_LINESTRING},
144 {"TYPE_GEOS_LINEARRING", GeometryTypeId::GEOS_LINEARRING},
145 {"TYPE_GEOS_POLYGON", GeometryTypeId::GEOS_POLYGON},
146 {"TYPE_GEOS_MULTIPOINT", GeometryTypeId::GEOS_MULTIPOINT},
147 {"TYPE_GEOS_MULTILINESTRING", GeometryTypeId::GEOS_MULTILINESTRING},
148 {"TYPE_GEOS_MULTIPOLYGON", GeometryTypeId::GEOS_MULTIPOLYGON},
149 {"TYPE_GEOS_GEOMETRYCOLLECTION", GeometryTypeId::GEOS_GEOMETRYCOLLECTION},
150  
151 {"TYPE_CAP_ROUND", geos::operation::buffer::BufferParameters::CAP_ROUND},
152 {"TYPE_CAP_FLAT", geos::operation::buffer::BufferParameters::CAP_FLAT},
153 {"TYPE_CAP_SQUARE", geos::operation::buffer::BufferParameters::CAP_SQUARE}
154 });
155 46 ▶ xs::exp::autoexport(this_stash);
Branch: 2 branches
BranchTrueFalseTotal
xs::exp::autoexport(this_stash); 46 0 46
xs::exp::autoexport(this_stash); 46 0 46
156  
157 46 ▶ Stash("Geo::Geos::GeometryCollection").inherit(__PACKAGE__);
Branch: 2 branches
BranchTrueFalseTotal
Stash("Geo::Geos::GeometryCollection").inherit(__PACKAGE__); 46 0 46
Stash("Geo::Geos::GeometryCollection").inherit(__PACKAGE__); 46 0 46
158  
159 46 ▶ Stash("Geo::Geos::Puntal", GV_ADD).mark_as_loaded("Geo::Geos");
Branch: 2 branches
BranchTrueFalseTotal
Stash("Geo::Geos::Puntal", GV_ADD).mark_as_loaded("Geo::Geos"); 46 0 46
Stash("Geo::Geos::Puntal", GV_ADD).mark_as_loaded("Geo::Geos"); 46 0 46
160 46 ▶ Stash("Geo::Geos::Puntal").inherit(__PACKAGE__);
Branch: 2 branches
BranchTrueFalseTotal
Stash("Geo::Geos::Puntal").inherit(__PACKAGE__); 46 0 46
Stash("Geo::Geos::Puntal").inherit(__PACKAGE__); 46 0 46
161  
162 46 ▶ Stash("Geo::Geos::Lineal", GV_ADD).mark_as_loaded("Geo::Geos");
Branch: 2 branches
BranchTrueFalseTotal
Stash("Geo::Geos::Lineal", GV_ADD).mark_as_loaded("Geo::Geos"); 46 0 46
Stash("Geo::Geos::Lineal", GV_ADD).mark_as_loaded("Geo::Geos"); 46 0 46
163 46 ▶ Stash("Geo::Geos::Lineal").inherit(__PACKAGE__);
Branch: 2 branches
BranchTrueFalseTotal
Stash("Geo::Geos::Lineal").inherit(__PACKAGE__); 46 0 46
Stash("Geo::Geos::Lineal").inherit(__PACKAGE__); 46 0 46
164  
165 46 ▶ Stash("Geo::Geos::Polygonal", GV_ADD).mark_as_loaded("Geo::Geos");
Branch: 2 branches
BranchTrueFalseTotal
Stash("Geo::Geos::Polygonal", GV_ADD).mark_as_loaded("Geo::Geos"); 46 0 46
Stash("Geo::Geos::Polygonal", GV_ADD).mark_as_loaded("Geo::Geos"); 46 0 46
166 46 ▶ Stash("Geo::Geos::Polygonal").inherit(__PACKAGE__);
Branch: 2 branches
BranchTrueFalseTotal
Stash("Geo::Geos::Polygonal").inherit(__PACKAGE__); 46 0 46
Stash("Geo::Geos::Polygonal").inherit(__PACKAGE__); 46 0 46
167 46 }
168  
169 0 ▶int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; }
Branch: 1 branch
BranchTrueFalseTotal
int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } 0 0 0
170  
171 Sv Geometry::HOOK_CLONE () {
172 0 ▶ RETVAL = Helper::uplift(THIS->clone());
Branch: 2 branches
BranchTrueFalseTotal
RETVAL = Helper::uplift(THIS->clone()); 0 0 0
RETVAL = Helper::uplift(THIS->clone()); 0 0 0
173 }
174  
« xsi/index/MonotoneChain.xsi ↑ Summary xsi/algorithm.xsi »