line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODULE = Geo::Geos PACKAGE = Geo::Geos::WKBReader |
2
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
Sv read(std::string in, SV* geometry_factory = NULL) { |
5
|
6
|
50
|
|
|
|
|
std::istringstream in_stream(in); |
|
|
50
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Geometry* g; |
7
|
3
|
100
|
|
|
|
|
if (geometry_factory) { |
8
|
4
|
50
|
|
|
|
|
WKBReader r(xs::in(geometry_factory)); |
|
|
50
|
|
|
|
|
|
9
|
2
|
50
|
|
|
|
|
g = r.read(in_stream); |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
else { |
12
|
2
|
50
|
|
|
|
|
WKBReader r; |
13
|
1
|
50
|
|
|
|
|
g = r.read(in_stream); |
14
|
|
|
|
|
|
|
} |
15
|
3
|
50
|
|
|
|
|
RETVAL = Helper::uplift(g); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Sv readHEX(std::string in, SV* geometry_factory = NULL) { |
19
|
6
|
50
|
|
|
|
|
std::istringstream in_stream(in); |
|
|
50
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Geometry* g; |
21
|
3
|
100
|
|
|
|
|
if (geometry_factory) { |
22
|
4
|
50
|
|
|
|
|
WKBReader r(xs::in(geometry_factory)); |
|
|
50
|
|
|
|
|
|
23
|
2
|
50
|
|
|
|
|
g = r.readHEX(in_stream); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
else { |
26
|
2
|
50
|
|
|
|
|
WKBReader r; |
27
|
1
|
50
|
|
|
|
|
g = r.readHEX(in_stream); |
28
|
|
|
|
|
|
|
} |
29
|
3
|
50
|
|
|
|
|
RETVAL = Helper::uplift(g); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|