line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODULE = Geo::Geos PACKAGE = Geo::Geos::Geometry |
2
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
3
|
|
|
|
|
|
|
|
4
|
14
|
50
|
|
|
|
|
int Geometry::getSRID() |
5
|
|
|
|
|
|
|
|
6
|
6
|
|
|
|
|
|
void Geometry::setSRID(int newSRID) |
7
|
|
|
|
|
|
|
|
8
|
17
|
50
|
|
|
|
|
bool Geometry::isEmpty() |
9
|
|
|
|
|
|
|
|
10
|
14
|
50
|
|
|
|
|
bool Geometry::isSimple() |
11
|
|
|
|
|
|
|
|
12
|
6
|
50
|
|
|
|
|
bool Geometry::isRectangle() |
13
|
|
|
|
|
|
|
|
14
|
6
|
50
|
|
|
|
|
bool Geometry::isValid() |
15
|
|
|
|
|
|
|
|
16
|
15
|
50
|
|
|
|
|
size_t Geometry::getNumPoints() |
17
|
|
|
|
|
|
|
|
18
|
9
|
50
|
|
|
|
|
int Geometry::getDimension() |
19
|
|
|
|
|
|
|
|
20
|
15
|
50
|
|
|
|
|
int Geometry::getCoordinateDimension() |
21
|
|
|
|
|
|
|
|
22
|
15
|
50
|
|
|
|
|
int Geometry::getBoundaryDimension() |
23
|
|
|
|
|
|
|
|
24
|
11
|
50
|
|
|
|
|
int Geometry::getNumGeometries() |
25
|
|
|
|
|
|
|
|
26
|
4
|
50
|
|
|
|
|
Sv Geometry::reverse() { RETVAL = Helper::uplift(THIS->reverse()); } |
|
|
50
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Sv Geometry::getGeometryN(size_t n) { |
29
|
13
|
50
|
|
|
|
|
auto g = THIS->getGeometryN(n); |
30
|
13
|
50
|
|
|
|
|
if (g) RETVAL = Helper::uplift(g->clone()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
else XSRETURN_UNDEF; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Coordinate* Geometry::getCoordinate() { |
35
|
36
|
|
|
|
|
|
// avoid mem-leak due to https://trac.osgeo.org/geos/ticket/918 |
36
|
|
|
|
|
|
|
if (THIS->isEmpty()) XSRETURN_UNDEF; |
37
|
22
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
38
|
|
|
|
|
|
|
auto c = THIS->getCoordinate(); |
39
|
14
|
50
|
|
|
|
|
if (c) RETVAL = new Coordinate(*c); |
40
|
14
|
50
|
|
|
|
|
else XSRETURN_UNDEF; |
|
|
50
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
14
|
50
|
|
|
|
|
std::string Geometry::getGeometryType() |
|
|
50
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
32
|
50
|
|
|
|
|
int Geometry::getGeometryTypeId() |
46
|
|
|
|
|
|
|
|
47
|
221
|
50
|
|
|
|
|
std::string Geometry::toString (...) |
|
|
50
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
6
|
50
|
|
|
|
|
std::string Geometry::toText() |
|
|
50
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
15
|
50
|
|
|
|
|
bool Geometry::equalsExact(Geometry& other, double tolerance = 0) { RETVAL = THIS->equalsExact(&other, tolerance); } |
52
|
|
|
|
|
|
|
|
53
|
7
|
50
|
|
|
|
|
bool Geometry::equals(Geometry& other) { RETVAL = THIS->equals(&other); } |
54
|
|
|
|
|
|
|
|
55
|
6
|
50
|
|
|
|
|
int Geometry::compareTo(Geometry& other) { RETVAL = THIS->compareTo(&other); } |
56
|
|
|
|
|
|
|
|
57
|
7
|
50
|
|
|
|
|
Sv Geometry::getBoundary() { RETVAL = Helper::uplift(THIS->getBoundary()); } |
|
|
50
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
8
|
50
|
|
|
|
|
double Geometry::getArea() |
60
|
|
|
|
|
|
|
|
61
|
7
|
50
|
|
|
|
|
double Geometry::getLength() |
62
|
|
|
|
|
|
|
|
63
|
7
|
50
|
|
|
|
|
double Geometry::distance(Geometry& g) { RETVAL = THIS->distance(&g); } |
64
|
|
|
|
|
|
|
|
65
|
6
|
50
|
|
|
|
|
bool Geometry::isWithinDistance(Geometry& g, double distance) { RETVAL = THIS->isWithinDistance(&g, distance); } |
66
|
|
|
|
|
|
|
|
67
|
14
|
|
|
|
|
|
Point* Geometry::getCentroid() { RETVAL = THIS->getCentroid(); } |
68
|
7
|
50
|
|
|
|
|
|
69
|
12
|
|
|
|
|
|
Point* Geometry::getInteriorPoint() { RETVAL = THIS->getInteriorPoint(); } |
70
|
6
|
50
|
|
|
|
|
|
71
|
6
|
50
|
|
|
|
|
Sv Geometry::symDifference(Geometry& other) { RETVAL = Helper::uplift(THIS->symDifference(&other)); } |
|
|
50
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
7
|
50
|
|
|
|
|
Sv Geometry::difference(Geometry& other) { RETVAL = Helper::uplift(THIS->difference(&other)); } |
|
|
50
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
6
|
50
|
|
|
|
|
Sv Geometry::Union(Geometry& other) { RETVAL = Helper::uplift(THIS->Union(&other)); } |
|
|
50
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
6
|
50
|
|
|
|
|
Sv Geometry::intersection(Geometry& other) { RETVAL = Helper::uplift(THIS->intersection(&other)); } |
|
|
50
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
6
|
50
|
|
|
|
|
Sv Geometry::convexHull() { RETVAL = Helper::uplift(THIS->convexHull()); } |
|
|
50
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Sv Geometry::buffer(double distance, SV* arg2 = NULL, SV* arg3 = NULL) { |
82
|
|
|
|
|
|
|
Geometry* r; |
83
|
18
|
100
|
|
|
|
|
if (!arg2) r = THIS->buffer(distance); |
|
|
50
|
|
|
|
|
|
84
|
|
|
|
|
|
|
else { |
85
|
12
|
50
|
|
|
|
|
int quadrantSegments = SvIV(arg2); |
|
|
0
|
|
|
|
|
|
86
|
12
|
100
|
|
|
|
|
if (arg3) { |
87
|
6
|
50
|
|
|
|
|
int endCapStyle = SvIV(arg3); |
|
|
0
|
|
|
|
|
|
88
|
6
|
50
|
|
|
|
|
r = THIS->buffer(distance, quadrantSegments, endCapStyle); |
89
|
|
|
|
|
|
|
} else { |
90
|
6
|
50
|
|
|
|
|
r = THIS->buffer(distance, quadrantSegments); |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
} |
93
|
18
|
50
|
|
|
|
|
RETVAL = Helper::uplift(r); |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
6
|
50
|
|
|
|
|
bool Geometry::coveredBy(Geometry& other) { RETVAL = THIS->coveredBy(&other); } |
97
|
|
|
|
|
|
|
|
98
|
6
|
50
|
|
|
|
|
bool Geometry::covers(Geometry& other) { RETVAL = THIS->covers(&other); } |
99
|
|
|
|
|
|
|
|
100
|
6
|
50
|
|
|
|
|
bool Geometry::overlaps(Geometry& other) { RETVAL = THIS->overlaps(&other); } |
101
|
|
|
|
|
|
|
|
102
|
6
|
50
|
|
|
|
|
bool Geometry::contains(Geometry& other) { RETVAL = THIS->contains(&other); } |
103
|
|
|
|
|
|
|
|
104
|
6
|
50
|
|
|
|
|
bool Geometry::within(Geometry& other) { RETVAL = THIS->within(&other); } |
105
|
|
|
|
|
|
|
|
106
|
6
|
50
|
|
|
|
|
bool Geometry::crosses(Geometry& other) { RETVAL = THIS->crosses(&other); } |
107
|
|
|
|
|
|
|
|
108
|
6
|
50
|
|
|
|
|
bool Geometry::intersects(Geometry& other) { RETVAL = THIS->intersects(&other); } |
109
|
|
|
|
|
|
|
|
110
|
6
|
50
|
|
|
|
|
bool Geometry::touches(Geometry& other) { RETVAL = THIS->touches(&other); } |
111
|
|
|
|
|
|
|
|
112
|
6
|
50
|
|
|
|
|
bool Geometry::disjoint(Geometry& other) { RETVAL = THIS->disjoint(&other); } |
113
|
|
|
|
|
|
|
|
114
|
6
|
50
|
|
|
|
|
Sv Geometry::getEnvelope() { RETVAL = Helper::uplift(THIS->getEnvelope()); } |
|
|
50
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
7
|
50
|
|
|
|
|
Sv Geometry::clone() { RETVAL = Helper::uplift(THIS->clone()); } |
|
|
50
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
PrecisionModel* Geometry::getPrecisionModel() { |
119
|
12
|
|
|
|
|
|
auto pm = THIS->getPrecisionModel(); |
120
|
6
|
50
|
|
|
|
|
RETVAL = new PrecisionModel(*pm); |
121
|
6
|
50
|
|
|
|
|
} |
|
|
50
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Array Geometry::getCoordinates() { |
124
|
14
|
50
|
|
|
|
|
auto seq = std::unique_ptr(THIS->getCoordinates()); |
|
|
50
|
|
|
|
|
|
125
|
7
|
50
|
|
|
|
|
RETVAL = Helper::convert_copy(seq.get()); |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Sv Geometry::relate(Geometry& other, SV* arg = NULL) { |
129
|
12
|
100
|
|
|
|
|
if (!arg) RETVAL = xs::out(THIS->relate(&other)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
130
|
|
|
|
|
|
|
else { |
131
|
12
|
50
|
|
|
|
|
std::string intersectionPattern { SvPV_nolen(arg) }; |
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
132
|
6
|
50
|
|
|
|
|
RETVAL = Simple(THIS->relate(&other, intersectionPattern)); |
|
|
50
|
|
|
|
|
|
133
|
|
|
|
|
|
|
} |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
|
137
|
7
|
|
|
|
|
|
void Geometry::normalize() |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
BOOT { |
140
|
92
|
50
|
|
|
|
|
auto this_stash = Stash(__PACKAGE__); |
141
|
598
|
50
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
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
|
552
|
50
|
|
|
|
|
}); |
155
|
46
|
50
|
|
|
|
|
xs::exp::autoexport(this_stash); |
|
|
50
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
157
|
46
|
50
|
|
|
|
|
Stash("Geo::Geos::GeometryCollection").inherit(__PACKAGE__); |
|
|
50
|
|
|
|
|
|
158
|
|
|
|
|
|
|
|
159
|
46
|
50
|
|
|
|
|
Stash("Geo::Geos::Puntal", GV_ADD).mark_as_loaded("Geo::Geos"); |
|
|
50
|
|
|
|
|
|
160
|
46
|
50
|
|
|
|
|
Stash("Geo::Geos::Puntal").inherit(__PACKAGE__); |
|
|
50
|
|
|
|
|
|
161
|
|
|
|
|
|
|
|
162
|
46
|
50
|
|
|
|
|
Stash("Geo::Geos::Lineal", GV_ADD).mark_as_loaded("Geo::Geos"); |
|
|
50
|
|
|
|
|
|
163
|
46
|
50
|
|
|
|
|
Stash("Geo::Geos::Lineal").inherit(__PACKAGE__); |
|
|
50
|
|
|
|
|
|
164
|
|
|
|
|
|
|
|
165
|
46
|
50
|
|
|
|
|
Stash("Geo::Geos::Polygonal", GV_ADD).mark_as_loaded("Geo::Geos"); |
|
|
50
|
|
|
|
|
|
166
|
46
|
50
|
|
|
|
|
Stash("Geo::Geos::Polygonal").inherit(__PACKAGE__); |
|
|
50
|
|
|
|
|
|
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
|
169
|
0
|
|
|
|
|
|
int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
Sv Geometry::HOOK_CLONE () { |
172
|
0
|
0
|
|
|
|
|
RETVAL = Helper::uplift(THIS->clone()); |
|
|
0
|
|
|
|
|
|
173
|
|
|
|
|
|
|
} |
174
|
|
|
|
|
|
|
|