| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
/* |
|
2
|
|
|
|
|
|
|
* This file was generated automatically by ExtUtils::ParseXS version 3.34 from the |
|
3
|
|
|
|
|
|
|
* contents of Geos.xs. Do not edit this file, edit Geos.xs instead. |
|
4
|
|
|
|
|
|
|
* |
|
5
|
|
|
|
|
|
|
* ANY CHANGES MADE HERE WILL BE LOST! |
|
6
|
|
|
|
|
|
|
* |
|
7
|
|
|
|
|
|
|
*/ |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#line 1 "Geos.xs" |
|
10
|
|
|
|
|
|
|
#include "xs/geos.h" |
|
11
|
|
|
|
|
|
|
#include "panda/Geos/Helper.h" |
|
12
|
|
|
|
|
|
|
#include "panda/Geos/tesselate.h" |
|
13
|
|
|
|
|
|
|
#include "xsi/private_typemaps.h" |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
using xs::my_perl; |
|
16
|
|
|
|
|
|
|
using xs::Sv; |
|
17
|
|
|
|
|
|
|
using namespace geos::geom; |
|
18
|
|
|
|
|
|
|
using namespace geos::geom::prep; |
|
19
|
|
|
|
|
|
|
using namespace geos::algorithm; |
|
20
|
|
|
|
|
|
|
using namespace geos::noding; |
|
21
|
|
|
|
|
|
|
using namespace geos::noding::snapround; |
|
22
|
|
|
|
|
|
|
using namespace geos::io; |
|
23
|
|
|
|
|
|
|
using namespace geos::index::chain; |
|
24
|
|
|
|
|
|
|
using namespace geos::index; |
|
25
|
|
|
|
|
|
|
using namespace geos::precision; |
|
26
|
|
|
|
|
|
|
using namespace geos::operation::buffer; |
|
27
|
|
|
|
|
|
|
using namespace geos::operation::distance; |
|
28
|
|
|
|
|
|
|
using namespace geos::operation::overlay; |
|
29
|
|
|
|
|
|
|
using namespace geos::operation::valid; |
|
30
|
|
|
|
|
|
|
using namespace geos::operation::relate; |
|
31
|
|
|
|
|
|
|
using namespace geos::operation::linemerge; |
|
32
|
|
|
|
|
|
|
using namespace geos::triangulate; |
|
33
|
|
|
|
|
|
|
using namespace xs; |
|
34
|
|
|
|
|
|
|
using namespace Geo::Geos; |
|
35
|
|
|
|
|
|
|
using namespace panda; |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
struct IntersectionFinderAdder_payload { |
|
38
|
|
|
|
|
|
|
using vector_t = std::vector<::geos::geom::Coordinate>; |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
xs::Object lineIntersector; |
|
41
|
|
|
|
|
|
|
vector_t coords; |
|
42
|
|
|
|
|
|
|
}; |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
struct Noder_payload { |
|
45
|
|
|
|
|
|
|
using vector_t = std::vector<::geos::noding::SegmentString*>; |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
xs::Ref array_ref; |
|
48
|
|
|
|
|
|
|
vector_t segments; |
|
49
|
|
|
|
|
|
|
}; |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
struct MonotoneChain_payload { |
|
53
|
|
|
|
|
|
|
std::unique_ptr seq; |
|
54
|
|
|
|
|
|
|
}; |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
struct SubItemVisitor: public geos::index::ItemVisitor { |
|
57
|
|
|
|
|
|
|
xs::Sub sub; |
|
58
|
|
|
|
|
|
|
Helper::lookup_map_t& lookup_map; |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
SubItemVisitor(Sub sub_, Helper::lookup_map_t& lookup_map_):sub{sub_}, lookup_map{lookup_map_} {}; |
|
61
|
|
|
|
|
|
|
void visitItem (void *data) { |
|
62
|
|
|
|
|
|
|
SV* key = static_cast(data); |
|
63
|
|
|
|
|
|
|
HE* he = hv_fetch_ent(lookup_map, key, 0, 0); |
|
64
|
|
|
|
|
|
|
if (!he) throw ("Cannot lookup key in map"); |
|
65
|
|
|
|
|
|
|
Scalar arg {HeVAL(he)}; |
|
66
|
|
|
|
|
|
|
sub(arg); |
|
67
|
|
|
|
|
|
|
} |
|
68
|
|
|
|
|
|
|
}; |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
struct SVs_map_payload { |
|
71
|
|
|
|
|
|
|
Helper::lookup_map_t map; |
|
72
|
|
|
|
|
|
|
SVs_map_payload(): map{Hash::create()} {} |
|
73
|
|
|
|
|
|
|
}; |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
static xs::Sv::payload_marker_t payload_marker{}; |
|
76
|
|
|
|
|
|
|
static xs::Sv::payload_marker_t payload_marker_IntersectionFinderAdder{}; |
|
77
|
|
|
|
|
|
|
static xs::Sv::payload_marker_t payload_marker_Noder{}; |
|
78
|
|
|
|
|
|
|
static xs::Sv::payload_marker_t payload_marker_MonotoneChain{}; |
|
79
|
|
|
|
|
|
|
static xs::Sv::payload_marker_t payload_marker_SVs_map{}; |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
static int payload_marker_IntersectionFinderAdder_free(pTHX_ SV*, MAGIC* mg) { |
|
82
|
|
|
|
|
|
|
if (mg->mg_virtual == &payload_marker_IntersectionFinderAdder) { |
|
83
|
|
|
|
|
|
|
auto* payload = static_cast((void*)mg->mg_ptr); |
|
84
|
|
|
|
|
|
|
delete payload; |
|
85
|
|
|
|
|
|
|
} |
|
86
|
|
|
|
|
|
|
return 0; |
|
87
|
|
|
|
|
|
|
} |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
static int payload_marker_Noder_free(pTHX_ SV*, MAGIC* mg) { |
|
90
|
|
|
|
|
|
|
if (mg->mg_virtual == &payload_marker_Noder) { |
|
91
|
|
|
|
|
|
|
auto* payload = static_cast((void*)mg->mg_ptr); |
|
92
|
|
|
|
|
|
|
delete payload; |
|
93
|
|
|
|
|
|
|
} |
|
94
|
|
|
|
|
|
|
return 0; |
|
95
|
|
|
|
|
|
|
} |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
static int payload_marker_MonotoneChain_free(pTHX_ SV*, MAGIC* mg) { |
|
98
|
|
|
|
|
|
|
if (mg->mg_virtual == &payload_marker_MonotoneChain) { |
|
99
|
|
|
|
|
|
|
auto* payload = static_cast((void*)mg->mg_ptr); |
|
100
|
|
|
|
|
|
|
delete payload; |
|
101
|
|
|
|
|
|
|
} |
|
102
|
|
|
|
|
|
|
return 0; |
|
103
|
|
|
|
|
|
|
} |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
static int payload_marker_SVs_map_free(pTHX_ SV*, MAGIC* mg) { |
|
106
|
|
|
|
|
|
|
if (mg->mg_virtual == &payload_marker_SVs_map) { |
|
107
|
|
|
|
|
|
|
auto* payload = static_cast((void*)mg->mg_ptr); |
|
108
|
|
|
|
|
|
|
delete payload; |
|
109
|
|
|
|
|
|
|
} |
|
110
|
|
|
|
|
|
|
return 0; |
|
111
|
|
|
|
|
|
|
} |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
static Sv coordinate_create_null () { |
|
115
|
|
|
|
|
|
|
Sv ret = xs::out(aTHX_ new Coordinate()); |
|
116
|
|
|
|
|
|
|
return ret; |
|
117
|
|
|
|
|
|
|
} |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
static Sv coordinate_get_null () { |
|
120
|
|
|
|
|
|
|
static thread_local Sv obj = coordinate_create_null(); |
|
121
|
|
|
|
|
|
|
return obj; |
|
122
|
|
|
|
|
|
|
} |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
//static Sv::payload_marker_t payload_marker; |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
#line 127 "Geos.xs.cc" |
|
127
|
|
|
|
|
|
|
#ifndef PERL_UNUSED_VAR |
|
128
|
|
|
|
|
|
|
# define PERL_UNUSED_VAR(var) if (0) var = var |
|
129
|
|
|
|
|
|
|
#endif |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
#ifndef dVAR |
|
132
|
|
|
|
|
|
|
# define dVAR dNOOP |
|
133
|
|
|
|
|
|
|
#endif |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
/* This stuff is not part of the API! You have been warned. */ |
|
137
|
|
|
|
|
|
|
#ifndef PERL_VERSION_DECIMAL |
|
138
|
|
|
|
|
|
|
# define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s) |
|
139
|
|
|
|
|
|
|
#endif |
|
140
|
|
|
|
|
|
|
#ifndef PERL_DECIMAL_VERSION |
|
141
|
|
|
|
|
|
|
# define PERL_DECIMAL_VERSION \ |
|
142
|
|
|
|
|
|
|
PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION) |
|
143
|
|
|
|
|
|
|
#endif |
|
144
|
|
|
|
|
|
|
#ifndef PERL_VERSION_GE |
|
145
|
|
|
|
|
|
|
# define PERL_VERSION_GE(r,v,s) \ |
|
146
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) |
|
147
|
|
|
|
|
|
|
#endif |
|
148
|
|
|
|
|
|
|
#ifndef PERL_VERSION_LE |
|
149
|
|
|
|
|
|
|
# define PERL_VERSION_LE(r,v,s) \ |
|
150
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s)) |
|
151
|
|
|
|
|
|
|
#endif |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
/* XS_INTERNAL is the explicit static-linkage variant of the default |
|
154
|
|
|
|
|
|
|
* XS macro. |
|
155
|
|
|
|
|
|
|
* |
|
156
|
|
|
|
|
|
|
* XS_EXTERNAL is the same as XS_INTERNAL except it does not include |
|
157
|
|
|
|
|
|
|
* "STATIC", ie. it exports XSUB symbols. You probably don't want that |
|
158
|
|
|
|
|
|
|
* for anything but the BOOT XSUB. |
|
159
|
|
|
|
|
|
|
* |
|
160
|
|
|
|
|
|
|
* See XSUB.h in core! |
|
161
|
|
|
|
|
|
|
*/ |
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
/* TODO: This might be compatible further back than 5.10.0. */ |
|
165
|
|
|
|
|
|
|
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1) |
|
166
|
|
|
|
|
|
|
# undef XS_EXTERNAL |
|
167
|
|
|
|
|
|
|
# undef XS_INTERNAL |
|
168
|
|
|
|
|
|
|
# if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) |
|
169
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name) |
|
170
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
|
171
|
|
|
|
|
|
|
# endif |
|
172
|
|
|
|
|
|
|
# if defined(__SYMBIAN32__) |
|
173
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) EXPORT_C XSPROTO(name) |
|
174
|
|
|
|
|
|
|
# define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name) |
|
175
|
|
|
|
|
|
|
# endif |
|
176
|
|
|
|
|
|
|
# ifndef XS_EXTERNAL |
|
177
|
|
|
|
|
|
|
# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) |
|
178
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) |
|
179
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__) |
|
180
|
|
|
|
|
|
|
# else |
|
181
|
|
|
|
|
|
|
# ifdef __cplusplus |
|
182
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) extern "C" XSPROTO(name) |
|
183
|
|
|
|
|
|
|
# define XS_INTERNAL(name) static XSPROTO(name) |
|
184
|
|
|
|
|
|
|
# else |
|
185
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XSPROTO(name) |
|
186
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
|
187
|
|
|
|
|
|
|
# endif |
|
188
|
|
|
|
|
|
|
# endif |
|
189
|
|
|
|
|
|
|
# endif |
|
190
|
|
|
|
|
|
|
#endif |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
/* perl >= 5.10.0 && perl <= 5.15.1 */ |
|
193
|
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
/* The XS_EXTERNAL macro is used for functions that must not be static |
|
196
|
|
|
|
|
|
|
* like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL |
|
197
|
|
|
|
|
|
|
* macro defined, the best we can do is assume XS is the same. |
|
198
|
|
|
|
|
|
|
* Dito for XS_INTERNAL. |
|
199
|
|
|
|
|
|
|
*/ |
|
200
|
|
|
|
|
|
|
#ifndef XS_EXTERNAL |
|
201
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XS(name) |
|
202
|
|
|
|
|
|
|
#endif |
|
203
|
|
|
|
|
|
|
#ifndef XS_INTERNAL |
|
204
|
|
|
|
|
|
|
# define XS_INTERNAL(name) XS(name) |
|
205
|
|
|
|
|
|
|
#endif |
|
206
|
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
/* Now, finally, after all this mess, we want an ExtUtils::ParseXS |
|
208
|
|
|
|
|
|
|
* internal macro that we're free to redefine for varying linkage due |
|
209
|
|
|
|
|
|
|
* to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use |
|
210
|
|
|
|
|
|
|
* XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to! |
|
211
|
|
|
|
|
|
|
*/ |
|
212
|
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
#undef XS_EUPXS |
|
214
|
|
|
|
|
|
|
#if defined(PERL_EUPXS_ALWAYS_EXPORT) |
|
215
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_EXTERNAL(name) |
|
216
|
|
|
|
|
|
|
#else |
|
217
|
|
|
|
|
|
|
/* default to internal */ |
|
218
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_INTERNAL(name) |
|
219
|
|
|
|
|
|
|
#endif |
|
220
|
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
|
222
|
|
|
|
|
|
|
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params) |
|
223
|
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
/* prototype to pass -Wmissing-prototypes */ |
|
225
|
|
|
|
|
|
|
STATIC void |
|
226
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params); |
|
227
|
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
STATIC void |
|
229
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params) |
|
230
|
|
|
|
|
|
|
{ |
|
231
|
|
|
|
|
|
|
const GV *const gv = CvGV(cv); |
|
232
|
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
PERL_ARGS_ASSERT_CROAK_XS_USAGE; |
|
234
|
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
if (gv) { |
|
236
|
|
|
|
|
|
|
const char *const gvname = GvNAME(gv); |
|
237
|
|
|
|
|
|
|
const HV *const stash = GvSTASH(gv); |
|
238
|
|
|
|
|
|
|
const char *const hvname = stash ? HvNAME(stash) : NULL; |
|
239
|
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
if (hvname) |
|
241
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params); |
|
242
|
|
|
|
|
|
|
else |
|
243
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s(%s)", gvname, params); |
|
244
|
|
|
|
|
|
|
} else { |
|
245
|
|
|
|
|
|
|
/* Pants. I don't think that it should be possible to get here. */ |
|
246
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params); |
|
247
|
|
|
|
|
|
|
} |
|
248
|
|
|
|
|
|
|
} |
|
249
|
|
|
|
|
|
|
#undef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
|
250
|
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
#define croak_xs_usage S_croak_xs_usage |
|
252
|
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
#endif |
|
254
|
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
/* NOTE: the prototype of newXSproto() is different in versions of perls, |
|
256
|
|
|
|
|
|
|
* so we define a portable version of newXSproto() |
|
257
|
|
|
|
|
|
|
*/ |
|
258
|
|
|
|
|
|
|
#ifdef newXS_flags |
|
259
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0) |
|
260
|
|
|
|
|
|
|
#else |
|
261
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv) |
|
262
|
|
|
|
|
|
|
#endif /* !defined(newXS_flags) */ |
|
263
|
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
265
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file) |
|
266
|
|
|
|
|
|
|
#else |
|
267
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b) |
|
268
|
|
|
|
|
|
|
#endif |
|
269
|
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
#line 271 "Geos.xs.cc" |
|
271
|
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/Coordinate.xsi' from 'Geos.xs' */ |
|
273
|
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
|
|
276
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_getNull) { xs::throw_guard(aTHX_ cv, [=]() |
|
277
|
|
|
|
|
|
|
{ |
|
278
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
279
|
0
|
0
|
|
|
|
|
if (items != 0) |
|
280
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
281
|
|
|
|
|
|
|
{ |
|
282
|
0
|
|
|
|
|
|
Sv RETVAL; |
|
283
|
|
|
|
|
|
|
#line 4 "./xsi/Coordinate.xsi" |
|
284
|
|
|
|
|
|
|
RETVAL = coordinate_get_null(); |
|
285
|
|
|
|
|
|
|
#line 286 "Geos.xs.cc" |
|
286
|
|
|
|
|
|
|
{ |
|
287
|
|
|
|
|
|
|
SV * RETVALSV; |
|
288
|
0
|
|
|
|
|
|
RETVALSV = NULL; |
|
289
|
0
|
0
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
290
|
0
|
0
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
0
|
|
|
|
|
|
|
291
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
292
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
293
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
case SVt_PVCV: |
|
295
|
|
|
|
|
|
|
case SVt_PVIO: |
|
296
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
297
|
0
|
|
|
|
|
|
break; |
|
298
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
299
|
|
|
|
|
|
|
} |
|
300
|
0
|
0
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
301
|
0
|
0
|
|
|
|
|
ST(0) = RETVALSV; |
|
302
|
|
|
|
|
|
|
} |
|
303
|
|
|
|
|
|
|
} |
|
304
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
305
|
0
|
0
|
|
|
|
|
}); } |
|
306
|
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
|
|
309
|
632
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
310
|
|
|
|
|
|
|
{ |
|
311
|
316
|
|
|
|
|
|
dVAR; dXSARGS; |
|
312
|
316
|
50
|
|
|
|
|
if (items < 1 || items > 4) |
|
|
|
50
|
|
|
|
|
|
|
313
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, x= 0, y= 0, z= NULL"); |
|
314
|
|
|
|
|
|
|
{ |
|
315
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
316
|
|
|
|
|
|
|
double x; |
|
317
|
|
|
|
|
|
|
double y; |
|
318
|
|
|
|
|
|
|
SV* z; |
|
319
|
|
|
|
|
|
|
|
|
320
|
316
|
50
|
|
|
|
|
if (items < 2) |
|
321
|
0
|
|
|
|
|
|
x = 0; |
|
322
|
|
|
|
|
|
|
else { |
|
323
|
632
|
|
|
|
|
|
x = (double)SvNV(ST(1)) |
|
324
|
316
|
100
|
|
|
|
|
; |
|
|
|
50
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
} |
|
326
|
|
|
|
|
|
|
|
|
327
|
316
|
50
|
|
|
|
|
if (items < 3) |
|
328
|
0
|
|
|
|
|
|
y = 0; |
|
329
|
|
|
|
|
|
|
else { |
|
330
|
632
|
|
|
|
|
|
y = (double)SvNV(ST(2)) |
|
331
|
316
|
100
|
|
|
|
|
; |
|
|
|
50
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
} |
|
333
|
|
|
|
|
|
|
|
|
334
|
316
|
100
|
|
|
|
|
if (items < 4) |
|
335
|
309
|
|
|
|
|
|
z = NULL; |
|
336
|
|
|
|
|
|
|
else { |
|
337
|
7
|
|
|
|
|
|
z = ST(3) |
|
338
|
7
|
|
|
|
|
|
; |
|
339
|
|
|
|
|
|
|
} |
|
340
|
|
|
|
|
|
|
#line 7 "./xsi/Coordinate.xsi" |
|
341
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
342
|
|
|
|
|
|
|
RETVAL = new Coordinate(x, y, z ? SvNV(z) : DoubleNotANumber); |
|
343
|
|
|
|
|
|
|
#line 344 "Geos.xs.cc" |
|
344
|
|
|
|
|
|
|
{ |
|
345
|
|
|
|
|
|
|
SV * RETVALSV; |
|
346
|
316
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
347
|
316
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
348
|
316
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
349
|
|
|
|
|
|
|
} |
|
350
|
|
|
|
|
|
|
} |
|
351
|
316
|
|
|
|
|
|
XSRETURN(1); |
|
352
|
316
|
50
|
|
|
|
|
}); } |
|
353
|
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
|
|
356
|
16
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_x) { xs::throw_guard(aTHX_ cv, [=]() |
|
357
|
|
|
|
|
|
|
{ |
|
358
|
8
|
|
|
|
|
|
dVAR; dXSARGS; |
|
359
|
8
|
|
|
|
|
|
dXSI32; |
|
360
|
8
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
361
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
362
|
|
|
|
|
|
|
{ |
|
363
|
|
|
|
|
|
|
double RETVAL; |
|
364
|
8
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
365
|
8
|
50
|
|
|
|
|
Coordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
; |
|
367
|
|
|
|
|
|
|
SV* newval; |
|
368
|
|
|
|
|
|
|
|
|
369
|
8
|
50
|
|
|
|
|
if (items < 2) |
|
370
|
8
|
|
|
|
|
|
newval = NULL; |
|
371
|
|
|
|
|
|
|
else { |
|
372
|
0
|
|
|
|
|
|
newval = ST(1) |
|
373
|
0
|
|
|
|
|
|
; |
|
374
|
|
|
|
|
|
|
} |
|
375
|
|
|
|
|
|
|
#line 11 "./xsi/Coordinate.xsi" |
|
376
|
|
|
|
|
|
|
double* val; |
|
377
|
|
|
|
|
|
|
switch (ix) { |
|
378
|
|
|
|
|
|
|
case 0: val = &THIS->x; break; |
|
379
|
|
|
|
|
|
|
case 1: val = &THIS->y; break; |
|
380
|
|
|
|
|
|
|
default: val = &THIS->z; break; |
|
381
|
|
|
|
|
|
|
} |
|
382
|
|
|
|
|
|
|
if (newval) { |
|
383
|
|
|
|
|
|
|
if (SvREADONLY(ST(0))) throw "cannot modify readonly object"; |
|
384
|
|
|
|
|
|
|
*val = SvNV(newval); |
|
385
|
|
|
|
|
|
|
} |
|
386
|
|
|
|
|
|
|
RETVAL = *val; |
|
387
|
|
|
|
|
|
|
#line 388 "Geos.xs.cc" |
|
388
|
8
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
} |
|
390
|
8
|
|
|
|
|
|
XSRETURN(1); |
|
391
|
8
|
50
|
|
|
|
|
}); } |
|
392
|
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
|
|
395
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_setNull) { xs::throw_guard(aTHX_ cv, [=]() |
|
396
|
|
|
|
|
|
|
{ |
|
397
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
398
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
399
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
400
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
401
|
0
|
|
|
|
|
|
SP -= items; |
|
402
|
|
|
|
|
|
|
{ |
|
403
|
0
|
0
|
|
|
|
|
Coordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
; |
|
405
|
|
|
|
|
|
|
#line 25 "./xsi/Coordinate.xsi" |
|
406
|
|
|
|
|
|
|
if (SvREADONLY(ST(0))) throw "cannot modify readonly object"; |
|
407
|
|
|
|
|
|
|
THIS->setNull(); |
|
408
|
|
|
|
|
|
|
#line 409 "Geos.xs.cc" |
|
409
|
0
|
|
|
|
|
|
PUTBACK; |
|
410
|
0
|
|
|
|
|
|
return; |
|
411
|
|
|
|
|
|
|
} |
|
412
|
0
|
0
|
|
|
|
|
}); } |
|
413
|
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
|
|
416
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_isNull) { xs::throw_guard(aTHX_ cv, [=]() |
|
417
|
|
|
|
|
|
|
{ |
|
418
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
419
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
420
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
421
|
|
|
|
|
|
|
{ |
|
422
|
|
|
|
|
|
|
bool RETVAL; |
|
423
|
3
|
50
|
|
|
|
|
Coordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
; |
|
425
|
|
|
|
|
|
|
#line 29 "./xsi/Coordinate.xsi" |
|
426
|
|
|
|
|
|
|
RETVAL = THIS->isNull(); |
|
427
|
|
|
|
|
|
|
#line 428 "Geos.xs.cc" |
|
428
|
3
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
429
|
|
|
|
|
|
|
} |
|
430
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
431
|
3
|
50
|
|
|
|
|
}); } |
|
432
|
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
|
|
435
|
20
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_equals) { xs::throw_guard(aTHX_ cv, [=]() |
|
436
|
|
|
|
|
|
|
{ |
|
437
|
10
|
|
|
|
|
|
dVAR; dXSARGS; |
|
438
|
10
|
50
|
|
|
|
|
if (items != 2) |
|
439
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
440
|
|
|
|
|
|
|
{ |
|
441
|
|
|
|
|
|
|
bool RETVAL; |
|
442
|
10
|
50
|
|
|
|
|
Coordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
443
|
|
|
|
|
|
|
; |
|
444
|
10
|
50
|
|
|
|
|
Coordinate& other = xs::in(aTHX_ ST(1)); |
|
445
|
|
|
|
|
|
|
; |
|
446
|
|
|
|
|
|
|
#line 31 "./xsi/Coordinate.xsi" |
|
447
|
|
|
|
|
|
|
RETVAL = THIS->equals(other); |
|
448
|
|
|
|
|
|
|
#line 449 "Geos.xs.cc" |
|
449
|
10
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
450
|
|
|
|
|
|
|
} |
|
451
|
10
|
|
|
|
|
|
XSRETURN(1); |
|
452
|
10
|
50
|
|
|
|
|
}); } |
|
453
|
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
|
|
455
|
|
|
|
|
|
|
|
|
456
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_equals2D) { xs::throw_guard(aTHX_ cv, [=]() |
|
457
|
|
|
|
|
|
|
{ |
|
458
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
459
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
460
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
461
|
|
|
|
|
|
|
{ |
|
462
|
|
|
|
|
|
|
bool RETVAL; |
|
463
|
6
|
50
|
|
|
|
|
Coordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
; |
|
465
|
6
|
50
|
|
|
|
|
Coordinate& other = xs::in(aTHX_ ST(1)); |
|
466
|
|
|
|
|
|
|
; |
|
467
|
|
|
|
|
|
|
#line 33 "./xsi/Coordinate.xsi" |
|
468
|
|
|
|
|
|
|
RETVAL = THIS->equals2D(other); |
|
469
|
|
|
|
|
|
|
#line 470 "Geos.xs.cc" |
|
470
|
6
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
471
|
|
|
|
|
|
|
} |
|
472
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
473
|
6
|
50
|
|
|
|
|
}); } |
|
474
|
|
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
|
|
476
|
|
|
|
|
|
|
|
|
477
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_equals3D) { xs::throw_guard(aTHX_ cv, [=]() |
|
478
|
|
|
|
|
|
|
{ |
|
479
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
480
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
481
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
482
|
|
|
|
|
|
|
{ |
|
483
|
|
|
|
|
|
|
bool RETVAL; |
|
484
|
6
|
50
|
|
|
|
|
Coordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
485
|
|
|
|
|
|
|
; |
|
486
|
6
|
50
|
|
|
|
|
Coordinate& other = xs::in(aTHX_ ST(1)); |
|
487
|
|
|
|
|
|
|
; |
|
488
|
|
|
|
|
|
|
#line 35 "./xsi/Coordinate.xsi" |
|
489
|
|
|
|
|
|
|
RETVAL = THIS->equals3D(other); |
|
490
|
|
|
|
|
|
|
#line 491 "Geos.xs.cc" |
|
491
|
6
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
492
|
|
|
|
|
|
|
} |
|
493
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
494
|
6
|
50
|
|
|
|
|
}); } |
|
495
|
|
|
|
|
|
|
|
|
496
|
|
|
|
|
|
|
|
|
497
|
|
|
|
|
|
|
|
|
498
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_compareTo) { xs::throw_guard(aTHX_ cv, [=]() |
|
499
|
|
|
|
|
|
|
{ |
|
500
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
501
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
502
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
503
|
|
|
|
|
|
|
{ |
|
504
|
|
|
|
|
|
|
int RETVAL; |
|
505
|
6
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
506
|
6
|
50
|
|
|
|
|
Coordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
507
|
|
|
|
|
|
|
; |
|
508
|
6
|
50
|
|
|
|
|
Coordinate& other = xs::in(aTHX_ ST(1)); |
|
509
|
|
|
|
|
|
|
; |
|
510
|
|
|
|
|
|
|
#line 37 "./xsi/Coordinate.xsi" |
|
511
|
|
|
|
|
|
|
RETVAL = THIS->compareTo(other); |
|
512
|
|
|
|
|
|
|
#line 513 "Geos.xs.cc" |
|
513
|
6
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
514
|
|
|
|
|
|
|
} |
|
515
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
516
|
6
|
50
|
|
|
|
|
}); } |
|
517
|
|
|
|
|
|
|
|
|
518
|
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
|
|
520
|
96
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_eq) { xs::throw_guard(aTHX_ cv, [=]() |
|
521
|
|
|
|
|
|
|
{ |
|
522
|
48
|
|
|
|
|
|
dVAR; dXSARGS; |
|
523
|
48
|
50
|
|
|
|
|
if (items != 3) |
|
524
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other_arg, SV*"); |
|
525
|
|
|
|
|
|
|
{ |
|
526
|
|
|
|
|
|
|
bool RETVAL; |
|
527
|
48
|
50
|
|
|
|
|
Coordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
528
|
|
|
|
|
|
|
; |
|
529
|
96
|
|
|
|
|
|
Sv other_arg = ST(1) |
|
530
|
|
|
|
|
|
|
; |
|
531
|
|
|
|
|
|
|
#line 40 "./xsi/Coordinate.xsi" |
|
532
|
|
|
|
|
|
|
auto* other = xs::in(other_arg); |
|
533
|
|
|
|
|
|
|
RETVAL = other ? THIS->equals(*other) : false; |
|
534
|
|
|
|
|
|
|
#line 535 "Geos.xs.cc" |
|
535
|
48
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
536
|
|
|
|
|
|
|
} |
|
537
|
48
|
|
|
|
|
|
XSRETURN(1); |
|
538
|
48
|
50
|
|
|
|
|
}); } |
|
539
|
|
|
|
|
|
|
|
|
540
|
|
|
|
|
|
|
|
|
541
|
|
|
|
|
|
|
|
|
542
|
264
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_toString) { xs::throw_guard(aTHX_ cv, [=]() |
|
543
|
|
|
|
|
|
|
{ |
|
544
|
132
|
|
|
|
|
|
dVAR; dXSARGS; |
|
545
|
132
|
50
|
|
|
|
|
if (items < 1) |
|
546
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
547
|
|
|
|
|
|
|
{ |
|
548
|
264
|
|
|
|
|
|
std::string RETVAL; |
|
549
|
132
|
100
|
|
|
|
|
dXSTARG; |
|
|
|
50
|
|
|
|
|
|
|
550
|
132
|
50
|
|
|
|
|
Coordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
; |
|
552
|
|
|
|
|
|
|
#line 45 "./xsi/Coordinate.xsi" |
|
553
|
|
|
|
|
|
|
RETVAL = THIS->toString(); |
|
554
|
|
|
|
|
|
|
#line 555 "Geos.xs.cc" |
|
555
|
132
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
556
|
|
|
|
|
|
|
} |
|
557
|
132
|
|
|
|
|
|
XSRETURN(1); |
|
558
|
132
|
50
|
|
|
|
|
}); } |
|
559
|
|
|
|
|
|
|
|
|
560
|
|
|
|
|
|
|
|
|
561
|
|
|
|
|
|
|
|
|
562
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_distance) { xs::throw_guard(aTHX_ cv, [=]() |
|
563
|
|
|
|
|
|
|
{ |
|
564
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
565
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
566
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
567
|
|
|
|
|
|
|
{ |
|
568
|
|
|
|
|
|
|
double RETVAL; |
|
569
|
6
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
570
|
6
|
50
|
|
|
|
|
Coordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
571
|
|
|
|
|
|
|
; |
|
572
|
6
|
50
|
|
|
|
|
Coordinate& other = xs::in(aTHX_ ST(1)); |
|
573
|
|
|
|
|
|
|
; |
|
574
|
|
|
|
|
|
|
#line 47 "./xsi/Coordinate.xsi" |
|
575
|
|
|
|
|
|
|
RETVAL = THIS->distance(other); |
|
576
|
|
|
|
|
|
|
#line 577 "Geos.xs.cc" |
|
577
|
6
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
578
|
|
|
|
|
|
|
} |
|
579
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
580
|
6
|
50
|
|
|
|
|
}); } |
|
581
|
|
|
|
|
|
|
|
|
582
|
|
|
|
|
|
|
|
|
583
|
|
|
|
|
|
|
|
|
584
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_hashCode) { xs::throw_guard(aTHX_ cv, [=]() |
|
585
|
|
|
|
|
|
|
{ |
|
586
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
587
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
588
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
589
|
|
|
|
|
|
|
{ |
|
590
|
|
|
|
|
|
|
int RETVAL; |
|
591
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
592
|
0
|
0
|
|
|
|
|
Coordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
; |
|
594
|
|
|
|
|
|
|
#line 49 "./xsi/Coordinate.xsi" |
|
595
|
|
|
|
|
|
|
RETVAL = THIS->hashCode(); |
|
596
|
|
|
|
|
|
|
#line 597 "Geos.xs.cc" |
|
597
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
} |
|
599
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
600
|
0
|
0
|
|
|
|
|
}); } |
|
601
|
|
|
|
|
|
|
|
|
602
|
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
|
|
604
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Coordinate_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
605
|
|
|
|
|
|
|
{ |
|
606
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
607
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
608
|
|
|
|
|
|
|
{ |
|
609
|
|
|
|
|
|
|
int RETVAL; |
|
610
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
611
|
|
|
|
|
|
|
#line 51 "./xsi/Coordinate.xsi" |
|
612
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
613
|
|
|
|
|
|
|
#line 614 "Geos.xs.cc" |
|
614
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
615
|
|
|
|
|
|
|
} |
|
616
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
617
|
0
|
0
|
|
|
|
|
}); } |
|
618
|
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
|
|
620
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/Coordinate.xsi' */ |
|
621
|
|
|
|
|
|
|
|
|
622
|
|
|
|
|
|
|
|
|
623
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/Dimension.xsi' from 'Geos.xs' */ |
|
624
|
|
|
|
|
|
|
|
|
625
|
|
|
|
|
|
|
|
|
626
|
|
|
|
|
|
|
|
|
627
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Dimension_toDimensionSymbol) { xs::throw_guard(aTHX_ cv, [=]() |
|
628
|
|
|
|
|
|
|
{ |
|
629
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
630
|
7
|
50
|
|
|
|
|
if (items != 1) |
|
631
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "value"); |
|
632
|
|
|
|
|
|
|
{ |
|
633
|
14
|
|
|
|
|
|
string RETVAL; |
|
634
|
7
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
635
|
7
|
50
|
|
|
|
|
int value = (int)SvIV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
636
|
|
|
|
|
|
|
; |
|
637
|
|
|
|
|
|
|
#line 5 "./xsi/Dimension.xsi" |
|
638
|
|
|
|
|
|
|
char c = Dimension::toDimensionSymbol(value); |
|
639
|
|
|
|
|
|
|
RETVAL = c; |
|
640
|
|
|
|
|
|
|
#line 641 "Geos.xs.cc" |
|
641
|
6
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
642
|
|
|
|
|
|
|
} |
|
643
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
644
|
7
|
50
|
|
|
|
|
}); } |
|
645
|
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
|
|
647
|
|
|
|
|
|
|
|
|
648
|
16
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Dimension_toDimensionValue) { xs::throw_guard(aTHX_ cv, [=]() |
|
649
|
|
|
|
|
|
|
{ |
|
650
|
8
|
|
|
|
|
|
dVAR; dXSARGS; |
|
651
|
8
|
50
|
|
|
|
|
if (items != 1) |
|
652
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "value"); |
|
653
|
|
|
|
|
|
|
{ |
|
654
|
|
|
|
|
|
|
int RETVAL; |
|
655
|
8
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
656
|
16
|
|
|
|
|
|
string value; |
|
657
|
|
|
|
|
|
|
|
|
658
|
|
|
|
|
|
|
{ STRLEN __value_len; |
|
659
|
8
|
50
|
|
|
|
|
const char* __value_buf = SvPV(ST(0), __value_len); |
|
|
|
0
|
|
|
|
|
|
|
660
|
8
|
50
|
|
|
|
|
value.assign(__value_buf, __value_len); } |
|
661
|
|
|
|
|
|
|
; |
|
662
|
|
|
|
|
|
|
#line 10 "./xsi/Dimension.xsi" |
|
663
|
|
|
|
|
|
|
if (value.size() != 1) throw "string of one char is expected"; |
|
664
|
|
|
|
|
|
|
RETVAL = Dimension::toDimensionValue(value[0]); |
|
665
|
|
|
|
|
|
|
#line 666 "Geos.xs.cc" |
|
666
|
6
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
667
|
|
|
|
|
|
|
} |
|
668
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
669
|
8
|
50
|
|
|
|
|
}); } |
|
670
|
|
|
|
|
|
|
|
|
671
|
|
|
|
|
|
|
|
|
672
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/Dimension.xsi' */ |
|
673
|
|
|
|
|
|
|
|
|
674
|
|
|
|
|
|
|
|
|
675
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/Envelope.xsi' from 'Geos.xs' */ |
|
676
|
|
|
|
|
|
|
|
|
677
|
|
|
|
|
|
|
|
|
678
|
|
|
|
|
|
|
|
|
679
|
84
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
680
|
|
|
|
|
|
|
{ |
|
681
|
42
|
|
|
|
|
|
dVAR; dXSARGS; |
|
682
|
42
|
50
|
|
|
|
|
if (items < 1 || items > 5) |
|
|
|
50
|
|
|
|
|
|
|
683
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg1= Sv(), arg2= NULL, arg3= NULL, arg4= NULL"); |
|
684
|
|
|
|
|
|
|
{ |
|
685
|
|
|
|
|
|
|
Envelope * RETVAL; |
|
686
|
84
|
|
|
|
|
|
Sv arg1; |
|
687
|
|
|
|
|
|
|
SV* arg2; |
|
688
|
|
|
|
|
|
|
SV* arg3; |
|
689
|
|
|
|
|
|
|
SV* arg4; |
|
690
|
|
|
|
|
|
|
|
|
691
|
42
|
100
|
|
|
|
|
if (items < 2) |
|
692
|
1
|
|
|
|
|
|
arg1 = Sv(); |
|
693
|
|
|
|
|
|
|
else { |
|
694
|
41
|
|
|
|
|
|
arg1 = ST(1) |
|
695
|
41
|
50
|
|
|
|
|
; |
|
696
|
|
|
|
|
|
|
} |
|
697
|
|
|
|
|
|
|
|
|
698
|
42
|
100
|
|
|
|
|
if (items < 3) |
|
699
|
3
|
|
|
|
|
|
arg2 = NULL; |
|
700
|
|
|
|
|
|
|
else { |
|
701
|
39
|
|
|
|
|
|
arg2 = ST(2) |
|
702
|
39
|
|
|
|
|
|
; |
|
703
|
|
|
|
|
|
|
} |
|
704
|
|
|
|
|
|
|
|
|
705
|
42
|
100
|
|
|
|
|
if (items < 4) |
|
706
|
6
|
|
|
|
|
|
arg3 = NULL; |
|
707
|
|
|
|
|
|
|
else { |
|
708
|
36
|
|
|
|
|
|
arg3 = ST(3) |
|
709
|
36
|
|
|
|
|
|
; |
|
710
|
|
|
|
|
|
|
} |
|
711
|
|
|
|
|
|
|
|
|
712
|
42
|
100
|
|
|
|
|
if (items < 5) |
|
713
|
6
|
|
|
|
|
|
arg4 = NULL; |
|
714
|
|
|
|
|
|
|
else { |
|
715
|
36
|
|
|
|
|
|
arg4 = ST(4) |
|
716
|
36
|
|
|
|
|
|
; |
|
717
|
|
|
|
|
|
|
} |
|
718
|
|
|
|
|
|
|
#line 5 "./xsi/Envelope.xsi" |
|
719
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
720
|
|
|
|
|
|
|
if (items == 1) RETVAL = new Envelope(); |
|
721
|
|
|
|
|
|
|
else if (items == 2) { |
|
722
|
|
|
|
|
|
|
if (!arg1.is_simple()) { |
|
723
|
|
|
|
|
|
|
auto& c = xs::in(arg1); |
|
724
|
|
|
|
|
|
|
RETVAL = new Envelope(c); |
|
725
|
|
|
|
|
|
|
} |
|
726
|
|
|
|
|
|
|
else { |
|
727
|
|
|
|
|
|
|
if(!arg1) throw("undef not allowed"); |
|
728
|
|
|
|
|
|
|
panda::string_view sw = Simple(arg1); |
|
729
|
|
|
|
|
|
|
std::string str { sw.begin(), sw.end() }; |
|
730
|
|
|
|
|
|
|
RETVAL = new Envelope(str); |
|
731
|
|
|
|
|
|
|
} |
|
732
|
|
|
|
|
|
|
} |
|
733
|
|
|
|
|
|
|
else if (items == 3) { |
|
734
|
|
|
|
|
|
|
auto& c1 = xs::in(arg1); |
|
735
|
|
|
|
|
|
|
auto& c2 = xs::in(arg2); |
|
736
|
|
|
|
|
|
|
RETVAL = new Envelope(c1, c2); |
|
737
|
|
|
|
|
|
|
} |
|
738
|
|
|
|
|
|
|
else if (items == 5) RETVAL = new Envelope(Simple(arg1), Simple(arg2), Simple(arg3), Simple(arg4)); |
|
739
|
|
|
|
|
|
|
else throw ("unsupported constructor"); |
|
740
|
|
|
|
|
|
|
#line 741 "Geos.xs.cc" |
|
741
|
|
|
|
|
|
|
{ |
|
742
|
|
|
|
|
|
|
SV * RETVALSV; |
|
743
|
41
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
744
|
41
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
745
|
41
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
746
|
|
|
|
|
|
|
} |
|
747
|
|
|
|
|
|
|
} |
|
748
|
41
|
|
|
|
|
|
XSRETURN(1); |
|
749
|
42
|
50
|
|
|
|
|
}); } |
|
750
|
|
|
|
|
|
|
|
|
751
|
|
|
|
|
|
|
|
|
752
|
|
|
|
|
|
|
|
|
753
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_init) { xs::throw_guard(aTHX_ cv, [=]() |
|
754
|
|
|
|
|
|
|
{ |
|
755
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
756
|
6
|
50
|
|
|
|
|
if (items < 1 || items > 5) |
|
|
|
50
|
|
|
|
|
|
|
757
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1= NULL, arg2= NULL, arg3= NULL, arg4= NULL"); |
|
758
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
759
|
6
|
|
|
|
|
|
SP -= items; |
|
760
|
|
|
|
|
|
|
{ |
|
761
|
6
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
762
|
|
|
|
|
|
|
; |
|
763
|
|
|
|
|
|
|
SV* arg1; |
|
764
|
|
|
|
|
|
|
SV* arg2; |
|
765
|
|
|
|
|
|
|
SV* arg3; |
|
766
|
|
|
|
|
|
|
SV* arg4; |
|
767
|
|
|
|
|
|
|
|
|
768
|
6
|
100
|
|
|
|
|
if (items < 2) |
|
769
|
3
|
|
|
|
|
|
arg1 = NULL; |
|
770
|
|
|
|
|
|
|
else { |
|
771
|
3
|
|
|
|
|
|
arg1 = ST(1) |
|
772
|
3
|
|
|
|
|
|
; |
|
773
|
|
|
|
|
|
|
} |
|
774
|
|
|
|
|
|
|
|
|
775
|
6
|
100
|
|
|
|
|
if (items < 3) |
|
776
|
4
|
|
|
|
|
|
arg2 = NULL; |
|
777
|
|
|
|
|
|
|
else { |
|
778
|
2
|
|
|
|
|
|
arg2 = ST(2) |
|
779
|
2
|
|
|
|
|
|
; |
|
780
|
|
|
|
|
|
|
} |
|
781
|
|
|
|
|
|
|
|
|
782
|
6
|
100
|
|
|
|
|
if (items < 4) |
|
783
|
5
|
|
|
|
|
|
arg3 = NULL; |
|
784
|
|
|
|
|
|
|
else { |
|
785
|
1
|
|
|
|
|
|
arg3 = ST(3) |
|
786
|
1
|
|
|
|
|
|
; |
|
787
|
|
|
|
|
|
|
} |
|
788
|
|
|
|
|
|
|
|
|
789
|
6
|
100
|
|
|
|
|
if (items < 5) |
|
790
|
5
|
|
|
|
|
|
arg4 = NULL; |
|
791
|
|
|
|
|
|
|
else { |
|
792
|
1
|
|
|
|
|
|
arg4 = ST(4) |
|
793
|
1
|
|
|
|
|
|
; |
|
794
|
|
|
|
|
|
|
} |
|
795
|
|
|
|
|
|
|
#line 28 "./xsi/Envelope.xsi" |
|
796
|
|
|
|
|
|
|
if (items == 1) THIS->init(); |
|
797
|
|
|
|
|
|
|
else if (items == 2) { |
|
798
|
|
|
|
|
|
|
auto& c = xs::in(arg1); |
|
799
|
|
|
|
|
|
|
THIS->init(c); |
|
800
|
|
|
|
|
|
|
} |
|
801
|
|
|
|
|
|
|
else if (items == 3) { |
|
802
|
|
|
|
|
|
|
auto c1 = xs::in(arg1); |
|
803
|
|
|
|
|
|
|
auto c2 = xs::in(arg2); |
|
804
|
|
|
|
|
|
|
THIS->init(c1, c2); |
|
805
|
|
|
|
|
|
|
} |
|
806
|
|
|
|
|
|
|
else if (items == 5) THIS->init(Simple(arg1), Simple(arg2), Simple(arg3), Simple(arg4)); |
|
807
|
|
|
|
|
|
|
else throw ("unsupported arguments"); |
|
808
|
|
|
|
|
|
|
#line 809 "Geos.xs.cc" |
|
809
|
6
|
|
|
|
|
|
PUTBACK; |
|
810
|
6
|
|
|
|
|
|
return; |
|
811
|
|
|
|
|
|
|
} |
|
812
|
6
|
50
|
|
|
|
|
}); } |
|
813
|
|
|
|
|
|
|
|
|
814
|
|
|
|
|
|
|
|
|
815
|
|
|
|
|
|
|
|
|
816
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_setToNull) { xs::throw_guard(aTHX_ cv, [=]() |
|
817
|
|
|
|
|
|
|
{ |
|
818
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
819
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
820
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
821
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
822
|
1
|
|
|
|
|
|
SP -= items; |
|
823
|
|
|
|
|
|
|
{ |
|
824
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
825
|
|
|
|
|
|
|
; |
|
826
|
|
|
|
|
|
|
#line 42 "./xsi/Envelope.xsi" |
|
827
|
|
|
|
|
|
|
THIS->setToNull(); |
|
828
|
|
|
|
|
|
|
#line 829 "Geos.xs.cc" |
|
829
|
1
|
|
|
|
|
|
PUTBACK; |
|
830
|
1
|
|
|
|
|
|
return; |
|
831
|
|
|
|
|
|
|
} |
|
832
|
1
|
50
|
|
|
|
|
}); } |
|
833
|
|
|
|
|
|
|
|
|
834
|
|
|
|
|
|
|
|
|
835
|
|
|
|
|
|
|
|
|
836
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_getArea) { xs::throw_guard(aTHX_ cv, [=]() |
|
837
|
|
|
|
|
|
|
{ |
|
838
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
839
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
840
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
841
|
|
|
|
|
|
|
{ |
|
842
|
|
|
|
|
|
|
double RETVAL; |
|
843
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
844
|
2
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
845
|
|
|
|
|
|
|
; |
|
846
|
|
|
|
|
|
|
#line 44 "./xsi/Envelope.xsi" |
|
847
|
|
|
|
|
|
|
RETVAL = THIS->getArea(); |
|
848
|
|
|
|
|
|
|
#line 849 "Geos.xs.cc" |
|
849
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
850
|
|
|
|
|
|
|
} |
|
851
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
852
|
2
|
50
|
|
|
|
|
}); } |
|
853
|
|
|
|
|
|
|
|
|
854
|
|
|
|
|
|
|
|
|
855
|
|
|
|
|
|
|
|
|
856
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_getMaxY) { xs::throw_guard(aTHX_ cv, [=]() |
|
857
|
|
|
|
|
|
|
{ |
|
858
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
859
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
860
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
861
|
|
|
|
|
|
|
{ |
|
862
|
|
|
|
|
|
|
double RETVAL; |
|
863
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
864
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
865
|
|
|
|
|
|
|
; |
|
866
|
|
|
|
|
|
|
#line 46 "./xsi/Envelope.xsi" |
|
867
|
|
|
|
|
|
|
RETVAL = THIS->getMaxY(); |
|
868
|
|
|
|
|
|
|
#line 869 "Geos.xs.cc" |
|
869
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
870
|
|
|
|
|
|
|
} |
|
871
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
872
|
1
|
50
|
|
|
|
|
}); } |
|
873
|
|
|
|
|
|
|
|
|
874
|
|
|
|
|
|
|
|
|
875
|
|
|
|
|
|
|
|
|
876
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_getMaxX) { xs::throw_guard(aTHX_ cv, [=]() |
|
877
|
|
|
|
|
|
|
{ |
|
878
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
879
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
880
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
881
|
|
|
|
|
|
|
{ |
|
882
|
|
|
|
|
|
|
double RETVAL; |
|
883
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
884
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
885
|
|
|
|
|
|
|
; |
|
886
|
|
|
|
|
|
|
#line 48 "./xsi/Envelope.xsi" |
|
887
|
|
|
|
|
|
|
RETVAL = THIS->getMaxX(); |
|
888
|
|
|
|
|
|
|
#line 889 "Geos.xs.cc" |
|
889
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
890
|
|
|
|
|
|
|
} |
|
891
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
892
|
1
|
50
|
|
|
|
|
}); } |
|
893
|
|
|
|
|
|
|
|
|
894
|
|
|
|
|
|
|
|
|
895
|
|
|
|
|
|
|
|
|
896
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_getMinY) { xs::throw_guard(aTHX_ cv, [=]() |
|
897
|
|
|
|
|
|
|
{ |
|
898
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
899
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
900
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
901
|
|
|
|
|
|
|
{ |
|
902
|
|
|
|
|
|
|
double RETVAL; |
|
903
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
904
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
905
|
|
|
|
|
|
|
; |
|
906
|
|
|
|
|
|
|
#line 50 "./xsi/Envelope.xsi" |
|
907
|
|
|
|
|
|
|
RETVAL = THIS->getMinY(); |
|
908
|
|
|
|
|
|
|
#line 909 "Geos.xs.cc" |
|
909
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
910
|
|
|
|
|
|
|
} |
|
911
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
912
|
1
|
50
|
|
|
|
|
}); } |
|
913
|
|
|
|
|
|
|
|
|
914
|
|
|
|
|
|
|
|
|
915
|
|
|
|
|
|
|
|
|
916
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_getMinX) { xs::throw_guard(aTHX_ cv, [=]() |
|
917
|
|
|
|
|
|
|
{ |
|
918
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
919
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
920
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
921
|
|
|
|
|
|
|
{ |
|
922
|
|
|
|
|
|
|
double RETVAL; |
|
923
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
924
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
925
|
|
|
|
|
|
|
; |
|
926
|
|
|
|
|
|
|
#line 52 "./xsi/Envelope.xsi" |
|
927
|
|
|
|
|
|
|
RETVAL = THIS->getMinX(); |
|
928
|
|
|
|
|
|
|
#line 929 "Geos.xs.cc" |
|
929
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
930
|
|
|
|
|
|
|
} |
|
931
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
932
|
1
|
50
|
|
|
|
|
}); } |
|
933
|
|
|
|
|
|
|
|
|
934
|
|
|
|
|
|
|
|
|
935
|
|
|
|
|
|
|
|
|
936
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_getWidth) { xs::throw_guard(aTHX_ cv, [=]() |
|
937
|
|
|
|
|
|
|
{ |
|
938
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
939
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
940
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
941
|
|
|
|
|
|
|
{ |
|
942
|
|
|
|
|
|
|
double RETVAL; |
|
943
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
944
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
945
|
|
|
|
|
|
|
; |
|
946
|
|
|
|
|
|
|
#line 54 "./xsi/Envelope.xsi" |
|
947
|
|
|
|
|
|
|
RETVAL = THIS->getWidth(); |
|
948
|
|
|
|
|
|
|
#line 949 "Geos.xs.cc" |
|
949
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
950
|
|
|
|
|
|
|
} |
|
951
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
952
|
1
|
50
|
|
|
|
|
}); } |
|
953
|
|
|
|
|
|
|
|
|
954
|
|
|
|
|
|
|
|
|
955
|
|
|
|
|
|
|
|
|
956
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_getHeight) { xs::throw_guard(aTHX_ cv, [=]() |
|
957
|
|
|
|
|
|
|
{ |
|
958
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
959
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
960
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
961
|
|
|
|
|
|
|
{ |
|
962
|
|
|
|
|
|
|
double RETVAL; |
|
963
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
964
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
965
|
|
|
|
|
|
|
; |
|
966
|
|
|
|
|
|
|
#line 56 "./xsi/Envelope.xsi" |
|
967
|
|
|
|
|
|
|
RETVAL = THIS->getHeight(); |
|
968
|
|
|
|
|
|
|
#line 969 "Geos.xs.cc" |
|
969
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
970
|
|
|
|
|
|
|
} |
|
971
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
972
|
1
|
50
|
|
|
|
|
}); } |
|
973
|
|
|
|
|
|
|
|
|
974
|
|
|
|
|
|
|
|
|
975
|
|
|
|
|
|
|
|
|
976
|
18
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_isNull) { xs::throw_guard(aTHX_ cv, [=]() |
|
977
|
|
|
|
|
|
|
{ |
|
978
|
9
|
|
|
|
|
|
dVAR; dXSARGS; |
|
979
|
9
|
50
|
|
|
|
|
if (items != 1) |
|
980
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
981
|
|
|
|
|
|
|
{ |
|
982
|
|
|
|
|
|
|
bool RETVAL; |
|
983
|
9
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
984
|
|
|
|
|
|
|
; |
|
985
|
|
|
|
|
|
|
#line 58 "./xsi/Envelope.xsi" |
|
986
|
|
|
|
|
|
|
RETVAL = THIS->isNull(); |
|
987
|
|
|
|
|
|
|
#line 988 "Geos.xs.cc" |
|
988
|
9
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
989
|
|
|
|
|
|
|
} |
|
990
|
9
|
|
|
|
|
|
XSRETURN(1); |
|
991
|
9
|
50
|
|
|
|
|
}); } |
|
992
|
|
|
|
|
|
|
|
|
993
|
|
|
|
|
|
|
|
|
994
|
|
|
|
|
|
|
|
|
995
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_hashCode) { xs::throw_guard(aTHX_ cv, [=]() |
|
996
|
|
|
|
|
|
|
{ |
|
997
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
998
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
999
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1000
|
|
|
|
|
|
|
{ |
|
1001
|
|
|
|
|
|
|
int RETVAL; |
|
1002
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1003
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1004
|
|
|
|
|
|
|
; |
|
1005
|
|
|
|
|
|
|
#line 60 "./xsi/Envelope.xsi" |
|
1006
|
|
|
|
|
|
|
RETVAL = THIS->hashCode(); |
|
1007
|
|
|
|
|
|
|
#line 1008 "Geos.xs.cc" |
|
1008
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1009
|
|
|
|
|
|
|
} |
|
1010
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1011
|
1
|
50
|
|
|
|
|
}); } |
|
1012
|
|
|
|
|
|
|
|
|
1013
|
|
|
|
|
|
|
|
|
1014
|
|
|
|
|
|
|
|
|
1015
|
28
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_toString) { xs::throw_guard(aTHX_ cv, [=]() |
|
1016
|
|
|
|
|
|
|
{ |
|
1017
|
14
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1018
|
14
|
50
|
|
|
|
|
if (items < 1) |
|
1019
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
1020
|
|
|
|
|
|
|
{ |
|
1021
|
28
|
|
|
|
|
|
std::string RETVAL; |
|
1022
|
14
|
100
|
|
|
|
|
dXSTARG; |
|
|
|
50
|
|
|
|
|
|
|
1023
|
14
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1024
|
|
|
|
|
|
|
; |
|
1025
|
|
|
|
|
|
|
#line 62 "./xsi/Envelope.xsi" |
|
1026
|
|
|
|
|
|
|
RETVAL = THIS->toString(); |
|
1027
|
|
|
|
|
|
|
#line 1028 "Geos.xs.cc" |
|
1028
|
14
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1029
|
|
|
|
|
|
|
} |
|
1030
|
14
|
|
|
|
|
|
XSRETURN(1); |
|
1031
|
14
|
50
|
|
|
|
|
}); } |
|
1032
|
|
|
|
|
|
|
|
|
1033
|
|
|
|
|
|
|
|
|
1034
|
|
|
|
|
|
|
|
|
1035
|
16
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_eq) { xs::throw_guard(aTHX_ cv, [=]() |
|
1036
|
|
|
|
|
|
|
{ |
|
1037
|
8
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1038
|
8
|
50
|
|
|
|
|
if (items != 3) |
|
1039
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other_arg, SV*"); |
|
1040
|
|
|
|
|
|
|
{ |
|
1041
|
|
|
|
|
|
|
bool RETVAL; |
|
1042
|
8
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1043
|
|
|
|
|
|
|
; |
|
1044
|
16
|
|
|
|
|
|
Sv other_arg = ST(1) |
|
1045
|
|
|
|
|
|
|
; |
|
1046
|
|
|
|
|
|
|
#line 65 "./xsi/Envelope.xsi" |
|
1047
|
|
|
|
|
|
|
auto other = xs::in(other_arg); |
|
1048
|
|
|
|
|
|
|
RETVAL = other ? THIS->equals(other) : false; |
|
1049
|
|
|
|
|
|
|
#line 1050 "Geos.xs.cc" |
|
1050
|
8
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1051
|
|
|
|
|
|
|
} |
|
1052
|
8
|
|
|
|
|
|
XSRETURN(1); |
|
1053
|
8
|
50
|
|
|
|
|
}); } |
|
1054
|
|
|
|
|
|
|
|
|
1055
|
|
|
|
|
|
|
|
|
1056
|
|
|
|
|
|
|
|
|
1057
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_centre) { xs::throw_guard(aTHX_ cv, [=]() |
|
1058
|
|
|
|
|
|
|
{ |
|
1059
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1060
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1061
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1062
|
|
|
|
|
|
|
{ |
|
1063
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
1064
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1065
|
|
|
|
|
|
|
; |
|
1066
|
|
|
|
|
|
|
#line 70 "./xsi/Envelope.xsi" |
|
1067
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1068
|
|
|
|
|
|
|
Coordinate c; |
|
1069
|
|
|
|
|
|
|
if (!THIS->centre(c)) XSRETURN_UNDEF; |
|
1070
|
|
|
|
|
|
|
RETVAL = new Coordinate(c); |
|
1071
|
|
|
|
|
|
|
#line 1072 "Geos.xs.cc" |
|
1072
|
|
|
|
|
|
|
{ |
|
1073
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1074
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
1075
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1076
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
1077
|
|
|
|
|
|
|
} |
|
1078
|
|
|
|
|
|
|
} |
|
1079
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1080
|
1
|
50
|
|
|
|
|
}); } |
|
1081
|
|
|
|
|
|
|
|
|
1082
|
|
|
|
|
|
|
|
|
1083
|
|
|
|
|
|
|
|
|
1084
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_contains) { xs::throw_guard(aTHX_ cv, [=]() |
|
1085
|
|
|
|
|
|
|
{ |
|
1086
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1087
|
7
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
1088
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1, arg2= NULL"); |
|
1089
|
|
|
|
|
|
|
{ |
|
1090
|
|
|
|
|
|
|
bool RETVAL; |
|
1091
|
7
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1092
|
|
|
|
|
|
|
; |
|
1093
|
7
|
|
|
|
|
|
SV* arg1 = ST(1) |
|
1094
|
|
|
|
|
|
|
; |
|
1095
|
|
|
|
|
|
|
SV* arg2; |
|
1096
|
|
|
|
|
|
|
|
|
1097
|
7
|
100
|
|
|
|
|
if (items < 3) |
|
1098
|
5
|
|
|
|
|
|
arg2 = NULL; |
|
1099
|
|
|
|
|
|
|
else { |
|
1100
|
2
|
|
|
|
|
|
arg2 = ST(2) |
|
1101
|
2
|
|
|
|
|
|
; |
|
1102
|
|
|
|
|
|
|
} |
|
1103
|
|
|
|
|
|
|
#line 76 "./xsi/Envelope.xsi" |
|
1104
|
|
|
|
|
|
|
if (!arg2) { |
|
1105
|
|
|
|
|
|
|
Object obj {arg1}; |
|
1106
|
|
|
|
|
|
|
if(!obj) throw("wrong argument"); |
|
1107
|
|
|
|
|
|
|
if (obj.stash().name() == "Geo::Geos::Envelope") { |
|
1108
|
|
|
|
|
|
|
auto e = xs::in(obj); |
|
1109
|
|
|
|
|
|
|
RETVAL = THIS->contains(e); |
|
1110
|
|
|
|
|
|
|
} |
|
1111
|
|
|
|
|
|
|
else { |
|
1112
|
|
|
|
|
|
|
auto& c = xs::in(obj); |
|
1113
|
|
|
|
|
|
|
RETVAL = THIS->contains(c); |
|
1114
|
|
|
|
|
|
|
} |
|
1115
|
|
|
|
|
|
|
} |
|
1116
|
|
|
|
|
|
|
else RETVAL = THIS->contains(Simple(arg1), Simple(arg2)); |
|
1117
|
|
|
|
|
|
|
#line 1118 "Geos.xs.cc" |
|
1118
|
7
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1119
|
|
|
|
|
|
|
} |
|
1120
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
1121
|
7
|
50
|
|
|
|
|
}); } |
|
1122
|
|
|
|
|
|
|
|
|
1123
|
|
|
|
|
|
|
|
|
1124
|
|
|
|
|
|
|
|
|
1125
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_covers) { xs::throw_guard(aTHX_ cv, [=]() |
|
1126
|
|
|
|
|
|
|
{ |
|
1127
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1128
|
7
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
1129
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1, arg2= NULL"); |
|
1130
|
|
|
|
|
|
|
{ |
|
1131
|
|
|
|
|
|
|
bool RETVAL; |
|
1132
|
7
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1133
|
|
|
|
|
|
|
; |
|
1134
|
7
|
|
|
|
|
|
SV* arg1 = ST(1) |
|
1135
|
|
|
|
|
|
|
; |
|
1136
|
|
|
|
|
|
|
SV* arg2; |
|
1137
|
|
|
|
|
|
|
|
|
1138
|
7
|
100
|
|
|
|
|
if (items < 3) |
|
1139
|
5
|
|
|
|
|
|
arg2 = NULL; |
|
1140
|
|
|
|
|
|
|
else { |
|
1141
|
2
|
|
|
|
|
|
arg2 = ST(2) |
|
1142
|
2
|
|
|
|
|
|
; |
|
1143
|
|
|
|
|
|
|
} |
|
1144
|
|
|
|
|
|
|
#line 92 "./xsi/Envelope.xsi" |
|
1145
|
|
|
|
|
|
|
if (!arg2) { |
|
1146
|
|
|
|
|
|
|
Object obj {arg1}; |
|
1147
|
|
|
|
|
|
|
if(!obj) throw("wrong argument"); |
|
1148
|
|
|
|
|
|
|
if (obj.stash().name() == "Geo::Geos::Envelope") { |
|
1149
|
|
|
|
|
|
|
auto e = xs::in(obj); |
|
1150
|
|
|
|
|
|
|
RETVAL = THIS->covers(e); |
|
1151
|
|
|
|
|
|
|
} |
|
1152
|
|
|
|
|
|
|
else { |
|
1153
|
|
|
|
|
|
|
auto& c = xs::in(obj); |
|
1154
|
|
|
|
|
|
|
RETVAL = THIS->covers(c); |
|
1155
|
|
|
|
|
|
|
} |
|
1156
|
|
|
|
|
|
|
} |
|
1157
|
|
|
|
|
|
|
else RETVAL = THIS->covers(Simple(arg1), Simple(arg2)); |
|
1158
|
|
|
|
|
|
|
#line 1159 "Geos.xs.cc" |
|
1159
|
7
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1160
|
|
|
|
|
|
|
} |
|
1161
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
1162
|
7
|
50
|
|
|
|
|
}); } |
|
1163
|
|
|
|
|
|
|
|
|
1164
|
|
|
|
|
|
|
|
|
1165
|
|
|
|
|
|
|
|
|
1166
|
22
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_intersects) { xs::throw_guard(aTHX_ cv, [=]() |
|
1167
|
|
|
|
|
|
|
{ |
|
1168
|
11
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1169
|
11
|
50
|
|
|
|
|
if (items < 2 || items > 4) |
|
|
|
50
|
|
|
|
|
|
|
1170
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "maybe_self, arg1, arg2= NULL, arg3= NULL"); |
|
1171
|
|
|
|
|
|
|
{ |
|
1172
|
|
|
|
|
|
|
bool RETVAL; |
|
1173
|
22
|
50
|
|
|
|
|
Object maybe_self = ST(0); |
|
1174
|
11
|
50
|
|
|
|
|
if (!maybe_self && SvOK(ST(0))) throw "arg is not a blessed reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1175
|
0
|
|
|
|
|
|
; |
|
1176
|
11
|
|
|
|
|
|
SV* arg1 = ST(1) |
|
1177
|
|
|
|
|
|
|
; |
|
1178
|
|
|
|
|
|
|
SV* arg2; |
|
1179
|
|
|
|
|
|
|
SV* arg3; |
|
1180
|
|
|
|
|
|
|
|
|
1181
|
11
|
100
|
|
|
|
|
if (items < 3) |
|
1182
|
5
|
|
|
|
|
|
arg2 = NULL; |
|
1183
|
|
|
|
|
|
|
else { |
|
1184
|
6
|
|
|
|
|
|
arg2 = ST(2) |
|
1185
|
6
|
|
|
|
|
|
; |
|
1186
|
|
|
|
|
|
|
} |
|
1187
|
|
|
|
|
|
|
|
|
1188
|
11
|
100
|
|
|
|
|
if (items < 4) |
|
1189
|
9
|
|
|
|
|
|
arg3 = NULL; |
|
1190
|
|
|
|
|
|
|
else { |
|
1191
|
2
|
|
|
|
|
|
arg3 = ST(3) |
|
1192
|
2
|
|
|
|
|
|
; |
|
1193
|
|
|
|
|
|
|
} |
|
1194
|
|
|
|
|
|
|
#line 108 "./xsi/Envelope.xsi" |
|
1195
|
|
|
|
|
|
|
if (!maybe_self) throw("wrong argument"); |
|
1196
|
|
|
|
|
|
|
auto arg0_stash = maybe_self.stash().name(); |
|
1197
|
|
|
|
|
|
|
if (arg0_stash != "Geo::Geos::Envelope") { |
|
1198
|
|
|
|
|
|
|
// static method |
|
1199
|
|
|
|
|
|
|
auto& p1 = xs::in(maybe_self); |
|
1200
|
|
|
|
|
|
|
auto& p2 = xs::in(arg1); |
|
1201
|
|
|
|
|
|
|
if (!arg3) { |
|
1202
|
|
|
|
|
|
|
auto& q = xs::in(arg2); |
|
1203
|
|
|
|
|
|
|
RETVAL = Envelope::intersects(p1, p2, q); |
|
1204
|
|
|
|
|
|
|
} |
|
1205
|
|
|
|
|
|
|
else { |
|
1206
|
|
|
|
|
|
|
auto& q1 = xs::in(arg2); |
|
1207
|
|
|
|
|
|
|
auto& q2 = xs::in(arg3); |
|
1208
|
|
|
|
|
|
|
RETVAL = Envelope::intersects(p1, p2, q1, q2); |
|
1209
|
|
|
|
|
|
|
} |
|
1210
|
|
|
|
|
|
|
} else { |
|
1211
|
|
|
|
|
|
|
// object method |
|
1212
|
|
|
|
|
|
|
Envelope& self = xs::in(maybe_self); |
|
1213
|
|
|
|
|
|
|
if (!arg2) { |
|
1214
|
|
|
|
|
|
|
Object obj {arg1}; |
|
1215
|
|
|
|
|
|
|
if(!obj) throw("wrong argument"); |
|
1216
|
|
|
|
|
|
|
if (obj.stash().name() == "Geo::Geos::Envelope") { |
|
1217
|
|
|
|
|
|
|
auto& e = xs::in(obj); |
|
1218
|
|
|
|
|
|
|
RETVAL = self.intersects(&e); |
|
1219
|
|
|
|
|
|
|
} |
|
1220
|
|
|
|
|
|
|
else { |
|
1221
|
|
|
|
|
|
|
auto& c = xs::in(obj); |
|
1222
|
|
|
|
|
|
|
RETVAL = self.intersects(c); |
|
1223
|
|
|
|
|
|
|
} |
|
1224
|
|
|
|
|
|
|
} |
|
1225
|
|
|
|
|
|
|
else RETVAL = self.intersects(Simple(arg1), Simple(arg2)); |
|
1226
|
|
|
|
|
|
|
} |
|
1227
|
|
|
|
|
|
|
#line 1228 "Geos.xs.cc" |
|
1228
|
11
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1229
|
|
|
|
|
|
|
} |
|
1230
|
11
|
|
|
|
|
|
XSRETURN(1); |
|
1231
|
11
|
50
|
|
|
|
|
}); } |
|
1232
|
|
|
|
|
|
|
|
|
1233
|
|
|
|
|
|
|
|
|
1234
|
|
|
|
|
|
|
|
|
1235
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_expandToInclude) { xs::throw_guard(aTHX_ cv, [=]() |
|
1236
|
|
|
|
|
|
|
{ |
|
1237
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1238
|
3
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
1239
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1, arg2= NULL"); |
|
1240
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1241
|
3
|
|
|
|
|
|
SP -= items; |
|
1242
|
|
|
|
|
|
|
{ |
|
1243
|
3
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1244
|
|
|
|
|
|
|
; |
|
1245
|
3
|
|
|
|
|
|
SV* arg1 = ST(1) |
|
1246
|
|
|
|
|
|
|
; |
|
1247
|
|
|
|
|
|
|
SV* arg2; |
|
1248
|
|
|
|
|
|
|
|
|
1249
|
3
|
100
|
|
|
|
|
if (items < 3) |
|
1250
|
2
|
|
|
|
|
|
arg2 = NULL; |
|
1251
|
|
|
|
|
|
|
else { |
|
1252
|
1
|
|
|
|
|
|
arg2 = ST(2) |
|
1253
|
1
|
|
|
|
|
|
; |
|
1254
|
|
|
|
|
|
|
} |
|
1255
|
|
|
|
|
|
|
#line 143 "./xsi/Envelope.xsi" |
|
1256
|
|
|
|
|
|
|
if (!arg2) { |
|
1257
|
|
|
|
|
|
|
Object obj {arg1}; |
|
1258
|
|
|
|
|
|
|
if(!obj) throw("wrong argument"); |
|
1259
|
|
|
|
|
|
|
if (obj.stash().name() == "Geo::Geos::Envelope") { |
|
1260
|
|
|
|
|
|
|
auto& e = xs::in(obj); |
|
1261
|
|
|
|
|
|
|
THIS->expandToInclude(&e); |
|
1262
|
|
|
|
|
|
|
} |
|
1263
|
|
|
|
|
|
|
else { |
|
1264
|
|
|
|
|
|
|
auto& c = xs::in(obj); |
|
1265
|
|
|
|
|
|
|
THIS->expandToInclude(c); |
|
1266
|
|
|
|
|
|
|
} |
|
1267
|
|
|
|
|
|
|
} |
|
1268
|
|
|
|
|
|
|
else THIS->expandToInclude(Simple(arg1), Simple(arg2)); |
|
1269
|
|
|
|
|
|
|
#line 1270 "Geos.xs.cc" |
|
1270
|
3
|
|
|
|
|
|
PUTBACK; |
|
1271
|
3
|
|
|
|
|
|
return; |
|
1272
|
|
|
|
|
|
|
} |
|
1273
|
3
|
50
|
|
|
|
|
}); } |
|
1274
|
|
|
|
|
|
|
|
|
1275
|
|
|
|
|
|
|
|
|
1276
|
|
|
|
|
|
|
|
|
1277
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_distance) { xs::throw_guard(aTHX_ cv, [=]() |
|
1278
|
|
|
|
|
|
|
{ |
|
1279
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1280
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
1281
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
1282
|
|
|
|
|
|
|
{ |
|
1283
|
|
|
|
|
|
|
double RETVAL; |
|
1284
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1285
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1286
|
|
|
|
|
|
|
; |
|
1287
|
1
|
50
|
|
|
|
|
Envelope& other = xs::in(aTHX_ ST(1)); |
|
1288
|
|
|
|
|
|
|
; |
|
1289
|
|
|
|
|
|
|
#line 158 "./xsi/Envelope.xsi" |
|
1290
|
|
|
|
|
|
|
RETVAL = THIS->distance(&other); |
|
1291
|
|
|
|
|
|
|
#line 1292 "Geos.xs.cc" |
|
1292
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1293
|
|
|
|
|
|
|
} |
|
1294
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1295
|
1
|
50
|
|
|
|
|
}); } |
|
1296
|
|
|
|
|
|
|
|
|
1297
|
|
|
|
|
|
|
|
|
1298
|
|
|
|
|
|
|
|
|
1299
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_translate) { xs::throw_guard(aTHX_ cv, [=]() |
|
1300
|
|
|
|
|
|
|
{ |
|
1301
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1302
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
1303
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, tX, tY"); |
|
1304
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1305
|
1
|
|
|
|
|
|
SP -= items; |
|
1306
|
|
|
|
|
|
|
{ |
|
1307
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1308
|
|
|
|
|
|
|
; |
|
1309
|
1
|
50
|
|
|
|
|
double tX = (double)SvNV(ST(1)) |
|
1310
|
|
|
|
|
|
|
; |
|
1311
|
1
|
50
|
|
|
|
|
double tY = (double)SvNV(ST(2)) |
|
1312
|
|
|
|
|
|
|
; |
|
1313
|
|
|
|
|
|
|
#line 160 "./xsi/Envelope.xsi" |
|
1314
|
|
|
|
|
|
|
THIS->translate(tX, tY); |
|
1315
|
|
|
|
|
|
|
#line 1316 "Geos.xs.cc" |
|
1316
|
1
|
|
|
|
|
|
PUTBACK; |
|
1317
|
1
|
|
|
|
|
|
return; |
|
1318
|
|
|
|
|
|
|
} |
|
1319
|
1
|
50
|
|
|
|
|
}); } |
|
1320
|
|
|
|
|
|
|
|
|
1321
|
|
|
|
|
|
|
|
|
1322
|
|
|
|
|
|
|
|
|
1323
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_expandBy) { xs::throw_guard(aTHX_ cv, [=]() |
|
1324
|
|
|
|
|
|
|
{ |
|
1325
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1326
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
1327
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, dX, dY"); |
|
1328
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1329
|
1
|
|
|
|
|
|
SP -= items; |
|
1330
|
|
|
|
|
|
|
{ |
|
1331
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1332
|
|
|
|
|
|
|
; |
|
1333
|
1
|
50
|
|
|
|
|
double dX = (double)SvNV(ST(1)) |
|
1334
|
|
|
|
|
|
|
; |
|
1335
|
1
|
50
|
|
|
|
|
double dY = (double)SvNV(ST(2)) |
|
1336
|
|
|
|
|
|
|
; |
|
1337
|
|
|
|
|
|
|
#line 162 "./xsi/Envelope.xsi" |
|
1338
|
|
|
|
|
|
|
THIS->expandBy(dX, dY); |
|
1339
|
|
|
|
|
|
|
#line 1340 "Geos.xs.cc" |
|
1340
|
1
|
|
|
|
|
|
PUTBACK; |
|
1341
|
1
|
|
|
|
|
|
return; |
|
1342
|
|
|
|
|
|
|
} |
|
1343
|
1
|
50
|
|
|
|
|
}); } |
|
1344
|
|
|
|
|
|
|
|
|
1345
|
|
|
|
|
|
|
|
|
1346
|
|
|
|
|
|
|
|
|
1347
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_intersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
1348
|
|
|
|
|
|
|
{ |
|
1349
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1350
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
1351
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
1352
|
|
|
|
|
|
|
{ |
|
1353
|
|
|
|
|
|
|
Envelope * RETVAL; |
|
1354
|
1
|
50
|
|
|
|
|
Envelope* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1355
|
|
|
|
|
|
|
; |
|
1356
|
1
|
50
|
|
|
|
|
Envelope& other = xs::in(aTHX_ ST(1)); |
|
1357
|
|
|
|
|
|
|
; |
|
1358
|
|
|
|
|
|
|
#line 165 "./xsi/Envelope.xsi" |
|
1359
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1360
|
|
|
|
|
|
|
Envelope e; |
|
1361
|
|
|
|
|
|
|
if (!THIS->intersection(other, e)) XSRETURN_UNDEF; |
|
1362
|
|
|
|
|
|
|
RETVAL = new Envelope(e); |
|
1363
|
|
|
|
|
|
|
#line 1364 "Geos.xs.cc" |
|
1364
|
|
|
|
|
|
|
{ |
|
1365
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1366
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
1367
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1368
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
1369
|
|
|
|
|
|
|
} |
|
1370
|
|
|
|
|
|
|
} |
|
1371
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1372
|
1
|
50
|
|
|
|
|
}); } |
|
1373
|
|
|
|
|
|
|
|
|
1374
|
|
|
|
|
|
|
|
|
1375
|
|
|
|
|
|
|
|
|
1376
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Envelope_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
1377
|
|
|
|
|
|
|
{ |
|
1378
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1379
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
1380
|
|
|
|
|
|
|
{ |
|
1381
|
|
|
|
|
|
|
int RETVAL; |
|
1382
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1383
|
|
|
|
|
|
|
#line 170 "./xsi/Envelope.xsi" |
|
1384
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
1385
|
|
|
|
|
|
|
#line 1386 "Geos.xs.cc" |
|
1386
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1387
|
|
|
|
|
|
|
} |
|
1388
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
1389
|
0
|
0
|
|
|
|
|
}); } |
|
1390
|
|
|
|
|
|
|
|
|
1391
|
|
|
|
|
|
|
|
|
1392
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/Envelope.xsi' */ |
|
1393
|
|
|
|
|
|
|
|
|
1394
|
|
|
|
|
|
|
|
|
1395
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/PrecisionModel.xsi' from 'Geos.xs' */ |
|
1396
|
|
|
|
|
|
|
|
|
1397
|
|
|
|
|
|
|
|
|
1398
|
|
|
|
|
|
|
|
|
1399
|
56
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__PrecisionModel_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
1400
|
|
|
|
|
|
|
{ |
|
1401
|
28
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1402
|
28
|
50
|
|
|
|
|
if (items < 1 || items > 4) |
|
|
|
50
|
|
|
|
|
|
|
1403
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg1= NULL, arg2= NULL, arg3= NULL"); |
|
1404
|
|
|
|
|
|
|
{ |
|
1405
|
|
|
|
|
|
|
PrecisionModel * RETVAL; |
|
1406
|
|
|
|
|
|
|
SV* arg1; |
|
1407
|
|
|
|
|
|
|
SV* arg2; |
|
1408
|
|
|
|
|
|
|
SV* arg3; |
|
1409
|
|
|
|
|
|
|
|
|
1410
|
28
|
100
|
|
|
|
|
if (items < 2) |
|
1411
|
15
|
|
|
|
|
|
arg1 = NULL; |
|
1412
|
|
|
|
|
|
|
else { |
|
1413
|
13
|
|
|
|
|
|
arg1 = ST(1) |
|
1414
|
13
|
|
|
|
|
|
; |
|
1415
|
|
|
|
|
|
|
} |
|
1416
|
|
|
|
|
|
|
|
|
1417
|
28
|
100
|
|
|
|
|
if (items < 3) |
|
1418
|
27
|
|
|
|
|
|
arg2 = NULL; |
|
1419
|
|
|
|
|
|
|
else { |
|
1420
|
1
|
|
|
|
|
|
arg2 = ST(2) |
|
1421
|
1
|
|
|
|
|
|
; |
|
1422
|
|
|
|
|
|
|
} |
|
1423
|
|
|
|
|
|
|
|
|
1424
|
28
|
100
|
|
|
|
|
if (items < 4) |
|
1425
|
27
|
|
|
|
|
|
arg3 = NULL; |
|
1426
|
|
|
|
|
|
|
else { |
|
1427
|
1
|
|
|
|
|
|
arg3 = ST(3) |
|
1428
|
1
|
|
|
|
|
|
; |
|
1429
|
|
|
|
|
|
|
} |
|
1430
|
|
|
|
|
|
|
#line 5 "./xsi/PrecisionModel.xsi" |
|
1431
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1432
|
|
|
|
|
|
|
if (!arg1) RETVAL = new PrecisionModel(); |
|
1433
|
|
|
|
|
|
|
else { |
|
1434
|
|
|
|
|
|
|
if(SvIOK(arg1)) { |
|
1435
|
|
|
|
|
|
|
PrecisionModel::Type model = static_cast(SvIV(arg1)); |
|
1436
|
|
|
|
|
|
|
RETVAL = new PrecisionModel(model); |
|
1437
|
|
|
|
|
|
|
} |
|
1438
|
|
|
|
|
|
|
else { |
|
1439
|
|
|
|
|
|
|
double scale = SvNV(arg1); |
|
1440
|
|
|
|
|
|
|
if (arg2) { |
|
1441
|
|
|
|
|
|
|
if(!arg3) throw("undef not allowed"); |
|
1442
|
|
|
|
|
|
|
double offsetX = SvNV(arg2); |
|
1443
|
|
|
|
|
|
|
double offsetY = SvNV(arg3); |
|
1444
|
|
|
|
|
|
|
RETVAL = new PrecisionModel(scale, offsetX, offsetY); |
|
1445
|
|
|
|
|
|
|
} |
|
1446
|
|
|
|
|
|
|
else RETVAL = new PrecisionModel(scale); |
|
1447
|
|
|
|
|
|
|
} |
|
1448
|
|
|
|
|
|
|
} |
|
1449
|
|
|
|
|
|
|
#line 1450 "Geos.xs.cc" |
|
1450
|
|
|
|
|
|
|
{ |
|
1451
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1452
|
28
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
1453
|
28
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1454
|
28
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1455
|
|
|
|
|
|
|
} |
|
1456
|
|
|
|
|
|
|
} |
|
1457
|
28
|
|
|
|
|
|
XSRETURN(1); |
|
1458
|
28
|
50
|
|
|
|
|
}); } |
|
1459
|
|
|
|
|
|
|
|
|
1460
|
|
|
|
|
|
|
|
|
1461
|
|
|
|
|
|
|
|
|
1462
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__PrecisionModel_getScale) { xs::throw_guard(aTHX_ cv, [=]() |
|
1463
|
|
|
|
|
|
|
{ |
|
1464
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1465
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
1466
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1467
|
|
|
|
|
|
|
{ |
|
1468
|
|
|
|
|
|
|
double RETVAL; |
|
1469
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1470
|
2
|
50
|
|
|
|
|
PrecisionModel* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1471
|
|
|
|
|
|
|
; |
|
1472
|
|
|
|
|
|
|
#line 24 "./xsi/PrecisionModel.xsi" |
|
1473
|
|
|
|
|
|
|
RETVAL = THIS->getScale(); |
|
1474
|
|
|
|
|
|
|
#line 1475 "Geos.xs.cc" |
|
1475
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1476
|
|
|
|
|
|
|
} |
|
1477
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1478
|
2
|
50
|
|
|
|
|
}); } |
|
1479
|
|
|
|
|
|
|
|
|
1480
|
|
|
|
|
|
|
|
|
1481
|
|
|
|
|
|
|
|
|
1482
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__PrecisionModel_getOffsetX) { xs::throw_guard(aTHX_ cv, [=]() |
|
1483
|
|
|
|
|
|
|
{ |
|
1484
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1485
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
1486
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1487
|
|
|
|
|
|
|
{ |
|
1488
|
|
|
|
|
|
|
double RETVAL; |
|
1489
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1490
|
0
|
0
|
|
|
|
|
PrecisionModel* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1491
|
|
|
|
|
|
|
; |
|
1492
|
|
|
|
|
|
|
#line 26 "./xsi/PrecisionModel.xsi" |
|
1493
|
|
|
|
|
|
|
RETVAL = THIS->getOffsetX(); |
|
1494
|
|
|
|
|
|
|
#line 1495 "Geos.xs.cc" |
|
1495
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1496
|
|
|
|
|
|
|
} |
|
1497
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
1498
|
0
|
0
|
|
|
|
|
}); } |
|
1499
|
|
|
|
|
|
|
|
|
1500
|
|
|
|
|
|
|
|
|
1501
|
|
|
|
|
|
|
|
|
1502
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__PrecisionModel_getOffsetY) { xs::throw_guard(aTHX_ cv, [=]() |
|
1503
|
|
|
|
|
|
|
{ |
|
1504
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1505
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
1506
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1507
|
|
|
|
|
|
|
{ |
|
1508
|
|
|
|
|
|
|
double RETVAL; |
|
1509
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1510
|
0
|
0
|
|
|
|
|
PrecisionModel* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1511
|
|
|
|
|
|
|
; |
|
1512
|
|
|
|
|
|
|
#line 28 "./xsi/PrecisionModel.xsi" |
|
1513
|
|
|
|
|
|
|
RETVAL = THIS->getOffsetY(); |
|
1514
|
|
|
|
|
|
|
#line 1515 "Geos.xs.cc" |
|
1515
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1516
|
|
|
|
|
|
|
} |
|
1517
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
1518
|
0
|
0
|
|
|
|
|
}); } |
|
1519
|
|
|
|
|
|
|
|
|
1520
|
|
|
|
|
|
|
|
|
1521
|
|
|
|
|
|
|
|
|
1522
|
22
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__PrecisionModel_isFloating) { xs::throw_guard(aTHX_ cv, [=]() |
|
1523
|
|
|
|
|
|
|
{ |
|
1524
|
11
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1525
|
11
|
50
|
|
|
|
|
if (items != 1) |
|
1526
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1527
|
|
|
|
|
|
|
{ |
|
1528
|
|
|
|
|
|
|
bool RETVAL; |
|
1529
|
11
|
50
|
|
|
|
|
PrecisionModel* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1530
|
|
|
|
|
|
|
; |
|
1531
|
|
|
|
|
|
|
#line 30 "./xsi/PrecisionModel.xsi" |
|
1532
|
|
|
|
|
|
|
RETVAL = THIS->isFloating(); |
|
1533
|
|
|
|
|
|
|
#line 1534 "Geos.xs.cc" |
|
1534
|
11
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1535
|
|
|
|
|
|
|
} |
|
1536
|
11
|
|
|
|
|
|
XSRETURN(1); |
|
1537
|
11
|
50
|
|
|
|
|
}); } |
|
1538
|
|
|
|
|
|
|
|
|
1539
|
|
|
|
|
|
|
|
|
1540
|
|
|
|
|
|
|
|
|
1541
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__PrecisionModel_getMaximumSignificantDigits) { xs::throw_guard(aTHX_ cv, [=]() |
|
1542
|
|
|
|
|
|
|
{ |
|
1543
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1544
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1545
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1546
|
|
|
|
|
|
|
{ |
|
1547
|
|
|
|
|
|
|
int RETVAL; |
|
1548
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1549
|
1
|
50
|
|
|
|
|
PrecisionModel* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1550
|
|
|
|
|
|
|
; |
|
1551
|
|
|
|
|
|
|
#line 32 "./xsi/PrecisionModel.xsi" |
|
1552
|
|
|
|
|
|
|
RETVAL = THIS->getMaximumSignificantDigits(); |
|
1553
|
|
|
|
|
|
|
#line 1554 "Geos.xs.cc" |
|
1554
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1555
|
|
|
|
|
|
|
} |
|
1556
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1557
|
1
|
50
|
|
|
|
|
}); } |
|
1558
|
|
|
|
|
|
|
|
|
1559
|
|
|
|
|
|
|
|
|
1560
|
|
|
|
|
|
|
|
|
1561
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__PrecisionModel_getType) { xs::throw_guard(aTHX_ cv, [=]() |
|
1562
|
|
|
|
|
|
|
{ |
|
1563
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1564
|
7
|
50
|
|
|
|
|
if (items != 1) |
|
1565
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1566
|
|
|
|
|
|
|
{ |
|
1567
|
|
|
|
|
|
|
int RETVAL; |
|
1568
|
7
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1569
|
7
|
50
|
|
|
|
|
PrecisionModel* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1570
|
|
|
|
|
|
|
; |
|
1571
|
|
|
|
|
|
|
#line 34 "./xsi/PrecisionModel.xsi" |
|
1572
|
|
|
|
|
|
|
RETVAL = THIS->getType(); |
|
1573
|
|
|
|
|
|
|
#line 1574 "Geos.xs.cc" |
|
1574
|
7
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1575
|
|
|
|
|
|
|
} |
|
1576
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
1577
|
7
|
50
|
|
|
|
|
}); } |
|
1578
|
|
|
|
|
|
|
|
|
1579
|
|
|
|
|
|
|
|
|
1580
|
|
|
|
|
|
|
|
|
1581
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__PrecisionModel_makePrecise) { xs::throw_guard(aTHX_ cv, [=]() |
|
1582
|
|
|
|
|
|
|
{ |
|
1583
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1584
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
1585
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, val"); |
|
1586
|
|
|
|
|
|
|
{ |
|
1587
|
|
|
|
|
|
|
double RETVAL; |
|
1588
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1589
|
1
|
50
|
|
|
|
|
PrecisionModel* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1590
|
|
|
|
|
|
|
; |
|
1591
|
1
|
50
|
|
|
|
|
double val = (double)SvNV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1592
|
|
|
|
|
|
|
; |
|
1593
|
|
|
|
|
|
|
#line 36 "./xsi/PrecisionModel.xsi" |
|
1594
|
|
|
|
|
|
|
RETVAL = THIS->makePrecise(val); |
|
1595
|
|
|
|
|
|
|
#line 1596 "Geos.xs.cc" |
|
1596
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1597
|
|
|
|
|
|
|
} |
|
1598
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1599
|
1
|
50
|
|
|
|
|
}); } |
|
1600
|
|
|
|
|
|
|
|
|
1601
|
|
|
|
|
|
|
|
|
1602
|
|
|
|
|
|
|
|
|
1603
|
18
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__PrecisionModel_toString) { xs::throw_guard(aTHX_ cv, [=]() |
|
1604
|
|
|
|
|
|
|
{ |
|
1605
|
9
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1606
|
9
|
50
|
|
|
|
|
if (items < 1) |
|
1607
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
1608
|
|
|
|
|
|
|
{ |
|
1609
|
18
|
|
|
|
|
|
std::string RETVAL; |
|
1610
|
9
|
100
|
|
|
|
|
dXSTARG; |
|
|
|
50
|
|
|
|
|
|
|
1611
|
9
|
50
|
|
|
|
|
PrecisionModel* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1612
|
|
|
|
|
|
|
; |
|
1613
|
|
|
|
|
|
|
#line 38 "./xsi/PrecisionModel.xsi" |
|
1614
|
|
|
|
|
|
|
RETVAL = THIS->toString(); |
|
1615
|
|
|
|
|
|
|
#line 1616 "Geos.xs.cc" |
|
1616
|
9
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1617
|
|
|
|
|
|
|
} |
|
1618
|
9
|
|
|
|
|
|
XSRETURN(1); |
|
1619
|
9
|
50
|
|
|
|
|
}); } |
|
1620
|
|
|
|
|
|
|
|
|
1621
|
|
|
|
|
|
|
|
|
1622
|
|
|
|
|
|
|
|
|
1623
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__PrecisionModel_compareTo) { xs::throw_guard(aTHX_ cv, [=]() |
|
1624
|
|
|
|
|
|
|
{ |
|
1625
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1626
|
3
|
50
|
|
|
|
|
if (items != 2) |
|
1627
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
1628
|
|
|
|
|
|
|
{ |
|
1629
|
|
|
|
|
|
|
int RETVAL; |
|
1630
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1631
|
3
|
50
|
|
|
|
|
PrecisionModel* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1632
|
|
|
|
|
|
|
; |
|
1633
|
3
|
50
|
|
|
|
|
PrecisionModel& other = xs::in(aTHX_ ST(1)); |
|
1634
|
|
|
|
|
|
|
; |
|
1635
|
|
|
|
|
|
|
#line 40 "./xsi/PrecisionModel.xsi" |
|
1636
|
|
|
|
|
|
|
RETVAL = THIS->compareTo(&other); |
|
1637
|
|
|
|
|
|
|
#line 1638 "Geos.xs.cc" |
|
1638
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1639
|
|
|
|
|
|
|
} |
|
1640
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
1641
|
3
|
50
|
|
|
|
|
}); } |
|
1642
|
|
|
|
|
|
|
|
|
1643
|
|
|
|
|
|
|
|
|
1644
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/PrecisionModel.xsi' */ |
|
1645
|
|
|
|
|
|
|
|
|
1646
|
|
|
|
|
|
|
|
|
1647
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/IntersectionMatrix.xsi' from 'Geos.xs' */ |
|
1648
|
|
|
|
|
|
|
|
|
1649
|
|
|
|
|
|
|
|
|
1650
|
|
|
|
|
|
|
|
|
1651
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
1652
|
|
|
|
|
|
|
{ |
|
1653
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1654
|
3
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
1655
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg1= NULL"); |
|
1656
|
|
|
|
|
|
|
{ |
|
1657
|
|
|
|
|
|
|
IntersectionMatrix * RETVAL; |
|
1658
|
|
|
|
|
|
|
SV* arg1; |
|
1659
|
|
|
|
|
|
|
|
|
1660
|
3
|
100
|
|
|
|
|
if (items < 2) |
|
1661
|
1
|
|
|
|
|
|
arg1 = NULL; |
|
1662
|
|
|
|
|
|
|
else { |
|
1663
|
2
|
|
|
|
|
|
arg1 = ST(1) |
|
1664
|
2
|
|
|
|
|
|
; |
|
1665
|
|
|
|
|
|
|
} |
|
1666
|
|
|
|
|
|
|
#line 5 "./xsi/IntersectionMatrix.xsi" |
|
1667
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1668
|
|
|
|
|
|
|
if (!arg1) RETVAL = new IntersectionMatrix(); |
|
1669
|
|
|
|
|
|
|
else { |
|
1670
|
|
|
|
|
|
|
std::string elements { SvPV_nolen(arg1) }; |
|
1671
|
|
|
|
|
|
|
RETVAL = new IntersectionMatrix(elements); |
|
1672
|
|
|
|
|
|
|
} |
|
1673
|
|
|
|
|
|
|
#line 1674 "Geos.xs.cc" |
|
1674
|
|
|
|
|
|
|
{ |
|
1675
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1676
|
3
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
1677
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1678
|
3
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1679
|
|
|
|
|
|
|
} |
|
1680
|
|
|
|
|
|
|
} |
|
1681
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
1682
|
3
|
50
|
|
|
|
|
}); } |
|
1683
|
|
|
|
|
|
|
|
|
1684
|
|
|
|
|
|
|
|
|
1685
|
|
|
|
|
|
|
|
|
1686
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_matches) { xs::throw_guard(aTHX_ cv, [=]() |
|
1687
|
|
|
|
|
|
|
{ |
|
1688
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1689
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
1690
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, requiredDimensionSymbols"); |
|
1691
|
|
|
|
|
|
|
{ |
|
1692
|
|
|
|
|
|
|
bool RETVAL; |
|
1693
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1694
|
|
|
|
|
|
|
; |
|
1695
|
2
|
|
|
|
|
|
std::string requiredDimensionSymbols; |
|
1696
|
|
|
|
|
|
|
|
|
1697
|
|
|
|
|
|
|
{ STRLEN __requiredDimensionSymbols_len; |
|
1698
|
1
|
50
|
|
|
|
|
const char* __requiredDimensionSymbols_buf = SvPV(ST(1), __requiredDimensionSymbols_len); |
|
|
|
0
|
|
|
|
|
|
|
1699
|
1
|
50
|
|
|
|
|
requiredDimensionSymbols.assign(__requiredDimensionSymbols_buf, __requiredDimensionSymbols_len); } |
|
1700
|
|
|
|
|
|
|
; |
|
1701
|
|
|
|
|
|
|
#line 12 "./xsi/IntersectionMatrix.xsi" |
|
1702
|
|
|
|
|
|
|
RETVAL = THIS->matches(requiredDimensionSymbols); |
|
1703
|
|
|
|
|
|
|
#line 1704 "Geos.xs.cc" |
|
1704
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1705
|
|
|
|
|
|
|
} |
|
1706
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1707
|
1
|
50
|
|
|
|
|
}); } |
|
1708
|
|
|
|
|
|
|
|
|
1709
|
|
|
|
|
|
|
|
|
1710
|
|
|
|
|
|
|
|
|
1711
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_add) { xs::throw_guard(aTHX_ cv, [=]() |
|
1712
|
|
|
|
|
|
|
{ |
|
1713
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1714
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
1715
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
1716
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1717
|
0
|
|
|
|
|
|
SP -= items; |
|
1718
|
|
|
|
|
|
|
{ |
|
1719
|
0
|
0
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1720
|
|
|
|
|
|
|
; |
|
1721
|
0
|
|
|
|
|
|
IntersectionMatrix& other = xs::in(aTHX_ ST(1)); |
|
1722
|
|
|
|
|
|
|
; |
|
1723
|
|
|
|
|
|
|
#line 14 "./xsi/IntersectionMatrix.xsi" |
|
1724
|
|
|
|
|
|
|
THIS->add(&other); |
|
1725
|
|
|
|
|
|
|
#line 1726 "Geos.xs.cc" |
|
1726
|
0
|
|
|
|
|
|
PUTBACK; |
|
1727
|
0
|
|
|
|
|
|
return; |
|
1728
|
|
|
|
|
|
|
} |
|
1729
|
0
|
0
|
|
|
|
|
}); } |
|
1730
|
|
|
|
|
|
|
|
|
1731
|
|
|
|
|
|
|
|
|
1732
|
|
|
|
|
|
|
|
|
1733
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_set) { xs::throw_guard(aTHX_ cv, [=]() |
|
1734
|
|
|
|
|
|
|
{ |
|
1735
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1736
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 4) |
|
|
|
50
|
|
|
|
|
|
|
1737
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1, arg2= NULL, arg3= NULL"); |
|
1738
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1739
|
2
|
|
|
|
|
|
SP -= items; |
|
1740
|
|
|
|
|
|
|
{ |
|
1741
|
2
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1742
|
|
|
|
|
|
|
; |
|
1743
|
2
|
|
|
|
|
|
SV* arg1 = ST(1) |
|
1744
|
|
|
|
|
|
|
; |
|
1745
|
|
|
|
|
|
|
SV* arg2; |
|
1746
|
|
|
|
|
|
|
SV* arg3; |
|
1747
|
|
|
|
|
|
|
|
|
1748
|
2
|
100
|
|
|
|
|
if (items < 3) |
|
1749
|
1
|
|
|
|
|
|
arg2 = NULL; |
|
1750
|
|
|
|
|
|
|
else { |
|
1751
|
1
|
|
|
|
|
|
arg2 = ST(2) |
|
1752
|
1
|
|
|
|
|
|
; |
|
1753
|
|
|
|
|
|
|
} |
|
1754
|
|
|
|
|
|
|
|
|
1755
|
2
|
100
|
|
|
|
|
if (items < 4) |
|
1756
|
1
|
|
|
|
|
|
arg3 = NULL; |
|
1757
|
|
|
|
|
|
|
else { |
|
1758
|
1
|
|
|
|
|
|
arg3 = ST(3) |
|
1759
|
1
|
|
|
|
|
|
; |
|
1760
|
|
|
|
|
|
|
} |
|
1761
|
|
|
|
|
|
|
#line 17 "./xsi/IntersectionMatrix.xsi" |
|
1762
|
|
|
|
|
|
|
if(!arg1) throw("undef not allowed"); |
|
1763
|
|
|
|
|
|
|
if (!arg2) { |
|
1764
|
|
|
|
|
|
|
std::string dimensionSymbols { SvPV_nolen(arg1) }; |
|
1765
|
|
|
|
|
|
|
THIS->set(dimensionSymbols); |
|
1766
|
|
|
|
|
|
|
} else { |
|
1767
|
|
|
|
|
|
|
if(!arg3) throw("undef not allowed"); |
|
1768
|
|
|
|
|
|
|
int row = SvIV(arg1); |
|
1769
|
|
|
|
|
|
|
int col = SvIV(arg2); |
|
1770
|
|
|
|
|
|
|
int val = SvIV(arg3); |
|
1771
|
|
|
|
|
|
|
THIS->set(row, col, val); |
|
1772
|
|
|
|
|
|
|
} |
|
1773
|
|
|
|
|
|
|
#line 1774 "Geos.xs.cc" |
|
1774
|
2
|
|
|
|
|
|
PUTBACK; |
|
1775
|
2
|
|
|
|
|
|
return; |
|
1776
|
|
|
|
|
|
|
} |
|
1777
|
2
|
50
|
|
|
|
|
}); } |
|
1778
|
|
|
|
|
|
|
|
|
1779
|
|
|
|
|
|
|
|
|
1780
|
|
|
|
|
|
|
|
|
1781
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_setAtLeast) { xs::throw_guard(aTHX_ cv, [=]() |
|
1782
|
|
|
|
|
|
|
{ |
|
1783
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1784
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 4) |
|
|
|
50
|
|
|
|
|
|
|
1785
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1, arg2= NULL, arg3= NULL"); |
|
1786
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1787
|
2
|
|
|
|
|
|
SP -= items; |
|
1788
|
|
|
|
|
|
|
{ |
|
1789
|
2
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1790
|
|
|
|
|
|
|
; |
|
1791
|
2
|
|
|
|
|
|
SV* arg1 = ST(1) |
|
1792
|
|
|
|
|
|
|
; |
|
1793
|
|
|
|
|
|
|
SV* arg2; |
|
1794
|
|
|
|
|
|
|
SV* arg3; |
|
1795
|
|
|
|
|
|
|
|
|
1796
|
2
|
100
|
|
|
|
|
if (items < 3) |
|
1797
|
1
|
|
|
|
|
|
arg2 = NULL; |
|
1798
|
|
|
|
|
|
|
else { |
|
1799
|
1
|
|
|
|
|
|
arg2 = ST(2) |
|
1800
|
1
|
|
|
|
|
|
; |
|
1801
|
|
|
|
|
|
|
} |
|
1802
|
|
|
|
|
|
|
|
|
1803
|
2
|
100
|
|
|
|
|
if (items < 4) |
|
1804
|
1
|
|
|
|
|
|
arg3 = NULL; |
|
1805
|
|
|
|
|
|
|
else { |
|
1806
|
1
|
|
|
|
|
|
arg3 = ST(3) |
|
1807
|
1
|
|
|
|
|
|
; |
|
1808
|
|
|
|
|
|
|
} |
|
1809
|
|
|
|
|
|
|
#line 31 "./xsi/IntersectionMatrix.xsi" |
|
1810
|
|
|
|
|
|
|
if(!arg1) throw("undef not allowed"); |
|
1811
|
|
|
|
|
|
|
if (!arg2) { |
|
1812
|
|
|
|
|
|
|
std::string dimensionSymbols { SvPV_nolen(arg1) }; |
|
1813
|
|
|
|
|
|
|
THIS->setAtLeast(dimensionSymbols); |
|
1814
|
|
|
|
|
|
|
} else { |
|
1815
|
|
|
|
|
|
|
if(!arg3) throw("undef not allowed"); |
|
1816
|
|
|
|
|
|
|
int row = SvIV(arg1); |
|
1817
|
|
|
|
|
|
|
int col = SvIV(arg2); |
|
1818
|
|
|
|
|
|
|
int val = SvIV(arg3); |
|
1819
|
|
|
|
|
|
|
THIS->setAtLeast(row, col, val); |
|
1820
|
|
|
|
|
|
|
} |
|
1821
|
|
|
|
|
|
|
#line 1822 "Geos.xs.cc" |
|
1822
|
2
|
|
|
|
|
|
PUTBACK; |
|
1823
|
2
|
|
|
|
|
|
return; |
|
1824
|
|
|
|
|
|
|
} |
|
1825
|
2
|
50
|
|
|
|
|
}); } |
|
1826
|
|
|
|
|
|
|
|
|
1827
|
|
|
|
|
|
|
|
|
1828
|
|
|
|
|
|
|
|
|
1829
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_setAll) { xs::throw_guard(aTHX_ cv, [=]() |
|
1830
|
|
|
|
|
|
|
{ |
|
1831
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1832
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
1833
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, dimensionValue"); |
|
1834
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1835
|
1
|
|
|
|
|
|
SP -= items; |
|
1836
|
|
|
|
|
|
|
{ |
|
1837
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1838
|
|
|
|
|
|
|
; |
|
1839
|
1
|
50
|
|
|
|
|
int dimensionValue = (int)SvIV(ST(1)) |
|
1840
|
|
|
|
|
|
|
; |
|
1841
|
|
|
|
|
|
|
#line 44 "./xsi/IntersectionMatrix.xsi" |
|
1842
|
|
|
|
|
|
|
THIS->setAll(dimensionValue); |
|
1843
|
|
|
|
|
|
|
#line 1844 "Geos.xs.cc" |
|
1844
|
1
|
|
|
|
|
|
PUTBACK; |
|
1845
|
1
|
|
|
|
|
|
return; |
|
1846
|
|
|
|
|
|
|
} |
|
1847
|
1
|
50
|
|
|
|
|
}); } |
|
1848
|
|
|
|
|
|
|
|
|
1849
|
|
|
|
|
|
|
|
|
1850
|
|
|
|
|
|
|
|
|
1851
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_setAtLeastIfValid) { xs::throw_guard(aTHX_ cv, [=]() |
|
1852
|
|
|
|
|
|
|
{ |
|
1853
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1854
|
1
|
50
|
|
|
|
|
if (items != 4) |
|
1855
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, row, column, minimumDimensionValue"); |
|
1856
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1857
|
1
|
|
|
|
|
|
SP -= items; |
|
1858
|
|
|
|
|
|
|
{ |
|
1859
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1860
|
|
|
|
|
|
|
; |
|
1861
|
1
|
50
|
|
|
|
|
int row = (int)SvIV(ST(1)) |
|
1862
|
|
|
|
|
|
|
; |
|
1863
|
1
|
50
|
|
|
|
|
int column = (int)SvIV(ST(2)) |
|
1864
|
|
|
|
|
|
|
; |
|
1865
|
1
|
50
|
|
|
|
|
int minimumDimensionValue = (int)SvIV(ST(3)) |
|
1866
|
|
|
|
|
|
|
; |
|
1867
|
|
|
|
|
|
|
#line 46 "./xsi/IntersectionMatrix.xsi" |
|
1868
|
|
|
|
|
|
|
THIS->setAtLeastIfValid(row, column, minimumDimensionValue); |
|
1869
|
|
|
|
|
|
|
#line 1870 "Geos.xs.cc" |
|
1870
|
1
|
|
|
|
|
|
PUTBACK; |
|
1871
|
1
|
|
|
|
|
|
return; |
|
1872
|
|
|
|
|
|
|
} |
|
1873
|
1
|
50
|
|
|
|
|
}); } |
|
1874
|
|
|
|
|
|
|
|
|
1875
|
|
|
|
|
|
|
|
|
1876
|
|
|
|
|
|
|
|
|
1877
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_get) { xs::throw_guard(aTHX_ cv, [=]() |
|
1878
|
|
|
|
|
|
|
{ |
|
1879
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1880
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
1881
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, row, col"); |
|
1882
|
|
|
|
|
|
|
{ |
|
1883
|
|
|
|
|
|
|
int RETVAL; |
|
1884
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1885
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1886
|
|
|
|
|
|
|
; |
|
1887
|
1
|
50
|
|
|
|
|
int row = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1888
|
|
|
|
|
|
|
; |
|
1889
|
1
|
50
|
|
|
|
|
int col = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
1890
|
|
|
|
|
|
|
; |
|
1891
|
|
|
|
|
|
|
#line 48 "./xsi/IntersectionMatrix.xsi" |
|
1892
|
|
|
|
|
|
|
RETVAL = THIS->get(row, col); |
|
1893
|
|
|
|
|
|
|
#line 1894 "Geos.xs.cc" |
|
1894
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1895
|
|
|
|
|
|
|
} |
|
1896
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1897
|
1
|
50
|
|
|
|
|
}); } |
|
1898
|
|
|
|
|
|
|
|
|
1899
|
|
|
|
|
|
|
|
|
1900
|
|
|
|
|
|
|
|
|
1901
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_isDisjoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
1902
|
|
|
|
|
|
|
{ |
|
1903
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1904
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1905
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1906
|
|
|
|
|
|
|
{ |
|
1907
|
|
|
|
|
|
|
bool RETVAL; |
|
1908
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1909
|
|
|
|
|
|
|
; |
|
1910
|
|
|
|
|
|
|
#line 50 "./xsi/IntersectionMatrix.xsi" |
|
1911
|
|
|
|
|
|
|
RETVAL = THIS->isDisjoint(); |
|
1912
|
|
|
|
|
|
|
#line 1913 "Geos.xs.cc" |
|
1913
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1914
|
|
|
|
|
|
|
} |
|
1915
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1916
|
1
|
50
|
|
|
|
|
}); } |
|
1917
|
|
|
|
|
|
|
|
|
1918
|
|
|
|
|
|
|
|
|
1919
|
|
|
|
|
|
|
|
|
1920
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_isIntersects) { xs::throw_guard(aTHX_ cv, [=]() |
|
1921
|
|
|
|
|
|
|
{ |
|
1922
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1923
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1924
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1925
|
|
|
|
|
|
|
{ |
|
1926
|
|
|
|
|
|
|
bool RETVAL; |
|
1927
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1928
|
|
|
|
|
|
|
; |
|
1929
|
|
|
|
|
|
|
#line 52 "./xsi/IntersectionMatrix.xsi" |
|
1930
|
|
|
|
|
|
|
RETVAL = THIS->isIntersects(); |
|
1931
|
|
|
|
|
|
|
#line 1932 "Geos.xs.cc" |
|
1932
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1933
|
|
|
|
|
|
|
} |
|
1934
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1935
|
1
|
50
|
|
|
|
|
}); } |
|
1936
|
|
|
|
|
|
|
|
|
1937
|
|
|
|
|
|
|
|
|
1938
|
|
|
|
|
|
|
|
|
1939
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_isWithin) { xs::throw_guard(aTHX_ cv, [=]() |
|
1940
|
|
|
|
|
|
|
{ |
|
1941
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1942
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1943
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1944
|
|
|
|
|
|
|
{ |
|
1945
|
|
|
|
|
|
|
bool RETVAL; |
|
1946
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1947
|
|
|
|
|
|
|
; |
|
1948
|
|
|
|
|
|
|
#line 54 "./xsi/IntersectionMatrix.xsi" |
|
1949
|
|
|
|
|
|
|
RETVAL = THIS->isWithin(); |
|
1950
|
|
|
|
|
|
|
#line 1951 "Geos.xs.cc" |
|
1951
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1952
|
|
|
|
|
|
|
} |
|
1953
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1954
|
1
|
50
|
|
|
|
|
}); } |
|
1955
|
|
|
|
|
|
|
|
|
1956
|
|
|
|
|
|
|
|
|
1957
|
|
|
|
|
|
|
|
|
1958
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_isContains) { xs::throw_guard(aTHX_ cv, [=]() |
|
1959
|
|
|
|
|
|
|
{ |
|
1960
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1961
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1962
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1963
|
|
|
|
|
|
|
{ |
|
1964
|
|
|
|
|
|
|
bool RETVAL; |
|
1965
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1966
|
|
|
|
|
|
|
; |
|
1967
|
|
|
|
|
|
|
#line 56 "./xsi/IntersectionMatrix.xsi" |
|
1968
|
|
|
|
|
|
|
RETVAL = THIS->isContains(); |
|
1969
|
|
|
|
|
|
|
#line 1970 "Geos.xs.cc" |
|
1970
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1971
|
|
|
|
|
|
|
} |
|
1972
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1973
|
1
|
50
|
|
|
|
|
}); } |
|
1974
|
|
|
|
|
|
|
|
|
1975
|
|
|
|
|
|
|
|
|
1976
|
|
|
|
|
|
|
|
|
1977
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_isCovers) { xs::throw_guard(aTHX_ cv, [=]() |
|
1978
|
|
|
|
|
|
|
{ |
|
1979
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1980
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1981
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1982
|
|
|
|
|
|
|
{ |
|
1983
|
|
|
|
|
|
|
bool RETVAL; |
|
1984
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1985
|
|
|
|
|
|
|
; |
|
1986
|
|
|
|
|
|
|
#line 58 "./xsi/IntersectionMatrix.xsi" |
|
1987
|
|
|
|
|
|
|
RETVAL = THIS->isCovers(); |
|
1988
|
|
|
|
|
|
|
#line 1989 "Geos.xs.cc" |
|
1989
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1990
|
|
|
|
|
|
|
} |
|
1991
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1992
|
1
|
50
|
|
|
|
|
}); } |
|
1993
|
|
|
|
|
|
|
|
|
1994
|
|
|
|
|
|
|
|
|
1995
|
|
|
|
|
|
|
|
|
1996
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_isCoveredBy) { xs::throw_guard(aTHX_ cv, [=]() |
|
1997
|
|
|
|
|
|
|
{ |
|
1998
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1999
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
2000
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2001
|
|
|
|
|
|
|
{ |
|
2002
|
|
|
|
|
|
|
bool RETVAL; |
|
2003
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2004
|
|
|
|
|
|
|
; |
|
2005
|
|
|
|
|
|
|
#line 60 "./xsi/IntersectionMatrix.xsi" |
|
2006
|
|
|
|
|
|
|
RETVAL = THIS->isCoveredBy(); |
|
2007
|
|
|
|
|
|
|
#line 2008 "Geos.xs.cc" |
|
2008
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
2009
|
|
|
|
|
|
|
} |
|
2010
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2011
|
1
|
50
|
|
|
|
|
}); } |
|
2012
|
|
|
|
|
|
|
|
|
2013
|
|
|
|
|
|
|
|
|
2014
|
|
|
|
|
|
|
|
|
2015
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_isTouches) { xs::throw_guard(aTHX_ cv, [=]() |
|
2016
|
|
|
|
|
|
|
{ |
|
2017
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2018
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
2019
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, dimensionOfGeometryA, dimensionOfGeometryB"); |
|
2020
|
|
|
|
|
|
|
{ |
|
2021
|
|
|
|
|
|
|
bool RETVAL; |
|
2022
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2023
|
|
|
|
|
|
|
; |
|
2024
|
1
|
50
|
|
|
|
|
int dimensionOfGeometryA = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
2025
|
|
|
|
|
|
|
; |
|
2026
|
1
|
50
|
|
|
|
|
int dimensionOfGeometryB = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
2027
|
|
|
|
|
|
|
; |
|
2028
|
|
|
|
|
|
|
#line 62 "./xsi/IntersectionMatrix.xsi" |
|
2029
|
|
|
|
|
|
|
RETVAL = THIS->isTouches(dimensionOfGeometryA, dimensionOfGeometryB); |
|
2030
|
|
|
|
|
|
|
#line 2031 "Geos.xs.cc" |
|
2031
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
2032
|
|
|
|
|
|
|
} |
|
2033
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2034
|
1
|
50
|
|
|
|
|
}); } |
|
2035
|
|
|
|
|
|
|
|
|
2036
|
|
|
|
|
|
|
|
|
2037
|
|
|
|
|
|
|
|
|
2038
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_isCrosses) { xs::throw_guard(aTHX_ cv, [=]() |
|
2039
|
|
|
|
|
|
|
{ |
|
2040
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2041
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
2042
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, dimensionOfGeometryA, dimensionOfGeometryB"); |
|
2043
|
|
|
|
|
|
|
{ |
|
2044
|
|
|
|
|
|
|
bool RETVAL; |
|
2045
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2046
|
|
|
|
|
|
|
; |
|
2047
|
1
|
50
|
|
|
|
|
int dimensionOfGeometryA = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
2048
|
|
|
|
|
|
|
; |
|
2049
|
1
|
50
|
|
|
|
|
int dimensionOfGeometryB = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
2050
|
|
|
|
|
|
|
; |
|
2051
|
|
|
|
|
|
|
#line 64 "./xsi/IntersectionMatrix.xsi" |
|
2052
|
|
|
|
|
|
|
RETVAL = THIS->isCrosses(dimensionOfGeometryA, dimensionOfGeometryB); |
|
2053
|
|
|
|
|
|
|
#line 2054 "Geos.xs.cc" |
|
2054
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
2055
|
|
|
|
|
|
|
} |
|
2056
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2057
|
1
|
50
|
|
|
|
|
}); } |
|
2058
|
|
|
|
|
|
|
|
|
2059
|
|
|
|
|
|
|
|
|
2060
|
|
|
|
|
|
|
|
|
2061
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_isEquals) { xs::throw_guard(aTHX_ cv, [=]() |
|
2062
|
|
|
|
|
|
|
{ |
|
2063
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2064
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
2065
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, dimensionOfGeometryA, dimensionOfGeometryB"); |
|
2066
|
|
|
|
|
|
|
{ |
|
2067
|
|
|
|
|
|
|
bool RETVAL; |
|
2068
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2069
|
|
|
|
|
|
|
; |
|
2070
|
1
|
50
|
|
|
|
|
int dimensionOfGeometryA = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
2071
|
|
|
|
|
|
|
; |
|
2072
|
1
|
50
|
|
|
|
|
int dimensionOfGeometryB = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
2073
|
|
|
|
|
|
|
; |
|
2074
|
|
|
|
|
|
|
#line 66 "./xsi/IntersectionMatrix.xsi" |
|
2075
|
|
|
|
|
|
|
RETVAL = THIS->isEquals(dimensionOfGeometryA, dimensionOfGeometryB); |
|
2076
|
|
|
|
|
|
|
#line 2077 "Geos.xs.cc" |
|
2077
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
2078
|
|
|
|
|
|
|
} |
|
2079
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2080
|
1
|
50
|
|
|
|
|
}); } |
|
2081
|
|
|
|
|
|
|
|
|
2082
|
|
|
|
|
|
|
|
|
2083
|
|
|
|
|
|
|
|
|
2084
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_isOverlaps) { xs::throw_guard(aTHX_ cv, [=]() |
|
2085
|
|
|
|
|
|
|
{ |
|
2086
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2087
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
2088
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, dimensionOfGeometryA, dimensionOfGeometryB"); |
|
2089
|
|
|
|
|
|
|
{ |
|
2090
|
|
|
|
|
|
|
bool RETVAL; |
|
2091
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2092
|
|
|
|
|
|
|
; |
|
2093
|
1
|
50
|
|
|
|
|
int dimensionOfGeometryA = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
2094
|
|
|
|
|
|
|
; |
|
2095
|
1
|
50
|
|
|
|
|
int dimensionOfGeometryB = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
2096
|
|
|
|
|
|
|
; |
|
2097
|
|
|
|
|
|
|
#line 68 "./xsi/IntersectionMatrix.xsi" |
|
2098
|
|
|
|
|
|
|
RETVAL = THIS->isOverlaps(dimensionOfGeometryA, dimensionOfGeometryB); |
|
2099
|
|
|
|
|
|
|
#line 2100 "Geos.xs.cc" |
|
2100
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
2101
|
|
|
|
|
|
|
} |
|
2102
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2103
|
1
|
50
|
|
|
|
|
}); } |
|
2104
|
|
|
|
|
|
|
|
|
2105
|
|
|
|
|
|
|
|
|
2106
|
|
|
|
|
|
|
|
|
2107
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_transpose) { xs::throw_guard(aTHX_ cv, [=]() |
|
2108
|
|
|
|
|
|
|
{ |
|
2109
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2110
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
2111
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2112
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2113
|
1
|
|
|
|
|
|
SP -= items; |
|
2114
|
|
|
|
|
|
|
{ |
|
2115
|
1
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2116
|
|
|
|
|
|
|
; |
|
2117
|
|
|
|
|
|
|
#line 71 "./xsi/IntersectionMatrix.xsi" |
|
2118
|
|
|
|
|
|
|
THIS->transpose(); XSRETURN(1); |
|
2119
|
|
|
|
|
|
|
#line 2120 "Geos.xs.cc" |
|
2120
|
|
|
|
|
|
|
PUTBACK; |
|
2121
|
|
|
|
|
|
|
return; |
|
2122
|
|
|
|
|
|
|
} |
|
2123
|
1
|
50
|
|
|
|
|
}); } |
|
2124
|
|
|
|
|
|
|
|
|
2125
|
|
|
|
|
|
|
|
|
2126
|
|
|
|
|
|
|
|
|
2127
|
40
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_toString) { xs::throw_guard(aTHX_ cv, [=]() |
|
2128
|
|
|
|
|
|
|
{ |
|
2129
|
20
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2130
|
20
|
50
|
|
|
|
|
if (items < 1) |
|
2131
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
2132
|
|
|
|
|
|
|
{ |
|
2133
|
40
|
|
|
|
|
|
std::string RETVAL; |
|
2134
|
20
|
100
|
|
|
|
|
dXSTARG; |
|
|
|
50
|
|
|
|
|
|
|
2135
|
20
|
50
|
|
|
|
|
IntersectionMatrix* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2136
|
|
|
|
|
|
|
; |
|
2137
|
|
|
|
|
|
|
#line 73 "./xsi/IntersectionMatrix.xsi" |
|
2138
|
|
|
|
|
|
|
RETVAL = THIS->toString(); |
|
2139
|
|
|
|
|
|
|
#line 2140 "Geos.xs.cc" |
|
2140
|
20
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2141
|
|
|
|
|
|
|
} |
|
2142
|
20
|
|
|
|
|
|
XSRETURN(1); |
|
2143
|
20
|
50
|
|
|
|
|
}); } |
|
2144
|
|
|
|
|
|
|
|
|
2145
|
|
|
|
|
|
|
|
|
2146
|
|
|
|
|
|
|
|
|
2147
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
2148
|
|
|
|
|
|
|
{ |
|
2149
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2150
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
2151
|
|
|
|
|
|
|
{ |
|
2152
|
|
|
|
|
|
|
int RETVAL; |
|
2153
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2154
|
|
|
|
|
|
|
#line 75 "./xsi/IntersectionMatrix.xsi" |
|
2155
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
2156
|
|
|
|
|
|
|
#line 2157 "Geos.xs.cc" |
|
2157
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
2158
|
|
|
|
|
|
|
} |
|
2159
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
2160
|
0
|
0
|
|
|
|
|
}); } |
|
2161
|
|
|
|
|
|
|
|
|
2162
|
|
|
|
|
|
|
|
|
2163
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/IntersectionMatrix.xsi' */ |
|
2164
|
|
|
|
|
|
|
|
|
2165
|
|
|
|
|
|
|
|
|
2166
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/Triangle.xsi' from 'Geos.xs' */ |
|
2167
|
|
|
|
|
|
|
|
|
2168
|
|
|
|
|
|
|
|
|
2169
|
|
|
|
|
|
|
|
|
2170
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangle_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
2171
|
|
|
|
|
|
|
{ |
|
2172
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2173
|
1
|
50
|
|
|
|
|
if (items != 4) |
|
2174
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, p0, p1, p2"); |
|
2175
|
|
|
|
|
|
|
{ |
|
2176
|
|
|
|
|
|
|
Triangle * RETVAL; |
|
2177
|
1
|
50
|
|
|
|
|
Coordinate& p0 = xs::in(aTHX_ ST(1)); |
|
2178
|
|
|
|
|
|
|
; |
|
2179
|
1
|
50
|
|
|
|
|
Coordinate& p1 = xs::in(aTHX_ ST(2)); |
|
2180
|
|
|
|
|
|
|
; |
|
2181
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(aTHX_ ST(3)); |
|
2182
|
|
|
|
|
|
|
; |
|
2183
|
|
|
|
|
|
|
#line 4 "./xsi/Triangle.xsi" |
|
2184
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2185
|
|
|
|
|
|
|
RETVAL = new Triangle(p0, p1, p2); |
|
2186
|
|
|
|
|
|
|
#line 2187 "Geos.xs.cc" |
|
2187
|
|
|
|
|
|
|
{ |
|
2188
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2189
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
2190
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2191
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2192
|
|
|
|
|
|
|
} |
|
2193
|
|
|
|
|
|
|
} |
|
2194
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2195
|
1
|
50
|
|
|
|
|
}); } |
|
2196
|
|
|
|
|
|
|
|
|
2197
|
|
|
|
|
|
|
|
|
2198
|
|
|
|
|
|
|
|
|
2199
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangle_p0) { xs::throw_guard(aTHX_ cv, [=]() |
|
2200
|
|
|
|
|
|
|
{ |
|
2201
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2202
|
3
|
|
|
|
|
|
dXSI32; |
|
2203
|
3
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
2204
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
2205
|
|
|
|
|
|
|
{ |
|
2206
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
2207
|
3
|
50
|
|
|
|
|
Triangle* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2208
|
|
|
|
|
|
|
; |
|
2209
|
|
|
|
|
|
|
Coordinate* newval; |
|
2210
|
|
|
|
|
|
|
|
|
2211
|
3
|
50
|
|
|
|
|
if (items < 2) |
|
2212
|
3
|
|
|
|
|
|
newval = NULL; |
|
2213
|
|
|
|
|
|
|
else { |
|
2214
|
0
|
0
|
|
|
|
|
newval = xs::in(aTHX_ ST(1)); |
|
2215
|
|
|
|
|
|
|
; |
|
2216
|
|
|
|
|
|
|
} |
|
2217
|
|
|
|
|
|
|
#line 7 "./xsi/Triangle.xsi" |
|
2218
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2219
|
|
|
|
|
|
|
Coordinate* val; |
|
2220
|
|
|
|
|
|
|
switch (ix) { |
|
2221
|
|
|
|
|
|
|
case 0: val = &THIS->p0; break; |
|
2222
|
|
|
|
|
|
|
case 1: val = &THIS->p1; break; |
|
2223
|
|
|
|
|
|
|
default: val = &THIS->p2; break; |
|
2224
|
|
|
|
|
|
|
} |
|
2225
|
|
|
|
|
|
|
if (newval) { |
|
2226
|
|
|
|
|
|
|
*val = *newval; |
|
2227
|
|
|
|
|
|
|
} |
|
2228
|
|
|
|
|
|
|
RETVAL = new Coordinate(*val); |
|
2229
|
|
|
|
|
|
|
#line 2230 "Geos.xs.cc" |
|
2230
|
|
|
|
|
|
|
{ |
|
2231
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2232
|
3
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
2233
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2234
|
3
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2235
|
|
|
|
|
|
|
} |
|
2236
|
|
|
|
|
|
|
} |
|
2237
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
2238
|
3
|
50
|
|
|
|
|
}); } |
|
2239
|
|
|
|
|
|
|
|
|
2240
|
|
|
|
|
|
|
|
|
2241
|
|
|
|
|
|
|
|
|
2242
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangle_inCentre) { xs::throw_guard(aTHX_ cv, [=]() |
|
2243
|
|
|
|
|
|
|
{ |
|
2244
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2245
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
2246
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2247
|
|
|
|
|
|
|
{ |
|
2248
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
2249
|
1
|
50
|
|
|
|
|
Triangle* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2250
|
|
|
|
|
|
|
; |
|
2251
|
|
|
|
|
|
|
#line 20 "./xsi/Triangle.xsi" |
|
2252
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2253
|
|
|
|
|
|
|
Coordinate c; |
|
2254
|
|
|
|
|
|
|
THIS->inCentre(c); |
|
2255
|
|
|
|
|
|
|
RETVAL = new Coordinate(c); |
|
2256
|
|
|
|
|
|
|
#line 2257 "Geos.xs.cc" |
|
2257
|
|
|
|
|
|
|
{ |
|
2258
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2259
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
2260
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2261
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2262
|
|
|
|
|
|
|
} |
|
2263
|
|
|
|
|
|
|
} |
|
2264
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2265
|
1
|
50
|
|
|
|
|
}); } |
|
2266
|
|
|
|
|
|
|
|
|
2267
|
|
|
|
|
|
|
|
|
2268
|
|
|
|
|
|
|
|
|
2269
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangle_circumcentre) { xs::throw_guard(aTHX_ cv, [=]() |
|
2270
|
|
|
|
|
|
|
{ |
|
2271
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2272
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
2273
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2274
|
|
|
|
|
|
|
{ |
|
2275
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
2276
|
1
|
50
|
|
|
|
|
Triangle* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2277
|
|
|
|
|
|
|
; |
|
2278
|
|
|
|
|
|
|
#line 26 "./xsi/Triangle.xsi" |
|
2279
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2280
|
|
|
|
|
|
|
Coordinate c; |
|
2281
|
|
|
|
|
|
|
THIS->circumcentre(c); |
|
2282
|
|
|
|
|
|
|
RETVAL = new Coordinate(c); |
|
2283
|
|
|
|
|
|
|
#line 2284 "Geos.xs.cc" |
|
2284
|
|
|
|
|
|
|
{ |
|
2285
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2286
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
2287
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2288
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2289
|
|
|
|
|
|
|
} |
|
2290
|
|
|
|
|
|
|
} |
|
2291
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2292
|
1
|
50
|
|
|
|
|
}); } |
|
2293
|
|
|
|
|
|
|
|
|
2294
|
|
|
|
|
|
|
|
|
2295
|
|
|
|
|
|
|
|
|
2296
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangle_isInCircleNonRobust) { xs::throw_guard(aTHX_ cv, [=]() |
|
2297
|
|
|
|
|
|
|
{ |
|
2298
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2299
|
3
|
|
|
|
|
|
dXSI32; |
|
2300
|
3
|
50
|
|
|
|
|
if (items != 4) |
|
2301
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b, c, p"); |
|
2302
|
|
|
|
|
|
|
{ |
|
2303
|
|
|
|
|
|
|
bool RETVAL; |
|
2304
|
3
|
50
|
|
|
|
|
Coordinate& a = xs::in(aTHX_ ST(0)); |
|
2305
|
|
|
|
|
|
|
; |
|
2306
|
3
|
50
|
|
|
|
|
Coordinate& b = xs::in(aTHX_ ST(1)); |
|
2307
|
|
|
|
|
|
|
; |
|
2308
|
3
|
50
|
|
|
|
|
Coordinate& c = xs::in(aTHX_ ST(2)); |
|
2309
|
|
|
|
|
|
|
; |
|
2310
|
3
|
50
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(3)); |
|
2311
|
|
|
|
|
|
|
; |
|
2312
|
|
|
|
|
|
|
#line 32 "./xsi/Triangle.xsi" |
|
2313
|
|
|
|
|
|
|
switch(ix) { |
|
2314
|
|
|
|
|
|
|
case 0: RETVAL = TrianglePredicate::isInCircleNonRobust(a, b, c, p); break; |
|
2315
|
|
|
|
|
|
|
case 1: RETVAL = TrianglePredicate::isInCircleNormalized(a, b, c, p); break; |
|
2316
|
|
|
|
|
|
|
default: RETVAL = TrianglePredicate::isInCircleRobust(a, b, c, p); break; |
|
2317
|
|
|
|
|
|
|
} |
|
2318
|
|
|
|
|
|
|
#line 2319 "Geos.xs.cc" |
|
2319
|
3
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
2320
|
|
|
|
|
|
|
} |
|
2321
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
2322
|
3
|
50
|
|
|
|
|
}); } |
|
2323
|
|
|
|
|
|
|
|
|
2324
|
|
|
|
|
|
|
|
|
2325
|
|
|
|
|
|
|
|
|
2326
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangle_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
2327
|
|
|
|
|
|
|
{ |
|
2328
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2329
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
2330
|
|
|
|
|
|
|
{ |
|
2331
|
|
|
|
|
|
|
int RETVAL; |
|
2332
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2333
|
|
|
|
|
|
|
#line 40 "./xsi/Triangle.xsi" |
|
2334
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
2335
|
|
|
|
|
|
|
#line 2336 "Geos.xs.cc" |
|
2336
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
2337
|
|
|
|
|
|
|
} |
|
2338
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
2339
|
0
|
0
|
|
|
|
|
}); } |
|
2340
|
|
|
|
|
|
|
|
|
2341
|
|
|
|
|
|
|
|
|
2342
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/Triangle.xsi' */ |
|
2343
|
|
|
|
|
|
|
|
|
2344
|
|
|
|
|
|
|
|
|
2345
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/LineSegment.xsi' from 'Geos.xs' */ |
|
2346
|
|
|
|
|
|
|
|
|
2347
|
|
|
|
|
|
|
|
|
2348
|
|
|
|
|
|
|
|
|
2349
|
34
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
2350
|
|
|
|
|
|
|
{ |
|
2351
|
17
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2352
|
17
|
50
|
|
|
|
|
if (items < 1 || items > 5) |
|
|
|
50
|
|
|
|
|
|
|
2353
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg1= NULL, arg2= NULL, arg3= NULL, arg4= NULL"); |
|
2354
|
|
|
|
|
|
|
{ |
|
2355
|
|
|
|
|
|
|
LineSegment * RETVAL; |
|
2356
|
|
|
|
|
|
|
SV* arg1; |
|
2357
|
|
|
|
|
|
|
SV* arg2; |
|
2358
|
|
|
|
|
|
|
SV* arg3; |
|
2359
|
|
|
|
|
|
|
SV* arg4; |
|
2360
|
|
|
|
|
|
|
|
|
2361
|
17
|
100
|
|
|
|
|
if (items < 2) |
|
2362
|
1
|
|
|
|
|
|
arg1 = NULL; |
|
2363
|
|
|
|
|
|
|
else { |
|
2364
|
16
|
|
|
|
|
|
arg1 = ST(1) |
|
2365
|
16
|
|
|
|
|
|
; |
|
2366
|
|
|
|
|
|
|
} |
|
2367
|
|
|
|
|
|
|
|
|
2368
|
17
|
100
|
|
|
|
|
if (items < 3) |
|
2369
|
1
|
|
|
|
|
|
arg2 = NULL; |
|
2370
|
|
|
|
|
|
|
else { |
|
2371
|
16
|
|
|
|
|
|
arg2 = ST(2) |
|
2372
|
16
|
|
|
|
|
|
; |
|
2373
|
|
|
|
|
|
|
} |
|
2374
|
|
|
|
|
|
|
|
|
2375
|
17
|
100
|
|
|
|
|
if (items < 4) |
|
2376
|
16
|
|
|
|
|
|
arg3 = NULL; |
|
2377
|
|
|
|
|
|
|
else { |
|
2378
|
1
|
|
|
|
|
|
arg3 = ST(3) |
|
2379
|
1
|
|
|
|
|
|
; |
|
2380
|
|
|
|
|
|
|
} |
|
2381
|
|
|
|
|
|
|
|
|
2382
|
17
|
100
|
|
|
|
|
if (items < 5) |
|
2383
|
16
|
|
|
|
|
|
arg4 = NULL; |
|
2384
|
|
|
|
|
|
|
else { |
|
2385
|
1
|
|
|
|
|
|
arg4 = ST(4) |
|
2386
|
1
|
|
|
|
|
|
; |
|
2387
|
|
|
|
|
|
|
} |
|
2388
|
|
|
|
|
|
|
#line 5 "./xsi/LineSegment.xsi" |
|
2389
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2390
|
|
|
|
|
|
|
if (!arg1) RETVAL = new LineSegment(); |
|
2391
|
|
|
|
|
|
|
else if (!arg3) { |
|
2392
|
|
|
|
|
|
|
auto& c1 = xs::in(arg1); |
|
2393
|
|
|
|
|
|
|
auto& c2 = xs::in(arg2); |
|
2394
|
|
|
|
|
|
|
RETVAL = new LineSegment(c1, c2); |
|
2395
|
|
|
|
|
|
|
} |
|
2396
|
|
|
|
|
|
|
else { |
|
2397
|
|
|
|
|
|
|
if(!arg2) throw("undef not allowed"); |
|
2398
|
|
|
|
|
|
|
if(!arg3) throw("undef not allowed"); |
|
2399
|
|
|
|
|
|
|
if(!arg4) throw("undef not allowed"); |
|
2400
|
|
|
|
|
|
|
double x0 = SvNV(arg1); |
|
2401
|
|
|
|
|
|
|
double y0 = SvNV(arg2); |
|
2402
|
|
|
|
|
|
|
double x1 = SvNV(arg3); |
|
2403
|
|
|
|
|
|
|
double y1 = SvNV(arg4); |
|
2404
|
|
|
|
|
|
|
RETVAL = new LineSegment(x0, y0, x1, y1); |
|
2405
|
|
|
|
|
|
|
} |
|
2406
|
|
|
|
|
|
|
#line 2407 "Geos.xs.cc" |
|
2407
|
|
|
|
|
|
|
{ |
|
2408
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2409
|
17
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
2410
|
17
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2411
|
17
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2412
|
|
|
|
|
|
|
} |
|
2413
|
|
|
|
|
|
|
} |
|
2414
|
17
|
|
|
|
|
|
XSRETURN(1); |
|
2415
|
17
|
50
|
|
|
|
|
}); } |
|
2416
|
|
|
|
|
|
|
|
|
2417
|
|
|
|
|
|
|
|
|
2418
|
|
|
|
|
|
|
|
|
2419
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_getLength) { xs::throw_guard(aTHX_ cv, [=]() |
|
2420
|
|
|
|
|
|
|
{ |
|
2421
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2422
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
2423
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2424
|
|
|
|
|
|
|
{ |
|
2425
|
|
|
|
|
|
|
double RETVAL; |
|
2426
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2427
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2428
|
|
|
|
|
|
|
; |
|
2429
|
|
|
|
|
|
|
#line 23 "./xsi/LineSegment.xsi" |
|
2430
|
|
|
|
|
|
|
RETVAL = THIS->getLength(); |
|
2431
|
|
|
|
|
|
|
#line 2432 "Geos.xs.cc" |
|
2432
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2433
|
|
|
|
|
|
|
} |
|
2434
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2435
|
1
|
50
|
|
|
|
|
}); } |
|
2436
|
|
|
|
|
|
|
|
|
2437
|
|
|
|
|
|
|
|
|
2438
|
|
|
|
|
|
|
|
|
2439
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_isHorizontal) { xs::throw_guard(aTHX_ cv, [=]() |
|
2440
|
|
|
|
|
|
|
{ |
|
2441
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2442
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
2443
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2444
|
|
|
|
|
|
|
{ |
|
2445
|
|
|
|
|
|
|
bool RETVAL; |
|
2446
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2447
|
|
|
|
|
|
|
; |
|
2448
|
|
|
|
|
|
|
#line 25 "./xsi/LineSegment.xsi" |
|
2449
|
|
|
|
|
|
|
RETVAL = THIS->isHorizontal(); |
|
2450
|
|
|
|
|
|
|
#line 2451 "Geos.xs.cc" |
|
2451
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
2452
|
|
|
|
|
|
|
} |
|
2453
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2454
|
1
|
50
|
|
|
|
|
}); } |
|
2455
|
|
|
|
|
|
|
|
|
2456
|
|
|
|
|
|
|
|
|
2457
|
|
|
|
|
|
|
|
|
2458
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_isVertical) { xs::throw_guard(aTHX_ cv, [=]() |
|
2459
|
|
|
|
|
|
|
{ |
|
2460
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2461
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
2462
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2463
|
|
|
|
|
|
|
{ |
|
2464
|
|
|
|
|
|
|
bool RETVAL; |
|
2465
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2466
|
|
|
|
|
|
|
; |
|
2467
|
|
|
|
|
|
|
#line 27 "./xsi/LineSegment.xsi" |
|
2468
|
|
|
|
|
|
|
RETVAL = THIS->isVertical(); |
|
2469
|
|
|
|
|
|
|
#line 2470 "Geos.xs.cc" |
|
2470
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
2471
|
|
|
|
|
|
|
} |
|
2472
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2473
|
1
|
50
|
|
|
|
|
}); } |
|
2474
|
|
|
|
|
|
|
|
|
2475
|
|
|
|
|
|
|
|
|
2476
|
|
|
|
|
|
|
|
|
2477
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_setCoordinates) { xs::throw_guard(aTHX_ cv, [=]() |
|
2478
|
|
|
|
|
|
|
{ |
|
2479
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2480
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
2481
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1, arg2= NULL"); |
|
2482
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2483
|
2
|
|
|
|
|
|
SP -= items; |
|
2484
|
|
|
|
|
|
|
{ |
|
2485
|
2
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2486
|
|
|
|
|
|
|
; |
|
2487
|
2
|
|
|
|
|
|
SV* arg1 = ST(1) |
|
2488
|
|
|
|
|
|
|
; |
|
2489
|
|
|
|
|
|
|
SV* arg2; |
|
2490
|
|
|
|
|
|
|
|
|
2491
|
2
|
100
|
|
|
|
|
if (items < 3) |
|
2492
|
1
|
|
|
|
|
|
arg2 = NULL; |
|
2493
|
|
|
|
|
|
|
else { |
|
2494
|
1
|
|
|
|
|
|
arg2 = ST(2) |
|
2495
|
1
|
|
|
|
|
|
; |
|
2496
|
|
|
|
|
|
|
} |
|
2497
|
|
|
|
|
|
|
#line 30 "./xsi/LineSegment.xsi" |
|
2498
|
|
|
|
|
|
|
if (!arg2) { |
|
2499
|
|
|
|
|
|
|
auto& ls = xs::in(arg1); |
|
2500
|
|
|
|
|
|
|
THIS->setCoordinates(ls); |
|
2501
|
|
|
|
|
|
|
} |
|
2502
|
|
|
|
|
|
|
else { |
|
2503
|
|
|
|
|
|
|
auto& c1 = xs::in(arg1); |
|
2504
|
|
|
|
|
|
|
auto& c2 = xs::in(arg2); |
|
2505
|
|
|
|
|
|
|
THIS->setCoordinates(c1, c2); |
|
2506
|
|
|
|
|
|
|
} |
|
2507
|
|
|
|
|
|
|
#line 2508 "Geos.xs.cc" |
|
2508
|
2
|
|
|
|
|
|
PUTBACK; |
|
2509
|
2
|
|
|
|
|
|
return; |
|
2510
|
|
|
|
|
|
|
} |
|
2511
|
2
|
50
|
|
|
|
|
}); } |
|
2512
|
|
|
|
|
|
|
|
|
2513
|
|
|
|
|
|
|
|
|
2514
|
|
|
|
|
|
|
|
|
2515
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_orientationIndex) { xs::throw_guard(aTHX_ cv, [=]() |
|
2516
|
|
|
|
|
|
|
{ |
|
2517
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2518
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
2519
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg"); |
|
2520
|
|
|
|
|
|
|
{ |
|
2521
|
|
|
|
|
|
|
int RETVAL; |
|
2522
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2523
|
2
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2524
|
|
|
|
|
|
|
; |
|
2525
|
4
|
50
|
|
|
|
|
Object arg = ST(1); |
|
2526
|
2
|
50
|
|
|
|
|
if (!arg && SvOK(ST(1))) throw "arg is not a blessed reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
2527
|
0
|
|
|
|
|
|
; |
|
2528
|
|
|
|
|
|
|
#line 42 "./xsi/LineSegment.xsi" |
|
2529
|
|
|
|
|
|
|
if (arg.stash().name() == "Geo::Geos::Coordinate") { |
|
2530
|
|
|
|
|
|
|
auto c = xs::in(arg); |
|
2531
|
|
|
|
|
|
|
RETVAL = THIS->orientationIndex(*c); |
|
2532
|
|
|
|
|
|
|
} |
|
2533
|
|
|
|
|
|
|
else { |
|
2534
|
|
|
|
|
|
|
auto& ls = xs::in(arg); |
|
2535
|
|
|
|
|
|
|
RETVAL = THIS->orientationIndex(ls); |
|
2536
|
|
|
|
|
|
|
} |
|
2537
|
|
|
|
|
|
|
#line 2538 "Geos.xs.cc" |
|
2538
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2539
|
|
|
|
|
|
|
} |
|
2540
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
2541
|
2
|
50
|
|
|
|
|
}); } |
|
2542
|
|
|
|
|
|
|
|
|
2543
|
|
|
|
|
|
|
|
|
2544
|
|
|
|
|
|
|
|
|
2545
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_reverse) { xs::throw_guard(aTHX_ cv, [=]() |
|
2546
|
|
|
|
|
|
|
{ |
|
2547
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2548
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
2549
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2550
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2551
|
1
|
|
|
|
|
|
SP -= items; |
|
2552
|
|
|
|
|
|
|
{ |
|
2553
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2554
|
|
|
|
|
|
|
; |
|
2555
|
|
|
|
|
|
|
#line 52 "./xsi/LineSegment.xsi" |
|
2556
|
|
|
|
|
|
|
THIS->reverse(); |
|
2557
|
|
|
|
|
|
|
#line 2558 "Geos.xs.cc" |
|
2558
|
1
|
|
|
|
|
|
PUTBACK; |
|
2559
|
1
|
|
|
|
|
|
return; |
|
2560
|
|
|
|
|
|
|
} |
|
2561
|
1
|
50
|
|
|
|
|
}); } |
|
2562
|
|
|
|
|
|
|
|
|
2563
|
|
|
|
|
|
|
|
|
2564
|
|
|
|
|
|
|
|
|
2565
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_normalize) { xs::throw_guard(aTHX_ cv, [=]() |
|
2566
|
|
|
|
|
|
|
{ |
|
2567
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2568
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
2569
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2570
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2571
|
1
|
|
|
|
|
|
SP -= items; |
|
2572
|
|
|
|
|
|
|
{ |
|
2573
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2574
|
|
|
|
|
|
|
; |
|
2575
|
|
|
|
|
|
|
#line 54 "./xsi/LineSegment.xsi" |
|
2576
|
|
|
|
|
|
|
THIS->normalize(); |
|
2577
|
|
|
|
|
|
|
#line 2578 "Geos.xs.cc" |
|
2578
|
1
|
|
|
|
|
|
PUTBACK; |
|
2579
|
1
|
|
|
|
|
|
return; |
|
2580
|
|
|
|
|
|
|
} |
|
2581
|
1
|
50
|
|
|
|
|
}); } |
|
2582
|
|
|
|
|
|
|
|
|
2583
|
|
|
|
|
|
|
|
|
2584
|
|
|
|
|
|
|
|
|
2585
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_angle) { xs::throw_guard(aTHX_ cv, [=]() |
|
2586
|
|
|
|
|
|
|
{ |
|
2587
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2588
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
2589
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2590
|
|
|
|
|
|
|
{ |
|
2591
|
|
|
|
|
|
|
double RETVAL; |
|
2592
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2593
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2594
|
|
|
|
|
|
|
; |
|
2595
|
|
|
|
|
|
|
#line 56 "./xsi/LineSegment.xsi" |
|
2596
|
|
|
|
|
|
|
RETVAL = THIS->angle(); |
|
2597
|
|
|
|
|
|
|
#line 2598 "Geos.xs.cc" |
|
2598
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2599
|
|
|
|
|
|
|
} |
|
2600
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2601
|
1
|
50
|
|
|
|
|
}); } |
|
2602
|
|
|
|
|
|
|
|
|
2603
|
|
|
|
|
|
|
|
|
2604
|
|
|
|
|
|
|
|
|
2605
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_midPoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
2606
|
|
|
|
|
|
|
{ |
|
2607
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2608
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
2609
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2610
|
|
|
|
|
|
|
{ |
|
2611
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
2612
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2613
|
|
|
|
|
|
|
; |
|
2614
|
|
|
|
|
|
|
#line 59 "./xsi/LineSegment.xsi" |
|
2615
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2616
|
|
|
|
|
|
|
Coordinate c; |
|
2617
|
|
|
|
|
|
|
THIS->midPoint(c); |
|
2618
|
|
|
|
|
|
|
RETVAL = new Coordinate(c); |
|
2619
|
|
|
|
|
|
|
#line 2620 "Geos.xs.cc" |
|
2620
|
|
|
|
|
|
|
{ |
|
2621
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2622
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
2623
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2624
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2625
|
|
|
|
|
|
|
} |
|
2626
|
|
|
|
|
|
|
} |
|
2627
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2628
|
1
|
50
|
|
|
|
|
}); } |
|
2629
|
|
|
|
|
|
|
|
|
2630
|
|
|
|
|
|
|
|
|
2631
|
|
|
|
|
|
|
|
|
2632
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_distance) { xs::throw_guard(aTHX_ cv, [=]() |
|
2633
|
|
|
|
|
|
|
{ |
|
2634
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2635
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
2636
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg"); |
|
2637
|
|
|
|
|
|
|
{ |
|
2638
|
|
|
|
|
|
|
double RETVAL; |
|
2639
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2640
|
2
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2641
|
|
|
|
|
|
|
; |
|
2642
|
4
|
50
|
|
|
|
|
Object arg = ST(1); |
|
2643
|
2
|
50
|
|
|
|
|
if (!arg && SvOK(ST(1))) throw "arg is not a blessed reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
2644
|
0
|
|
|
|
|
|
; |
|
2645
|
|
|
|
|
|
|
#line 65 "./xsi/LineSegment.xsi" |
|
2646
|
|
|
|
|
|
|
if (arg.stash().name() == "Geo::Geos::Coordinate") { |
|
2647
|
|
|
|
|
|
|
auto c = xs::in(arg); |
|
2648
|
|
|
|
|
|
|
RETVAL = THIS->distance(*c); |
|
2649
|
|
|
|
|
|
|
} |
|
2650
|
|
|
|
|
|
|
else { |
|
2651
|
|
|
|
|
|
|
auto& ls = xs::in(arg); |
|
2652
|
|
|
|
|
|
|
RETVAL = THIS->distance(ls); |
|
2653
|
|
|
|
|
|
|
} |
|
2654
|
|
|
|
|
|
|
#line 2655 "Geos.xs.cc" |
|
2655
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2656
|
|
|
|
|
|
|
} |
|
2657
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
2658
|
2
|
50
|
|
|
|
|
}); } |
|
2659
|
|
|
|
|
|
|
|
|
2660
|
|
|
|
|
|
|
|
|
2661
|
|
|
|
|
|
|
|
|
2662
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_distancePerpendicular) { xs::throw_guard(aTHX_ cv, [=]() |
|
2663
|
|
|
|
|
|
|
{ |
|
2664
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2665
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
2666
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, p"); |
|
2667
|
|
|
|
|
|
|
{ |
|
2668
|
|
|
|
|
|
|
double RETVAL; |
|
2669
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2670
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2671
|
|
|
|
|
|
|
; |
|
2672
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(1)); |
|
2673
|
|
|
|
|
|
|
; |
|
2674
|
|
|
|
|
|
|
#line 75 "./xsi/LineSegment.xsi" |
|
2675
|
|
|
|
|
|
|
RETVAL = THIS->distancePerpendicular(p); |
|
2676
|
|
|
|
|
|
|
#line 2677 "Geos.xs.cc" |
|
2677
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2678
|
|
|
|
|
|
|
} |
|
2679
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2680
|
1
|
50
|
|
|
|
|
}); } |
|
2681
|
|
|
|
|
|
|
|
|
2682
|
|
|
|
|
|
|
|
|
2683
|
|
|
|
|
|
|
|
|
2684
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_pointAlong) { xs::throw_guard(aTHX_ cv, [=]() |
|
2685
|
|
|
|
|
|
|
{ |
|
2686
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2687
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
2688
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, segmentLengthFraction"); |
|
2689
|
|
|
|
|
|
|
{ |
|
2690
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
2691
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2692
|
|
|
|
|
|
|
; |
|
2693
|
1
|
50
|
|
|
|
|
double segmentLengthFraction = (double)SvNV(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
2694
|
|
|
|
|
|
|
; |
|
2695
|
|
|
|
|
|
|
#line 78 "./xsi/LineSegment.xsi" |
|
2696
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2697
|
|
|
|
|
|
|
Coordinate c; |
|
2698
|
|
|
|
|
|
|
THIS->pointAlong(segmentLengthFraction, c); |
|
2699
|
|
|
|
|
|
|
RETVAL = new Coordinate(c); |
|
2700
|
|
|
|
|
|
|
#line 2701 "Geos.xs.cc" |
|
2701
|
|
|
|
|
|
|
{ |
|
2702
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2703
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
2704
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2705
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2706
|
|
|
|
|
|
|
} |
|
2707
|
|
|
|
|
|
|
} |
|
2708
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2709
|
1
|
50
|
|
|
|
|
}); } |
|
2710
|
|
|
|
|
|
|
|
|
2711
|
|
|
|
|
|
|
|
|
2712
|
|
|
|
|
|
|
|
|
2713
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_pointAlongOffset) { xs::throw_guard(aTHX_ cv, [=]() |
|
2714
|
|
|
|
|
|
|
{ |
|
2715
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2716
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
2717
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, segmentLengthFraction, offsetDistance"); |
|
2718
|
|
|
|
|
|
|
{ |
|
2719
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
2720
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2721
|
|
|
|
|
|
|
; |
|
2722
|
1
|
50
|
|
|
|
|
double segmentLengthFraction = (double)SvNV(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
2723
|
|
|
|
|
|
|
; |
|
2724
|
1
|
50
|
|
|
|
|
double offsetDistance = (double)SvNV(ST(2)) |
|
|
|
50
|
|
|
|
|
|
|
2725
|
|
|
|
|
|
|
; |
|
2726
|
|
|
|
|
|
|
#line 84 "./xsi/LineSegment.xsi" |
|
2727
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2728
|
|
|
|
|
|
|
Coordinate c; |
|
2729
|
|
|
|
|
|
|
THIS->pointAlongOffset(segmentLengthFraction, offsetDistance, c); |
|
2730
|
|
|
|
|
|
|
RETVAL = new Coordinate(c); |
|
2731
|
|
|
|
|
|
|
#line 2732 "Geos.xs.cc" |
|
2732
|
|
|
|
|
|
|
{ |
|
2733
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2734
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
2735
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2736
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2737
|
|
|
|
|
|
|
} |
|
2738
|
|
|
|
|
|
|
} |
|
2739
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2740
|
1
|
50
|
|
|
|
|
}); } |
|
2741
|
|
|
|
|
|
|
|
|
2742
|
|
|
|
|
|
|
|
|
2743
|
|
|
|
|
|
|
|
|
2744
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_projectionFactor) { xs::throw_guard(aTHX_ cv, [=]() |
|
2745
|
|
|
|
|
|
|
{ |
|
2746
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2747
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
2748
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, p"); |
|
2749
|
|
|
|
|
|
|
{ |
|
2750
|
|
|
|
|
|
|
double RETVAL; |
|
2751
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2752
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2753
|
|
|
|
|
|
|
; |
|
2754
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(1)); |
|
2755
|
|
|
|
|
|
|
; |
|
2756
|
|
|
|
|
|
|
#line 89 "./xsi/LineSegment.xsi" |
|
2757
|
|
|
|
|
|
|
RETVAL = THIS->projectionFactor(p); |
|
2758
|
|
|
|
|
|
|
#line 2759 "Geos.xs.cc" |
|
2759
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2760
|
|
|
|
|
|
|
} |
|
2761
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2762
|
1
|
50
|
|
|
|
|
}); } |
|
2763
|
|
|
|
|
|
|
|
|
2764
|
|
|
|
|
|
|
|
|
2765
|
|
|
|
|
|
|
|
|
2766
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_segmentFraction) { xs::throw_guard(aTHX_ cv, [=]() |
|
2767
|
|
|
|
|
|
|
{ |
|
2768
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2769
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
2770
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, p"); |
|
2771
|
|
|
|
|
|
|
{ |
|
2772
|
|
|
|
|
|
|
double RETVAL; |
|
2773
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2774
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2775
|
|
|
|
|
|
|
; |
|
2776
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(1)); |
|
2777
|
|
|
|
|
|
|
; |
|
2778
|
|
|
|
|
|
|
#line 91 "./xsi/LineSegment.xsi" |
|
2779
|
|
|
|
|
|
|
RETVAL = THIS->segmentFraction(p); |
|
2780
|
|
|
|
|
|
|
#line 2781 "Geos.xs.cc" |
|
2781
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2782
|
|
|
|
|
|
|
} |
|
2783
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2784
|
1
|
50
|
|
|
|
|
}); } |
|
2785
|
|
|
|
|
|
|
|
|
2786
|
|
|
|
|
|
|
|
|
2787
|
|
|
|
|
|
|
|
|
2788
|
8
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_project) { xs::throw_guard(aTHX_ cv, [=]() |
|
2789
|
|
|
|
|
|
|
{ |
|
2790
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2791
|
4
|
50
|
|
|
|
|
if (items != 2) |
|
2792
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg"); |
|
2793
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2794
|
4
|
|
|
|
|
|
SP -= items; |
|
2795
|
|
|
|
|
|
|
{ |
|
2796
|
4
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2797
|
|
|
|
|
|
|
; |
|
2798
|
8
|
50
|
|
|
|
|
Object arg = ST(1); |
|
2799
|
4
|
50
|
|
|
|
|
if (!arg && SvOK(ST(1))) throw "arg is not a blessed reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
2800
|
0
|
|
|
|
|
|
; |
|
2801
|
|
|
|
|
|
|
#line 94 "./xsi/LineSegment.xsi" |
|
2802
|
|
|
|
|
|
|
if (arg.stash().name() == "Geo::Geos::Coordinate") { |
|
2803
|
|
|
|
|
|
|
auto& c = xs::in(arg); |
|
2804
|
|
|
|
|
|
|
Coordinate c_out; |
|
2805
|
|
|
|
|
|
|
THIS->project(c, c_out); |
|
2806
|
|
|
|
|
|
|
auto wrapped = xs::out<>(new Coordinate(c_out)); |
|
2807
|
|
|
|
|
|
|
mXPUSHs(wrapped.detach()); |
|
2808
|
|
|
|
|
|
|
} |
|
2809
|
|
|
|
|
|
|
else { |
|
2810
|
|
|
|
|
|
|
auto& ls = xs::in(arg); |
|
2811
|
|
|
|
|
|
|
LineSegment ls_out; |
|
2812
|
|
|
|
|
|
|
bool overlap = THIS->project(ls, ls_out); |
|
2813
|
|
|
|
|
|
|
auto wrapped = xs::out<>(new LineSegment(ls_out)); |
|
2814
|
|
|
|
|
|
|
mXPUSHs(wrapped.detach()); |
|
2815
|
|
|
|
|
|
|
if (GIMME_V == G_ARRAY) mXPUSHi(overlap); |
|
2816
|
|
|
|
|
|
|
} |
|
2817
|
|
|
|
|
|
|
#line 2818 "Geos.xs.cc" |
|
2818
|
4
|
|
|
|
|
|
PUTBACK; |
|
2819
|
8
|
|
|
|
|
|
return; |
|
2820
|
|
|
|
|
|
|
} |
|
2821
|
4
|
50
|
|
|
|
|
}); } |
|
2822
|
|
|
|
|
|
|
|
|
2823
|
|
|
|
|
|
|
|
|
2824
|
|
|
|
|
|
|
|
|
2825
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_closestPoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
2826
|
|
|
|
|
|
|
{ |
|
2827
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2828
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
2829
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, p"); |
|
2830
|
|
|
|
|
|
|
{ |
|
2831
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
2832
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2833
|
|
|
|
|
|
|
; |
|
2834
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(1)); |
|
2835
|
|
|
|
|
|
|
; |
|
2836
|
|
|
|
|
|
|
#line 112 "./xsi/LineSegment.xsi" |
|
2837
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2838
|
|
|
|
|
|
|
Coordinate c; |
|
2839
|
|
|
|
|
|
|
THIS->closestPoint(p, c); |
|
2840
|
|
|
|
|
|
|
RETVAL = new Coordinate(c); |
|
2841
|
|
|
|
|
|
|
#line 2842 "Geos.xs.cc" |
|
2842
|
|
|
|
|
|
|
{ |
|
2843
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2844
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
2845
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2846
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2847
|
|
|
|
|
|
|
} |
|
2848
|
|
|
|
|
|
|
} |
|
2849
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2850
|
1
|
50
|
|
|
|
|
}); } |
|
2851
|
|
|
|
|
|
|
|
|
2852
|
|
|
|
|
|
|
|
|
2853
|
|
|
|
|
|
|
|
|
2854
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_compareTo) { xs::throw_guard(aTHX_ cv, [=]() |
|
2855
|
|
|
|
|
|
|
{ |
|
2856
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2857
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
2858
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
2859
|
|
|
|
|
|
|
{ |
|
2860
|
|
|
|
|
|
|
int RETVAL; |
|
2861
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2862
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2863
|
|
|
|
|
|
|
; |
|
2864
|
1
|
50
|
|
|
|
|
LineSegment& other = xs::in(aTHX_ ST(1)); |
|
2865
|
|
|
|
|
|
|
; |
|
2866
|
|
|
|
|
|
|
#line 117 "./xsi/LineSegment.xsi" |
|
2867
|
|
|
|
|
|
|
RETVAL = THIS->compareTo(other); |
|
2868
|
|
|
|
|
|
|
#line 2869 "Geos.xs.cc" |
|
2869
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2870
|
|
|
|
|
|
|
} |
|
2871
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2872
|
1
|
50
|
|
|
|
|
}); } |
|
2873
|
|
|
|
|
|
|
|
|
2874
|
|
|
|
|
|
|
|
|
2875
|
|
|
|
|
|
|
|
|
2876
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_equalsTopo) { xs::throw_guard(aTHX_ cv, [=]() |
|
2877
|
|
|
|
|
|
|
{ |
|
2878
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2879
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
2880
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
2881
|
|
|
|
|
|
|
{ |
|
2882
|
|
|
|
|
|
|
bool RETVAL; |
|
2883
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2884
|
|
|
|
|
|
|
; |
|
2885
|
1
|
50
|
|
|
|
|
LineSegment& other = xs::in(aTHX_ ST(1)); |
|
2886
|
|
|
|
|
|
|
; |
|
2887
|
|
|
|
|
|
|
#line 119 "./xsi/LineSegment.xsi" |
|
2888
|
|
|
|
|
|
|
RETVAL = THIS->equalsTopo(other); |
|
2889
|
|
|
|
|
|
|
#line 2890 "Geos.xs.cc" |
|
2890
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
2891
|
|
|
|
|
|
|
} |
|
2892
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2893
|
1
|
50
|
|
|
|
|
}); } |
|
2894
|
|
|
|
|
|
|
|
|
2895
|
|
|
|
|
|
|
|
|
2896
|
|
|
|
|
|
|
|
|
2897
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_closestPoints) { xs::throw_guard(aTHX_ cv, [=]() |
|
2898
|
|
|
|
|
|
|
{ |
|
2899
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2900
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
2901
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, line"); |
|
2902
|
|
|
|
|
|
|
{ |
|
2903
|
2
|
|
|
|
|
|
Array RETVAL; |
|
2904
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2905
|
|
|
|
|
|
|
; |
|
2906
|
1
|
50
|
|
|
|
|
LineSegment& line = xs::in(aTHX_ ST(1)); |
|
2907
|
|
|
|
|
|
|
; |
|
2908
|
|
|
|
|
|
|
#line 122 "./xsi/LineSegment.xsi" |
|
2909
|
|
|
|
|
|
|
auto seq = std::unique_ptr(THIS->closestPoints(line)); |
|
2910
|
|
|
|
|
|
|
RETVAL = Helper::convert_copy(seq.get()); |
|
2911
|
|
|
|
|
|
|
#line 2912 "Geos.xs.cc" |
|
2912
|
|
|
|
|
|
|
{ |
|
2913
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2914
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
2915
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
2916
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
2917
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2918
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
2919
|
|
|
|
|
|
|
} |
|
2920
|
|
|
|
|
|
|
} |
|
2921
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2922
|
1
|
50
|
|
|
|
|
}); } |
|
2923
|
|
|
|
|
|
|
|
|
2924
|
|
|
|
|
|
|
|
|
2925
|
|
|
|
|
|
|
|
|
2926
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_intersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
2927
|
|
|
|
|
|
|
{ |
|
2928
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2929
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
2930
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, line"); |
|
2931
|
|
|
|
|
|
|
{ |
|
2932
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
2933
|
2
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2934
|
|
|
|
|
|
|
; |
|
2935
|
2
|
50
|
|
|
|
|
LineSegment& line = xs::in(aTHX_ ST(1)); |
|
2936
|
|
|
|
|
|
|
; |
|
2937
|
|
|
|
|
|
|
#line 127 "./xsi/LineSegment.xsi" |
|
2938
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2939
|
|
|
|
|
|
|
Coordinate c; |
|
2940
|
|
|
|
|
|
|
if(THIS->intersection(line, c)) RETVAL = new Coordinate(c); |
|
2941
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
2942
|
|
|
|
|
|
|
#line 2943 "Geos.xs.cc" |
|
2943
|
|
|
|
|
|
|
{ |
|
2944
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2945
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
2946
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2947
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
2948
|
|
|
|
|
|
|
} |
|
2949
|
|
|
|
|
|
|
} |
|
2950
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
2951
|
2
|
50
|
|
|
|
|
}); } |
|
2952
|
|
|
|
|
|
|
|
|
2953
|
|
|
|
|
|
|
|
|
2954
|
|
|
|
|
|
|
|
|
2955
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_lineIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
2956
|
|
|
|
|
|
|
{ |
|
2957
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2958
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
2959
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, line"); |
|
2960
|
|
|
|
|
|
|
{ |
|
2961
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
2962
|
2
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2963
|
|
|
|
|
|
|
; |
|
2964
|
2
|
50
|
|
|
|
|
LineSegment& line = xs::in(aTHX_ ST(1)); |
|
2965
|
|
|
|
|
|
|
; |
|
2966
|
|
|
|
|
|
|
#line 133 "./xsi/LineSegment.xsi" |
|
2967
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2968
|
|
|
|
|
|
|
Coordinate c; |
|
2969
|
|
|
|
|
|
|
if(THIS->lineIntersection(line, c)) RETVAL = new Coordinate(c); |
|
2970
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
2971
|
|
|
|
|
|
|
#line 2972 "Geos.xs.cc" |
|
2972
|
|
|
|
|
|
|
{ |
|
2973
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2974
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
2975
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2976
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
2977
|
|
|
|
|
|
|
} |
|
2978
|
|
|
|
|
|
|
} |
|
2979
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
2980
|
2
|
50
|
|
|
|
|
}); } |
|
2981
|
|
|
|
|
|
|
|
|
2982
|
|
|
|
|
|
|
|
|
2983
|
|
|
|
|
|
|
|
|
2984
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_toGeometry) { xs::throw_guard(aTHX_ cv, [=]() |
|
2985
|
|
|
|
|
|
|
{ |
|
2986
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2987
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
2988
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, gf"); |
|
2989
|
|
|
|
|
|
|
{ |
|
2990
|
|
|
|
|
|
|
LineString * RETVAL; |
|
2991
|
1
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2992
|
|
|
|
|
|
|
; |
|
2993
|
1
|
50
|
|
|
|
|
GeometryFactory& gf = xs::in(aTHX_ ST(1)); |
|
2994
|
|
|
|
|
|
|
; |
|
2995
|
|
|
|
|
|
|
#line 139 "./xsi/LineSegment.xsi" |
|
2996
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2997
|
|
|
|
|
|
|
auto ptr = THIS->toGeometry(gf); |
|
2998
|
|
|
|
|
|
|
RETVAL = ptr.release(); |
|
2999
|
|
|
|
|
|
|
#line 3000 "Geos.xs.cc" |
|
3000
|
|
|
|
|
|
|
{ |
|
3001
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3002
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3003
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3004
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3005
|
|
|
|
|
|
|
} |
|
3006
|
|
|
|
|
|
|
} |
|
3007
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
3008
|
1
|
50
|
|
|
|
|
}); } |
|
3009
|
|
|
|
|
|
|
|
|
3010
|
|
|
|
|
|
|
|
|
3011
|
|
|
|
|
|
|
|
|
3012
|
28
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_toString) { xs::throw_guard(aTHX_ cv, [=]() |
|
3013
|
|
|
|
|
|
|
{ |
|
3014
|
14
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3015
|
14
|
50
|
|
|
|
|
if (items < 1) |
|
3016
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
3017
|
|
|
|
|
|
|
{ |
|
3018
|
28
|
|
|
|
|
|
std::string RETVAL; |
|
3019
|
14
|
100
|
|
|
|
|
dXSTARG; |
|
|
|
50
|
|
|
|
|
|
|
3020
|
14
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3021
|
|
|
|
|
|
|
; |
|
3022
|
|
|
|
|
|
|
#line 144 "./xsi/LineSegment.xsi" |
|
3023
|
|
|
|
|
|
|
std::ostringstream out; |
|
3024
|
|
|
|
|
|
|
out << *THIS; |
|
3025
|
|
|
|
|
|
|
RETVAL = out.str(); |
|
3026
|
|
|
|
|
|
|
#line 3027 "Geos.xs.cc" |
|
3027
|
14
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3028
|
|
|
|
|
|
|
} |
|
3029
|
14
|
|
|
|
|
|
XSRETURN(1); |
|
3030
|
14
|
50
|
|
|
|
|
}); } |
|
3031
|
|
|
|
|
|
|
|
|
3032
|
|
|
|
|
|
|
|
|
3033
|
|
|
|
|
|
|
|
|
3034
|
16
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_p0) { xs::throw_guard(aTHX_ cv, [=]() |
|
3035
|
|
|
|
|
|
|
{ |
|
3036
|
8
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3037
|
8
|
|
|
|
|
|
dXSI32; |
|
3038
|
8
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
3039
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
3040
|
|
|
|
|
|
|
{ |
|
3041
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
3042
|
8
|
50
|
|
|
|
|
LineSegment* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3043
|
|
|
|
|
|
|
; |
|
3044
|
|
|
|
|
|
|
SV* newval; |
|
3045
|
|
|
|
|
|
|
|
|
3046
|
8
|
50
|
|
|
|
|
if (items < 2) |
|
3047
|
8
|
|
|
|
|
|
newval = NULL; |
|
3048
|
|
|
|
|
|
|
else { |
|
3049
|
0
|
|
|
|
|
|
newval = ST(1) |
|
3050
|
0
|
|
|
|
|
|
; |
|
3051
|
|
|
|
|
|
|
} |
|
3052
|
|
|
|
|
|
|
#line 150 "./xsi/LineSegment.xsi" |
|
3053
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3054
|
|
|
|
|
|
|
Coordinate* val; |
|
3055
|
|
|
|
|
|
|
switch (ix) { |
|
3056
|
|
|
|
|
|
|
case 0: val = &THIS->p0; break; |
|
3057
|
|
|
|
|
|
|
default: val = &THIS->p1; break; |
|
3058
|
|
|
|
|
|
|
} |
|
3059
|
|
|
|
|
|
|
if (newval) { |
|
3060
|
|
|
|
|
|
|
auto& c = xs::in(newval); |
|
3061
|
|
|
|
|
|
|
*val = c; |
|
3062
|
|
|
|
|
|
|
} |
|
3063
|
|
|
|
|
|
|
RETVAL = new Coordinate(*val); |
|
3064
|
|
|
|
|
|
|
#line 3065 "Geos.xs.cc" |
|
3065
|
|
|
|
|
|
|
{ |
|
3066
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3067
|
8
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3068
|
8
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3069
|
8
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3070
|
|
|
|
|
|
|
} |
|
3071
|
|
|
|
|
|
|
} |
|
3072
|
8
|
|
|
|
|
|
XSRETURN(1); |
|
3073
|
8
|
50
|
|
|
|
|
}); } |
|
3074
|
|
|
|
|
|
|
|
|
3075
|
|
|
|
|
|
|
|
|
3076
|
|
|
|
|
|
|
|
|
3077
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineSegment_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
3078
|
|
|
|
|
|
|
{ |
|
3079
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3080
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
3081
|
|
|
|
|
|
|
{ |
|
3082
|
|
|
|
|
|
|
int RETVAL; |
|
3083
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3084
|
|
|
|
|
|
|
#line 162 "./xsi/LineSegment.xsi" |
|
3085
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
3086
|
|
|
|
|
|
|
#line 3087 "Geos.xs.cc" |
|
3087
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
3088
|
|
|
|
|
|
|
} |
|
3089
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
3090
|
0
|
0
|
|
|
|
|
}); } |
|
3091
|
|
|
|
|
|
|
|
|
3092
|
|
|
|
|
|
|
|
|
3093
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/LineSegment.xsi' */ |
|
3094
|
|
|
|
|
|
|
|
|
3095
|
|
|
|
|
|
|
|
|
3096
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/GeometryFactory.xsi' from 'Geos.xs' */ |
|
3097
|
|
|
|
|
|
|
|
|
3098
|
|
|
|
|
|
|
|
|
3099
|
|
|
|
|
|
|
|
|
3100
|
62
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_create) { xs::throw_guard(aTHX_ cv, [=]() |
|
3101
|
|
|
|
|
|
|
{ |
|
3102
|
31
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3103
|
31
|
50
|
|
|
|
|
if (items < 0 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
3104
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "arg1= NULL, arg2= NULL"); |
|
3105
|
|
|
|
|
|
|
{ |
|
3106
|
|
|
|
|
|
|
GeometryFactory * RETVAL; |
|
3107
|
|
|
|
|
|
|
SV* arg1; |
|
3108
|
|
|
|
|
|
|
SV* arg2; |
|
3109
|
|
|
|
|
|
|
|
|
3110
|
31
|
100
|
|
|
|
|
if (items < 1) |
|
3111
|
27
|
|
|
|
|
|
arg1 = NULL; |
|
3112
|
|
|
|
|
|
|
else { |
|
3113
|
4
|
|
|
|
|
|
arg1 = ST(0) |
|
3114
|
4
|
|
|
|
|
|
; |
|
3115
|
|
|
|
|
|
|
} |
|
3116
|
|
|
|
|
|
|
|
|
3117
|
31
|
100
|
|
|
|
|
if (items < 2) |
|
3118
|
28
|
|
|
|
|
|
arg2 = NULL; |
|
3119
|
|
|
|
|
|
|
else { |
|
3120
|
3
|
|
|
|
|
|
arg2 = ST(1) |
|
3121
|
3
|
|
|
|
|
|
; |
|
3122
|
|
|
|
|
|
|
} |
|
3123
|
|
|
|
|
|
|
#line 5 "./xsi/GeometryFactory.xsi" |
|
3124
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3125
|
|
|
|
|
|
|
GeometryFactory::Ptr ptr; |
|
3126
|
|
|
|
|
|
|
if (!arg1) { |
|
3127
|
|
|
|
|
|
|
ptr = GeometryFactory::create(); |
|
3128
|
|
|
|
|
|
|
} |
|
3129
|
|
|
|
|
|
|
else { |
|
3130
|
|
|
|
|
|
|
auto& pm = xs::in(arg1); |
|
3131
|
|
|
|
|
|
|
if (arg2) { |
|
3132
|
|
|
|
|
|
|
int srid = SvIV(arg2); |
|
3133
|
|
|
|
|
|
|
ptr = GeometryFactory::create(&pm, srid); |
|
3134
|
|
|
|
|
|
|
} |
|
3135
|
|
|
|
|
|
|
else ptr = GeometryFactory::create(&pm); |
|
3136
|
|
|
|
|
|
|
} |
|
3137
|
|
|
|
|
|
|
|
|
3138
|
|
|
|
|
|
|
if (ptr.get()) { |
|
3139
|
|
|
|
|
|
|
/* steal pointer without destroying the factory */ |
|
3140
|
|
|
|
|
|
|
RETVAL = ptr.release(); |
|
3141
|
|
|
|
|
|
|
} |
|
3142
|
|
|
|
|
|
|
else throw ("unsupported arguments"); |
|
3143
|
|
|
|
|
|
|
#line 3144 "Geos.xs.cc" |
|
3144
|
|
|
|
|
|
|
{ |
|
3145
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3146
|
31
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3147
|
31
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3148
|
31
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3149
|
|
|
|
|
|
|
} |
|
3150
|
|
|
|
|
|
|
} |
|
3151
|
31
|
|
|
|
|
|
XSRETURN(1); |
|
3152
|
31
|
50
|
|
|
|
|
}); } |
|
3153
|
|
|
|
|
|
|
|
|
3154
|
|
|
|
|
|
|
|
|
3155
|
|
|
|
|
|
|
|
|
3156
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_getPrecisionModel) { xs::throw_guard(aTHX_ cv, [=]() |
|
3157
|
|
|
|
|
|
|
{ |
|
3158
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3159
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3160
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3161
|
|
|
|
|
|
|
{ |
|
3162
|
|
|
|
|
|
|
PrecisionModel * RETVAL; |
|
3163
|
1
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3164
|
|
|
|
|
|
|
; |
|
3165
|
|
|
|
|
|
|
#line 26 "./xsi/GeometryFactory.xsi" |
|
3166
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3167
|
|
|
|
|
|
|
auto pm = THIS->getPrecisionModel(); |
|
3168
|
|
|
|
|
|
|
RETVAL = new PrecisionModel(*pm); |
|
3169
|
|
|
|
|
|
|
#line 3170 "Geos.xs.cc" |
|
3170
|
|
|
|
|
|
|
{ |
|
3171
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3172
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3173
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3174
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3175
|
|
|
|
|
|
|
} |
|
3176
|
|
|
|
|
|
|
} |
|
3177
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
3178
|
1
|
50
|
|
|
|
|
}); } |
|
3179
|
|
|
|
|
|
|
|
|
3180
|
|
|
|
|
|
|
|
|
3181
|
|
|
|
|
|
|
|
|
3182
|
8
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_getSRID) { xs::throw_guard(aTHX_ cv, [=]() |
|
3183
|
|
|
|
|
|
|
{ |
|
3184
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3185
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
3186
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3187
|
|
|
|
|
|
|
{ |
|
3188
|
|
|
|
|
|
|
int RETVAL; |
|
3189
|
4
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3190
|
4
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3191
|
|
|
|
|
|
|
; |
|
3192
|
|
|
|
|
|
|
#line 30 "./xsi/GeometryFactory.xsi" |
|
3193
|
|
|
|
|
|
|
RETVAL = THIS->getSRID(); |
|
3194
|
|
|
|
|
|
|
#line 3195 "Geos.xs.cc" |
|
3195
|
4
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
3196
|
|
|
|
|
|
|
} |
|
3197
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
3198
|
4
|
50
|
|
|
|
|
}); } |
|
3199
|
|
|
|
|
|
|
|
|
3200
|
|
|
|
|
|
|
|
|
3201
|
|
|
|
|
|
|
|
|
3202
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_createGeometryCollection) { xs::throw_guard(aTHX_ cv, [=]() |
|
3203
|
|
|
|
|
|
|
{ |
|
3204
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3205
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3206
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3207
|
|
|
|
|
|
|
{ |
|
3208
|
|
|
|
|
|
|
GeometryCollection * RETVAL; |
|
3209
|
1
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3210
|
|
|
|
|
|
|
; |
|
3211
|
|
|
|
|
|
|
#line 33 "./xsi/GeometryFactory.xsi" |
|
3212
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3213
|
|
|
|
|
|
|
RETVAL = THIS->createGeometryCollection(); |
|
3214
|
|
|
|
|
|
|
#line 3215 "Geos.xs.cc" |
|
3215
|
|
|
|
|
|
|
{ |
|
3216
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3217
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3218
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3219
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3220
|
|
|
|
|
|
|
} |
|
3221
|
|
|
|
|
|
|
} |
|
3222
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
3223
|
1
|
50
|
|
|
|
|
}); } |
|
3224
|
|
|
|
|
|
|
|
|
3225
|
|
|
|
|
|
|
|
|
3226
|
|
|
|
|
|
|
|
|
3227
|
70
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_createPoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
3228
|
|
|
|
|
|
|
{ |
|
3229
|
35
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3230
|
35
|
50
|
|
|
|
|
if (items < 1 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
3231
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1= Sv{}, arg2= NULL"); |
|
3232
|
|
|
|
|
|
|
{ |
|
3233
|
|
|
|
|
|
|
Point * RETVAL; |
|
3234
|
35
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3235
|
|
|
|
|
|
|
; |
|
3236
|
70
|
|
|
|
|
|
Sv arg1; |
|
3237
|
|
|
|
|
|
|
SV* arg2; |
|
3238
|
|
|
|
|
|
|
|
|
3239
|
35
|
100
|
|
|
|
|
if (items < 2) |
|
3240
|
1
|
|
|
|
|
|
arg1 = Sv{}; |
|
3241
|
|
|
|
|
|
|
else { |
|
3242
|
34
|
|
|
|
|
|
arg1 = ST(1) |
|
3243
|
34
|
50
|
|
|
|
|
; |
|
3244
|
|
|
|
|
|
|
} |
|
3245
|
|
|
|
|
|
|
|
|
3246
|
35
|
100
|
|
|
|
|
if (items < 3) |
|
3247
|
33
|
|
|
|
|
|
arg2 = NULL; |
|
3248
|
|
|
|
|
|
|
else { |
|
3249
|
2
|
|
|
|
|
|
arg2 = ST(2) |
|
3250
|
2
|
|
|
|
|
|
; |
|
3251
|
|
|
|
|
|
|
} |
|
3252
|
|
|
|
|
|
|
#line 37 "./xsi/GeometryFactory.xsi" |
|
3253
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3254
|
|
|
|
|
|
|
if (!arg1) RETVAL = THIS->createPoint(); |
|
3255
|
|
|
|
|
|
|
else { |
|
3256
|
|
|
|
|
|
|
if (!arg1.is_array_ref()) { |
|
3257
|
|
|
|
|
|
|
Object obj {arg1}; |
|
3258
|
|
|
|
|
|
|
if (obj && obj.stash().name() == "Geo::Geos::Coordinate") { |
|
3259
|
|
|
|
|
|
|
auto coord = xs::in(obj); |
|
3260
|
|
|
|
|
|
|
RETVAL = THIS->createPoint(*coord); |
|
3261
|
|
|
|
|
|
|
} |
|
3262
|
|
|
|
|
|
|
else throw ("Object must be blessed into Geo::Geos::Coordinate"); |
|
3263
|
|
|
|
|
|
|
} |
|
3264
|
|
|
|
|
|
|
else { |
|
3265
|
|
|
|
|
|
|
if (!arg2) throw ("missing mandatory argument"); |
|
3266
|
|
|
|
|
|
|
size_t dims = SvIV(arg2); |
|
3267
|
|
|
|
|
|
|
auto seq = Helper::convert_copy(*THIS, Array(arg1), dims); |
|
3268
|
|
|
|
|
|
|
RETVAL = THIS->createPoint(seq); |
|
3269
|
|
|
|
|
|
|
} |
|
3270
|
|
|
|
|
|
|
} |
|
3271
|
|
|
|
|
|
|
#line 3272 "Geos.xs.cc" |
|
3272
|
|
|
|
|
|
|
{ |
|
3273
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3274
|
35
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3275
|
35
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3276
|
35
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3277
|
|
|
|
|
|
|
} |
|
3278
|
|
|
|
|
|
|
} |
|
3279
|
35
|
|
|
|
|
|
XSRETURN(1); |
|
3280
|
35
|
50
|
|
|
|
|
}); } |
|
3281
|
|
|
|
|
|
|
|
|
3282
|
|
|
|
|
|
|
|
|
3283
|
|
|
|
|
|
|
|
|
3284
|
26
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_createMultiPoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
3285
|
|
|
|
|
|
|
{ |
|
3286
|
13
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3287
|
13
|
50
|
|
|
|
|
if (items < 1 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
3288
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1= NULL, arg2= NULL"); |
|
3289
|
|
|
|
|
|
|
{ |
|
3290
|
|
|
|
|
|
|
MultiPoint * RETVAL; |
|
3291
|
13
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3292
|
|
|
|
|
|
|
; |
|
3293
|
|
|
|
|
|
|
SV* arg1; |
|
3294
|
|
|
|
|
|
|
SV* arg2; |
|
3295
|
|
|
|
|
|
|
|
|
3296
|
13
|
100
|
|
|
|
|
if (items < 2) |
|
3297
|
2
|
|
|
|
|
|
arg1 = NULL; |
|
3298
|
|
|
|
|
|
|
else { |
|
3299
|
11
|
|
|
|
|
|
arg1 = ST(1) |
|
3300
|
11
|
|
|
|
|
|
; |
|
3301
|
|
|
|
|
|
|
} |
|
3302
|
|
|
|
|
|
|
|
|
3303
|
13
|
100
|
|
|
|
|
if (items < 3) |
|
3304
|
2
|
|
|
|
|
|
arg2 = NULL; |
|
3305
|
|
|
|
|
|
|
else { |
|
3306
|
11
|
|
|
|
|
|
arg2 = ST(2) |
|
3307
|
11
|
|
|
|
|
|
; |
|
3308
|
|
|
|
|
|
|
} |
|
3309
|
|
|
|
|
|
|
#line 57 "./xsi/GeometryFactory.xsi" |
|
3310
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3311
|
|
|
|
|
|
|
if (!arg1) RETVAL = THIS->createMultiPoint(); |
|
3312
|
|
|
|
|
|
|
else { |
|
3313
|
|
|
|
|
|
|
if (!arg2) throw ("missing mandatory argument"); |
|
3314
|
|
|
|
|
|
|
size_t dims = SvIV(arg2); |
|
3315
|
|
|
|
|
|
|
auto seq = std::unique_ptr(Helper::convert_copy(*THIS, Array(arg1), dims)); |
|
3316
|
|
|
|
|
|
|
RETVAL = THIS->createMultiPoint(*seq); |
|
3317
|
|
|
|
|
|
|
} |
|
3318
|
|
|
|
|
|
|
#line 3319 "Geos.xs.cc" |
|
3319
|
|
|
|
|
|
|
{ |
|
3320
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3321
|
13
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3322
|
13
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3323
|
13
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3324
|
|
|
|
|
|
|
} |
|
3325
|
|
|
|
|
|
|
} |
|
3326
|
13
|
|
|
|
|
|
XSRETURN(1); |
|
3327
|
13
|
50
|
|
|
|
|
}); } |
|
3328
|
|
|
|
|
|
|
|
|
3329
|
|
|
|
|
|
|
|
|
3330
|
|
|
|
|
|
|
|
|
3331
|
44
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_createLineString) { xs::throw_guard(aTHX_ cv, [=]() |
|
3332
|
|
|
|
|
|
|
{ |
|
3333
|
22
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3334
|
22
|
50
|
|
|
|
|
if (items < 1 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
3335
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1= NULL, arg2= NULL"); |
|
3336
|
|
|
|
|
|
|
{ |
|
3337
|
|
|
|
|
|
|
LineString * RETVAL; |
|
3338
|
22
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3339
|
|
|
|
|
|
|
; |
|
3340
|
|
|
|
|
|
|
SV* arg1; |
|
3341
|
|
|
|
|
|
|
SV* arg2; |
|
3342
|
|
|
|
|
|
|
|
|
3343
|
22
|
100
|
|
|
|
|
if (items < 2) |
|
3344
|
1
|
|
|
|
|
|
arg1 = NULL; |
|
3345
|
|
|
|
|
|
|
else { |
|
3346
|
21
|
|
|
|
|
|
arg1 = ST(1) |
|
3347
|
21
|
|
|
|
|
|
; |
|
3348
|
|
|
|
|
|
|
} |
|
3349
|
|
|
|
|
|
|
|
|
3350
|
22
|
100
|
|
|
|
|
if (items < 3) |
|
3351
|
1
|
|
|
|
|
|
arg2 = NULL; |
|
3352
|
|
|
|
|
|
|
else { |
|
3353
|
21
|
|
|
|
|
|
arg2 = ST(2) |
|
3354
|
21
|
|
|
|
|
|
; |
|
3355
|
|
|
|
|
|
|
} |
|
3356
|
|
|
|
|
|
|
#line 67 "./xsi/GeometryFactory.xsi" |
|
3357
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3358
|
|
|
|
|
|
|
if (!arg1) RETVAL = THIS->createLineString(); |
|
3359
|
|
|
|
|
|
|
else { |
|
3360
|
|
|
|
|
|
|
if (!arg2) throw ("missing argument"); |
|
3361
|
|
|
|
|
|
|
size_t dims = SvIV(arg2); |
|
3362
|
|
|
|
|
|
|
auto seq = std::unique_ptr(Helper::convert_copy(*THIS, Array(arg1), dims)); |
|
3363
|
|
|
|
|
|
|
RETVAL = THIS->createLineString(*seq); |
|
3364
|
|
|
|
|
|
|
} |
|
3365
|
|
|
|
|
|
|
#line 3366 "Geos.xs.cc" |
|
3366
|
|
|
|
|
|
|
{ |
|
3367
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3368
|
22
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3369
|
22
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3370
|
22
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3371
|
|
|
|
|
|
|
} |
|
3372
|
|
|
|
|
|
|
} |
|
3373
|
22
|
|
|
|
|
|
XSRETURN(1); |
|
3374
|
22
|
50
|
|
|
|
|
}); } |
|
3375
|
|
|
|
|
|
|
|
|
3376
|
|
|
|
|
|
|
|
|
3377
|
|
|
|
|
|
|
|
|
3378
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_createMultiLineString) { xs::throw_guard(aTHX_ cv, [=]() |
|
3379
|
|
|
|
|
|
|
{ |
|
3380
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3381
|
3
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
3382
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1= NULL"); |
|
3383
|
|
|
|
|
|
|
{ |
|
3384
|
|
|
|
|
|
|
MultiLineString * RETVAL; |
|
3385
|
3
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3386
|
|
|
|
|
|
|
; |
|
3387
|
|
|
|
|
|
|
SV* arg1; |
|
3388
|
|
|
|
|
|
|
|
|
3389
|
3
|
100
|
|
|
|
|
if (items < 2) |
|
3390
|
1
|
|
|
|
|
|
arg1 = NULL; |
|
3391
|
|
|
|
|
|
|
else { |
|
3392
|
2
|
|
|
|
|
|
arg1 = ST(1) |
|
3393
|
2
|
|
|
|
|
|
; |
|
3394
|
|
|
|
|
|
|
} |
|
3395
|
|
|
|
|
|
|
#line 77 "./xsi/GeometryFactory.xsi" |
|
3396
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3397
|
|
|
|
|
|
|
if (!arg1) RETVAL = THIS->createMultiLineString(); |
|
3398
|
|
|
|
|
|
|
else { |
|
3399
|
|
|
|
|
|
|
Array geometries(arg1); |
|
3400
|
|
|
|
|
|
|
if (!geometries) throw ("unsupported argument"); |
|
3401
|
|
|
|
|
|
|
auto lines = Helper::convert_geometries(geometries); |
|
3402
|
|
|
|
|
|
|
RETVAL = THIS->createMultiLineString(lines); |
|
3403
|
|
|
|
|
|
|
} |
|
3404
|
|
|
|
|
|
|
#line 3405 "Geos.xs.cc" |
|
3405
|
|
|
|
|
|
|
{ |
|
3406
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3407
|
3
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3408
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3409
|
3
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3410
|
|
|
|
|
|
|
} |
|
3411
|
|
|
|
|
|
|
} |
|
3412
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
3413
|
3
|
50
|
|
|
|
|
}); } |
|
3414
|
|
|
|
|
|
|
|
|
3415
|
|
|
|
|
|
|
|
|
3416
|
|
|
|
|
|
|
|
|
3417
|
44
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_createLinearRing) { xs::throw_guard(aTHX_ cv, [=]() |
|
3418
|
|
|
|
|
|
|
{ |
|
3419
|
22
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3420
|
22
|
50
|
|
|
|
|
if (items < 1 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
3421
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1= NULL, arg2= NULL"); |
|
3422
|
|
|
|
|
|
|
{ |
|
3423
|
|
|
|
|
|
|
LinearRing * RETVAL; |
|
3424
|
22
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3425
|
|
|
|
|
|
|
; |
|
3426
|
|
|
|
|
|
|
SV* arg1; |
|
3427
|
|
|
|
|
|
|
SV* arg2; |
|
3428
|
|
|
|
|
|
|
|
|
3429
|
22
|
100
|
|
|
|
|
if (items < 2) |
|
3430
|
1
|
|
|
|
|
|
arg1 = NULL; |
|
3431
|
|
|
|
|
|
|
else { |
|
3432
|
21
|
|
|
|
|
|
arg1 = ST(1) |
|
3433
|
21
|
|
|
|
|
|
; |
|
3434
|
|
|
|
|
|
|
} |
|
3435
|
|
|
|
|
|
|
|
|
3436
|
22
|
100
|
|
|
|
|
if (items < 3) |
|
3437
|
1
|
|
|
|
|
|
arg2 = NULL; |
|
3438
|
|
|
|
|
|
|
else { |
|
3439
|
21
|
|
|
|
|
|
arg2 = ST(2) |
|
3440
|
21
|
|
|
|
|
|
; |
|
3441
|
|
|
|
|
|
|
} |
|
3442
|
|
|
|
|
|
|
#line 87 "./xsi/GeometryFactory.xsi" |
|
3443
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3444
|
|
|
|
|
|
|
if (!arg1) RETVAL = THIS->createLinearRing(); |
|
3445
|
|
|
|
|
|
|
else { |
|
3446
|
|
|
|
|
|
|
if (!arg2) throw ("missing argument"); |
|
3447
|
|
|
|
|
|
|
size_t dims = SvIV(arg2); |
|
3448
|
|
|
|
|
|
|
auto seq = std::unique_ptr(Helper::convert_copy(*THIS, Array(arg1), dims)); |
|
3449
|
|
|
|
|
|
|
RETVAL = THIS->createLinearRing(*seq); |
|
3450
|
|
|
|
|
|
|
} |
|
3451
|
|
|
|
|
|
|
#line 3452 "Geos.xs.cc" |
|
3452
|
|
|
|
|
|
|
{ |
|
3453
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3454
|
22
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3455
|
22
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3456
|
22
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3457
|
|
|
|
|
|
|
} |
|
3458
|
|
|
|
|
|
|
} |
|
3459
|
22
|
|
|
|
|
|
XSRETURN(1); |
|
3460
|
22
|
50
|
|
|
|
|
}); } |
|
3461
|
|
|
|
|
|
|
|
|
3462
|
|
|
|
|
|
|
|
|
3463
|
|
|
|
|
|
|
|
|
3464
|
32
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_createPolygon) { xs::throw_guard(aTHX_ cv, [=]() |
|
3465
|
|
|
|
|
|
|
{ |
|
3466
|
16
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3467
|
16
|
50
|
|
|
|
|
if (items < 1 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
3468
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1= NULL, arg2= NULL"); |
|
3469
|
|
|
|
|
|
|
{ |
|
3470
|
|
|
|
|
|
|
Polygon * RETVAL; |
|
3471
|
16
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3472
|
|
|
|
|
|
|
; |
|
3473
|
|
|
|
|
|
|
SV* arg1; |
|
3474
|
|
|
|
|
|
|
SV* arg2; |
|
3475
|
|
|
|
|
|
|
|
|
3476
|
16
|
100
|
|
|
|
|
if (items < 2) |
|
3477
|
1
|
|
|
|
|
|
arg1 = NULL; |
|
3478
|
|
|
|
|
|
|
else { |
|
3479
|
15
|
|
|
|
|
|
arg1 = ST(1) |
|
3480
|
15
|
|
|
|
|
|
; |
|
3481
|
|
|
|
|
|
|
} |
|
3482
|
|
|
|
|
|
|
|
|
3483
|
16
|
100
|
|
|
|
|
if (items < 3) |
|
3484
|
14
|
|
|
|
|
|
arg2 = NULL; |
|
3485
|
|
|
|
|
|
|
else { |
|
3486
|
2
|
|
|
|
|
|
arg2 = ST(2) |
|
3487
|
2
|
|
|
|
|
|
; |
|
3488
|
|
|
|
|
|
|
} |
|
3489
|
|
|
|
|
|
|
#line 97 "./xsi/GeometryFactory.xsi" |
|
3490
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3491
|
|
|
|
|
|
|
if (!arg1) RETVAL = THIS->createPolygon(); |
|
3492
|
|
|
|
|
|
|
else { |
|
3493
|
|
|
|
|
|
|
auto ring = xs::in(arg1); |
|
3494
|
|
|
|
|
|
|
auto holes = Helper::convert_geometries(Array(arg2)); |
|
3495
|
|
|
|
|
|
|
RETVAL = THIS->createPolygon(*ring, holes); |
|
3496
|
|
|
|
|
|
|
} |
|
3497
|
|
|
|
|
|
|
#line 3498 "Geos.xs.cc" |
|
3498
|
|
|
|
|
|
|
{ |
|
3499
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3500
|
16
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3501
|
16
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3502
|
16
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3503
|
|
|
|
|
|
|
} |
|
3504
|
|
|
|
|
|
|
} |
|
3505
|
16
|
|
|
|
|
|
XSRETURN(1); |
|
3506
|
16
|
50
|
|
|
|
|
}); } |
|
3507
|
|
|
|
|
|
|
|
|
3508
|
|
|
|
|
|
|
|
|
3509
|
|
|
|
|
|
|
|
|
3510
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_createMultiPolygon) { xs::throw_guard(aTHX_ cv, [=]() |
|
3511
|
|
|
|
|
|
|
{ |
|
3512
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3513
|
2
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
3514
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1= NULL"); |
|
3515
|
|
|
|
|
|
|
{ |
|
3516
|
|
|
|
|
|
|
MultiPolygon * RETVAL; |
|
3517
|
2
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3518
|
|
|
|
|
|
|
; |
|
3519
|
|
|
|
|
|
|
SV* arg1; |
|
3520
|
|
|
|
|
|
|
|
|
3521
|
2
|
100
|
|
|
|
|
if (items < 2) |
|
3522
|
1
|
|
|
|
|
|
arg1 = NULL; |
|
3523
|
|
|
|
|
|
|
else { |
|
3524
|
1
|
|
|
|
|
|
arg1 = ST(1) |
|
3525
|
1
|
|
|
|
|
|
; |
|
3526
|
|
|
|
|
|
|
} |
|
3527
|
|
|
|
|
|
|
#line 106 "./xsi/GeometryFactory.xsi" |
|
3528
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3529
|
|
|
|
|
|
|
if (!arg1) RETVAL = THIS->createMultiPolygon(); |
|
3530
|
|
|
|
|
|
|
else { |
|
3531
|
|
|
|
|
|
|
auto polygons = Helper::convert_geometries(Array(arg1)); |
|
3532
|
|
|
|
|
|
|
RETVAL = THIS->createMultiPolygon(polygons); |
|
3533
|
|
|
|
|
|
|
} |
|
3534
|
|
|
|
|
|
|
#line 3535 "Geos.xs.cc" |
|
3535
|
|
|
|
|
|
|
{ |
|
3536
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3537
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3538
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3539
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3540
|
|
|
|
|
|
|
} |
|
3541
|
|
|
|
|
|
|
} |
|
3542
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
3543
|
2
|
50
|
|
|
|
|
}); } |
|
3544
|
|
|
|
|
|
|
|
|
3545
|
|
|
|
|
|
|
|
|
3546
|
|
|
|
|
|
|
|
|
3547
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_toGeometry) { xs::throw_guard(aTHX_ cv, [=]() |
|
3548
|
|
|
|
|
|
|
{ |
|
3549
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3550
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
3551
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, env"); |
|
3552
|
|
|
|
|
|
|
{ |
|
3553
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
3554
|
1
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3555
|
|
|
|
|
|
|
; |
|
3556
|
1
|
50
|
|
|
|
|
Envelope* env = xs::in(aTHX_ ST(1)); |
|
3557
|
|
|
|
|
|
|
; |
|
3558
|
|
|
|
|
|
|
#line 114 "./xsi/GeometryFactory.xsi" |
|
3559
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->toGeometry(env)); |
|
3560
|
|
|
|
|
|
|
#line 3561 "Geos.xs.cc" |
|
3561
|
|
|
|
|
|
|
{ |
|
3562
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3563
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
3564
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
3565
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
3566
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
3567
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
3568
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
3569
|
|
|
|
|
|
|
case SVt_PVCV: |
|
3570
|
|
|
|
|
|
|
case SVt_PVIO: |
|
3571
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
3572
|
0
|
|
|
|
|
|
break; |
|
3573
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
3574
|
|
|
|
|
|
|
} |
|
3575
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3576
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
3577
|
|
|
|
|
|
|
} |
|
3578
|
|
|
|
|
|
|
} |
|
3579
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
3580
|
1
|
50
|
|
|
|
|
}); } |
|
3581
|
|
|
|
|
|
|
|
|
3582
|
|
|
|
|
|
|
|
|
3583
|
|
|
|
|
|
|
|
|
3584
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_createEmptyGeometry) { xs::throw_guard(aTHX_ cv, [=]() |
|
3585
|
|
|
|
|
|
|
{ |
|
3586
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3587
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3588
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3589
|
|
|
|
|
|
|
{ |
|
3590
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
3591
|
1
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3592
|
|
|
|
|
|
|
; |
|
3593
|
|
|
|
|
|
|
#line 118 "./xsi/GeometryFactory.xsi" |
|
3594
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->createEmptyGeometry()); |
|
3595
|
|
|
|
|
|
|
#line 3596 "Geos.xs.cc" |
|
3596
|
|
|
|
|
|
|
{ |
|
3597
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3598
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
3599
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
3600
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
3601
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
3602
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
3603
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
3604
|
|
|
|
|
|
|
case SVt_PVCV: |
|
3605
|
|
|
|
|
|
|
case SVt_PVIO: |
|
3606
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
3607
|
0
|
|
|
|
|
|
break; |
|
3608
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
3609
|
|
|
|
|
|
|
} |
|
3610
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3611
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
3612
|
|
|
|
|
|
|
} |
|
3613
|
|
|
|
|
|
|
} |
|
3614
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
3615
|
1
|
50
|
|
|
|
|
}); } |
|
3616
|
|
|
|
|
|
|
|
|
3617
|
|
|
|
|
|
|
|
|
3618
|
|
|
|
|
|
|
|
|
3619
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryFactory_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
3620
|
|
|
|
|
|
|
{ |
|
3621
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3622
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
3623
|
|
|
|
|
|
|
{ |
|
3624
|
|
|
|
|
|
|
int RETVAL; |
|
3625
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3626
|
|
|
|
|
|
|
#line 121 "./xsi/GeometryFactory.xsi" |
|
3627
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
3628
|
|
|
|
|
|
|
#line 3629 "Geos.xs.cc" |
|
3629
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
3630
|
|
|
|
|
|
|
} |
|
3631
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
3632
|
0
|
0
|
|
|
|
|
}); } |
|
3633
|
|
|
|
|
|
|
|
|
3634
|
|
|
|
|
|
|
|
|
3635
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/GeometryFactory.xsi' */ |
|
3636
|
|
|
|
|
|
|
|
|
3637
|
|
|
|
|
|
|
|
|
3638
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/Geometry.xsi' from 'Geos.xs' */ |
|
3639
|
|
|
|
|
|
|
|
|
3640
|
|
|
|
|
|
|
|
|
3641
|
|
|
|
|
|
|
|
|
3642
|
28
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getSRID) { xs::throw_guard(aTHX_ cv, [=]() |
|
3643
|
|
|
|
|
|
|
{ |
|
3644
|
14
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3645
|
14
|
50
|
|
|
|
|
if (items != 1) |
|
3646
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3647
|
|
|
|
|
|
|
{ |
|
3648
|
|
|
|
|
|
|
int RETVAL; |
|
3649
|
14
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3650
|
14
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3651
|
|
|
|
|
|
|
; |
|
3652
|
|
|
|
|
|
|
#line 4 "./xsi/Geometry.xsi" |
|
3653
|
|
|
|
|
|
|
RETVAL = THIS->getSRID(); |
|
3654
|
|
|
|
|
|
|
#line 3655 "Geos.xs.cc" |
|
3655
|
14
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
3656
|
|
|
|
|
|
|
} |
|
3657
|
14
|
|
|
|
|
|
XSRETURN(1); |
|
3658
|
14
|
50
|
|
|
|
|
}); } |
|
3659
|
|
|
|
|
|
|
|
|
3660
|
|
|
|
|
|
|
|
|
3661
|
|
|
|
|
|
|
|
|
3662
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_setSRID) { xs::throw_guard(aTHX_ cv, [=]() |
|
3663
|
|
|
|
|
|
|
{ |
|
3664
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3665
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
3666
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newSRID"); |
|
3667
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
3668
|
6
|
|
|
|
|
|
SP -= items; |
|
3669
|
|
|
|
|
|
|
{ |
|
3670
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3671
|
|
|
|
|
|
|
; |
|
3672
|
6
|
50
|
|
|
|
|
int newSRID = (int)SvIV(ST(1)) |
|
3673
|
|
|
|
|
|
|
; |
|
3674
|
|
|
|
|
|
|
#line 6 "./xsi/Geometry.xsi" |
|
3675
|
|
|
|
|
|
|
THIS->setSRID(newSRID); |
|
3676
|
|
|
|
|
|
|
#line 3677 "Geos.xs.cc" |
|
3677
|
6
|
|
|
|
|
|
PUTBACK; |
|
3678
|
6
|
|
|
|
|
|
return; |
|
3679
|
|
|
|
|
|
|
} |
|
3680
|
6
|
50
|
|
|
|
|
}); } |
|
3681
|
|
|
|
|
|
|
|
|
3682
|
|
|
|
|
|
|
|
|
3683
|
|
|
|
|
|
|
|
|
3684
|
34
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_isEmpty) { xs::throw_guard(aTHX_ cv, [=]() |
|
3685
|
|
|
|
|
|
|
{ |
|
3686
|
17
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3687
|
17
|
50
|
|
|
|
|
if (items != 1) |
|
3688
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3689
|
|
|
|
|
|
|
{ |
|
3690
|
|
|
|
|
|
|
bool RETVAL; |
|
3691
|
17
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3692
|
|
|
|
|
|
|
; |
|
3693
|
|
|
|
|
|
|
#line 8 "./xsi/Geometry.xsi" |
|
3694
|
|
|
|
|
|
|
RETVAL = THIS->isEmpty(); |
|
3695
|
|
|
|
|
|
|
#line 3696 "Geos.xs.cc" |
|
3696
|
17
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
3697
|
|
|
|
|
|
|
} |
|
3698
|
17
|
|
|
|
|
|
XSRETURN(1); |
|
3699
|
17
|
50
|
|
|
|
|
}); } |
|
3700
|
|
|
|
|
|
|
|
|
3701
|
|
|
|
|
|
|
|
|
3702
|
|
|
|
|
|
|
|
|
3703
|
28
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_isSimple) { xs::throw_guard(aTHX_ cv, [=]() |
|
3704
|
|
|
|
|
|
|
{ |
|
3705
|
14
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3706
|
14
|
50
|
|
|
|
|
if (items != 1) |
|
3707
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3708
|
|
|
|
|
|
|
{ |
|
3709
|
|
|
|
|
|
|
bool RETVAL; |
|
3710
|
14
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3711
|
|
|
|
|
|
|
; |
|
3712
|
|
|
|
|
|
|
#line 10 "./xsi/Geometry.xsi" |
|
3713
|
|
|
|
|
|
|
RETVAL = THIS->isSimple(); |
|
3714
|
|
|
|
|
|
|
#line 3715 "Geos.xs.cc" |
|
3715
|
14
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
3716
|
|
|
|
|
|
|
} |
|
3717
|
14
|
|
|
|
|
|
XSRETURN(1); |
|
3718
|
14
|
50
|
|
|
|
|
}); } |
|
3719
|
|
|
|
|
|
|
|
|
3720
|
|
|
|
|
|
|
|
|
3721
|
|
|
|
|
|
|
|
|
3722
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_isRectangle) { xs::throw_guard(aTHX_ cv, [=]() |
|
3723
|
|
|
|
|
|
|
{ |
|
3724
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3725
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
3726
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3727
|
|
|
|
|
|
|
{ |
|
3728
|
|
|
|
|
|
|
bool RETVAL; |
|
3729
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3730
|
|
|
|
|
|
|
; |
|
3731
|
|
|
|
|
|
|
#line 12 "./xsi/Geometry.xsi" |
|
3732
|
|
|
|
|
|
|
RETVAL = THIS->isRectangle(); |
|
3733
|
|
|
|
|
|
|
#line 3734 "Geos.xs.cc" |
|
3734
|
6
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
3735
|
|
|
|
|
|
|
} |
|
3736
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
3737
|
6
|
50
|
|
|
|
|
}); } |
|
3738
|
|
|
|
|
|
|
|
|
3739
|
|
|
|
|
|
|
|
|
3740
|
|
|
|
|
|
|
|
|
3741
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_isValid) { xs::throw_guard(aTHX_ cv, [=]() |
|
3742
|
|
|
|
|
|
|
{ |
|
3743
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3744
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
3745
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3746
|
|
|
|
|
|
|
{ |
|
3747
|
|
|
|
|
|
|
bool RETVAL; |
|
3748
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3749
|
|
|
|
|
|
|
; |
|
3750
|
|
|
|
|
|
|
#line 14 "./xsi/Geometry.xsi" |
|
3751
|
|
|
|
|
|
|
RETVAL = THIS->isValid(); |
|
3752
|
|
|
|
|
|
|
#line 3753 "Geos.xs.cc" |
|
3753
|
6
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
3754
|
|
|
|
|
|
|
} |
|
3755
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
3756
|
6
|
50
|
|
|
|
|
}); } |
|
3757
|
|
|
|
|
|
|
|
|
3758
|
|
|
|
|
|
|
|
|
3759
|
|
|
|
|
|
|
|
|
3760
|
30
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getNumPoints) { xs::throw_guard(aTHX_ cv, [=]() |
|
3761
|
|
|
|
|
|
|
{ |
|
3762
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3763
|
15
|
50
|
|
|
|
|
if (items != 1) |
|
3764
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3765
|
|
|
|
|
|
|
{ |
|
3766
|
|
|
|
|
|
|
size_t RETVAL; |
|
3767
|
15
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3768
|
15
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3769
|
|
|
|
|
|
|
; |
|
3770
|
|
|
|
|
|
|
#line 16 "./xsi/Geometry.xsi" |
|
3771
|
|
|
|
|
|
|
RETVAL = THIS->getNumPoints(); |
|
3772
|
|
|
|
|
|
|
#line 3773 "Geos.xs.cc" |
|
3773
|
15
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
3774
|
|
|
|
|
|
|
} |
|
3775
|
15
|
|
|
|
|
|
XSRETURN(1); |
|
3776
|
15
|
50
|
|
|
|
|
}); } |
|
3777
|
|
|
|
|
|
|
|
|
3778
|
|
|
|
|
|
|
|
|
3779
|
|
|
|
|
|
|
|
|
3780
|
18
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getDimension) { xs::throw_guard(aTHX_ cv, [=]() |
|
3781
|
|
|
|
|
|
|
{ |
|
3782
|
9
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3783
|
9
|
50
|
|
|
|
|
if (items != 1) |
|
3784
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3785
|
|
|
|
|
|
|
{ |
|
3786
|
|
|
|
|
|
|
int RETVAL; |
|
3787
|
9
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3788
|
9
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3789
|
|
|
|
|
|
|
; |
|
3790
|
|
|
|
|
|
|
#line 18 "./xsi/Geometry.xsi" |
|
3791
|
|
|
|
|
|
|
RETVAL = THIS->getDimension(); |
|
3792
|
|
|
|
|
|
|
#line 3793 "Geos.xs.cc" |
|
3793
|
9
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
3794
|
|
|
|
|
|
|
} |
|
3795
|
9
|
|
|
|
|
|
XSRETURN(1); |
|
3796
|
9
|
50
|
|
|
|
|
}); } |
|
3797
|
|
|
|
|
|
|
|
|
3798
|
|
|
|
|
|
|
|
|
3799
|
|
|
|
|
|
|
|
|
3800
|
30
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getCoordinateDimension) { xs::throw_guard(aTHX_ cv, [=]() |
|
3801
|
|
|
|
|
|
|
{ |
|
3802
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3803
|
15
|
50
|
|
|
|
|
if (items != 1) |
|
3804
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3805
|
|
|
|
|
|
|
{ |
|
3806
|
|
|
|
|
|
|
int RETVAL; |
|
3807
|
15
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3808
|
15
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3809
|
|
|
|
|
|
|
; |
|
3810
|
|
|
|
|
|
|
#line 20 "./xsi/Geometry.xsi" |
|
3811
|
|
|
|
|
|
|
RETVAL = THIS->getCoordinateDimension(); |
|
3812
|
|
|
|
|
|
|
#line 3813 "Geos.xs.cc" |
|
3813
|
15
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
3814
|
|
|
|
|
|
|
} |
|
3815
|
15
|
|
|
|
|
|
XSRETURN(1); |
|
3816
|
15
|
50
|
|
|
|
|
}); } |
|
3817
|
|
|
|
|
|
|
|
|
3818
|
|
|
|
|
|
|
|
|
3819
|
|
|
|
|
|
|
|
|
3820
|
30
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getBoundaryDimension) { xs::throw_guard(aTHX_ cv, [=]() |
|
3821
|
|
|
|
|
|
|
{ |
|
3822
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3823
|
15
|
50
|
|
|
|
|
if (items != 1) |
|
3824
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3825
|
|
|
|
|
|
|
{ |
|
3826
|
|
|
|
|
|
|
int RETVAL; |
|
3827
|
15
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3828
|
15
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3829
|
|
|
|
|
|
|
; |
|
3830
|
|
|
|
|
|
|
#line 22 "./xsi/Geometry.xsi" |
|
3831
|
|
|
|
|
|
|
RETVAL = THIS->getBoundaryDimension(); |
|
3832
|
|
|
|
|
|
|
#line 3833 "Geos.xs.cc" |
|
3833
|
15
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
3834
|
|
|
|
|
|
|
} |
|
3835
|
15
|
|
|
|
|
|
XSRETURN(1); |
|
3836
|
15
|
50
|
|
|
|
|
}); } |
|
3837
|
|
|
|
|
|
|
|
|
3838
|
|
|
|
|
|
|
|
|
3839
|
|
|
|
|
|
|
|
|
3840
|
22
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getNumGeometries) { xs::throw_guard(aTHX_ cv, [=]() |
|
3841
|
|
|
|
|
|
|
{ |
|
3842
|
11
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3843
|
11
|
50
|
|
|
|
|
if (items != 1) |
|
3844
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3845
|
|
|
|
|
|
|
{ |
|
3846
|
|
|
|
|
|
|
int RETVAL; |
|
3847
|
11
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3848
|
11
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3849
|
|
|
|
|
|
|
; |
|
3850
|
|
|
|
|
|
|
#line 24 "./xsi/Geometry.xsi" |
|
3851
|
|
|
|
|
|
|
RETVAL = THIS->getNumGeometries(); |
|
3852
|
|
|
|
|
|
|
#line 3853 "Geos.xs.cc" |
|
3853
|
11
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
3854
|
|
|
|
|
|
|
} |
|
3855
|
11
|
|
|
|
|
|
XSRETURN(1); |
|
3856
|
11
|
50
|
|
|
|
|
}); } |
|
3857
|
|
|
|
|
|
|
|
|
3858
|
|
|
|
|
|
|
|
|
3859
|
|
|
|
|
|
|
|
|
3860
|
8
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_reverse) { xs::throw_guard(aTHX_ cv, [=]() |
|
3861
|
|
|
|
|
|
|
{ |
|
3862
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3863
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
3864
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3865
|
|
|
|
|
|
|
{ |
|
3866
|
8
|
|
|
|
|
|
Sv RETVAL; |
|
3867
|
4
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3868
|
|
|
|
|
|
|
; |
|
3869
|
|
|
|
|
|
|
#line 26 "./xsi/Geometry.xsi" |
|
3870
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->reverse()); |
|
3871
|
|
|
|
|
|
|
#line 3872 "Geos.xs.cc" |
|
3872
|
|
|
|
|
|
|
{ |
|
3873
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3874
|
4
|
|
|
|
|
|
RETVALSV = NULL; |
|
3875
|
4
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
3876
|
4
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
3877
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
3878
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
3879
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
3880
|
|
|
|
|
|
|
case SVt_PVCV: |
|
3881
|
|
|
|
|
|
|
case SVt_PVIO: |
|
3882
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
3883
|
0
|
|
|
|
|
|
break; |
|
3884
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
3885
|
|
|
|
|
|
|
} |
|
3886
|
4
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3887
|
4
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
3888
|
|
|
|
|
|
|
} |
|
3889
|
|
|
|
|
|
|
} |
|
3890
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
3891
|
4
|
50
|
|
|
|
|
}); } |
|
3892
|
|
|
|
|
|
|
|
|
3893
|
|
|
|
|
|
|
|
|
3894
|
|
|
|
|
|
|
|
|
3895
|
26
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getGeometryN) { xs::throw_guard(aTHX_ cv, [=]() |
|
3896
|
|
|
|
|
|
|
{ |
|
3897
|
13
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3898
|
13
|
50
|
|
|
|
|
if (items != 2) |
|
3899
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, n"); |
|
3900
|
|
|
|
|
|
|
{ |
|
3901
|
26
|
|
|
|
|
|
Sv RETVAL; |
|
3902
|
13
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3903
|
|
|
|
|
|
|
; |
|
3904
|
13
|
50
|
|
|
|
|
size_t n = (size_t)SvUV(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
3905
|
|
|
|
|
|
|
; |
|
3906
|
|
|
|
|
|
|
#line 29 "./xsi/Geometry.xsi" |
|
3907
|
|
|
|
|
|
|
auto g = THIS->getGeometryN(n); |
|
3908
|
|
|
|
|
|
|
if (g) RETVAL = Helper::uplift(g->clone()); |
|
3909
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
3910
|
|
|
|
|
|
|
#line 3911 "Geos.xs.cc" |
|
3911
|
|
|
|
|
|
|
{ |
|
3912
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3913
|
13
|
|
|
|
|
|
RETVALSV = NULL; |
|
3914
|
13
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
3915
|
13
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
3916
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
3917
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
3918
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
3919
|
|
|
|
|
|
|
case SVt_PVCV: |
|
3920
|
|
|
|
|
|
|
case SVt_PVIO: |
|
3921
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
3922
|
0
|
|
|
|
|
|
break; |
|
3923
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
3924
|
|
|
|
|
|
|
} |
|
3925
|
13
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3926
|
13
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
3927
|
|
|
|
|
|
|
} |
|
3928
|
|
|
|
|
|
|
} |
|
3929
|
13
|
|
|
|
|
|
XSRETURN(1); |
|
3930
|
13
|
50
|
|
|
|
|
}); } |
|
3931
|
|
|
|
|
|
|
|
|
3932
|
|
|
|
|
|
|
|
|
3933
|
|
|
|
|
|
|
|
|
3934
|
44
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getCoordinate) { xs::throw_guard(aTHX_ cv, [=]() |
|
3935
|
|
|
|
|
|
|
{ |
|
3936
|
22
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3937
|
22
|
50
|
|
|
|
|
if (items != 1) |
|
3938
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3939
|
|
|
|
|
|
|
{ |
|
3940
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
3941
|
22
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3942
|
|
|
|
|
|
|
; |
|
3943
|
|
|
|
|
|
|
#line 35 "./xsi/Geometry.xsi" |
|
3944
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3945
|
|
|
|
|
|
|
// avoid mem-leak due to https://trac.osgeo.org/geos/ticket/918 |
|
3946
|
|
|
|
|
|
|
if (THIS->isEmpty()) XSRETURN_UNDEF; |
|
3947
|
|
|
|
|
|
|
|
|
3948
|
|
|
|
|
|
|
auto c = THIS->getCoordinate(); |
|
3949
|
|
|
|
|
|
|
if (c) RETVAL = new Coordinate(*c); |
|
3950
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
3951
|
|
|
|
|
|
|
#line 3952 "Geos.xs.cc" |
|
3952
|
|
|
|
|
|
|
{ |
|
3953
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3954
|
14
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
3955
|
14
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3956
|
22
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
3957
|
|
|
|
|
|
|
} |
|
3958
|
|
|
|
|
|
|
} |
|
3959
|
22
|
|
|
|
|
|
XSRETURN(1); |
|
3960
|
22
|
50
|
|
|
|
|
}); } |
|
3961
|
|
|
|
|
|
|
|
|
3962
|
|
|
|
|
|
|
|
|
3963
|
|
|
|
|
|
|
|
|
3964
|
28
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getGeometryType) { xs::throw_guard(aTHX_ cv, [=]() |
|
3965
|
|
|
|
|
|
|
{ |
|
3966
|
14
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3967
|
14
|
50
|
|
|
|
|
if (items != 1) |
|
3968
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3969
|
|
|
|
|
|
|
{ |
|
3970
|
28
|
|
|
|
|
|
std::string RETVAL; |
|
3971
|
14
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3972
|
14
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3973
|
|
|
|
|
|
|
; |
|
3974
|
|
|
|
|
|
|
#line 43 "./xsi/Geometry.xsi" |
|
3975
|
|
|
|
|
|
|
RETVAL = THIS->getGeometryType(); |
|
3976
|
|
|
|
|
|
|
#line 3977 "Geos.xs.cc" |
|
3977
|
14
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3978
|
|
|
|
|
|
|
} |
|
3979
|
14
|
|
|
|
|
|
XSRETURN(1); |
|
3980
|
14
|
50
|
|
|
|
|
}); } |
|
3981
|
|
|
|
|
|
|
|
|
3982
|
|
|
|
|
|
|
|
|
3983
|
|
|
|
|
|
|
|
|
3984
|
64
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getGeometryTypeId) { xs::throw_guard(aTHX_ cv, [=]() |
|
3985
|
|
|
|
|
|
|
{ |
|
3986
|
32
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3987
|
32
|
50
|
|
|
|
|
if (items != 1) |
|
3988
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3989
|
|
|
|
|
|
|
{ |
|
3990
|
|
|
|
|
|
|
int RETVAL; |
|
3991
|
32
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3992
|
32
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3993
|
|
|
|
|
|
|
; |
|
3994
|
|
|
|
|
|
|
#line 45 "./xsi/Geometry.xsi" |
|
3995
|
|
|
|
|
|
|
RETVAL = THIS->getGeometryTypeId(); |
|
3996
|
|
|
|
|
|
|
#line 3997 "Geos.xs.cc" |
|
3997
|
32
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
3998
|
|
|
|
|
|
|
} |
|
3999
|
32
|
|
|
|
|
|
XSRETURN(1); |
|
4000
|
32
|
50
|
|
|
|
|
}); } |
|
4001
|
|
|
|
|
|
|
|
|
4002
|
|
|
|
|
|
|
|
|
4003
|
|
|
|
|
|
|
|
|
4004
|
442
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_toString) { xs::throw_guard(aTHX_ cv, [=]() |
|
4005
|
|
|
|
|
|
|
{ |
|
4006
|
221
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4007
|
221
|
50
|
|
|
|
|
if (items < 1) |
|
4008
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
4009
|
|
|
|
|
|
|
{ |
|
4010
|
442
|
|
|
|
|
|
std::string RETVAL; |
|
4011
|
221
|
100
|
|
|
|
|
dXSTARG; |
|
|
|
50
|
|
|
|
|
|
|
4012
|
221
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4013
|
|
|
|
|
|
|
; |
|
4014
|
|
|
|
|
|
|
#line 47 "./xsi/Geometry.xsi" |
|
4015
|
|
|
|
|
|
|
RETVAL = THIS->toString(); |
|
4016
|
|
|
|
|
|
|
#line 4017 "Geos.xs.cc" |
|
4017
|
221
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4018
|
|
|
|
|
|
|
} |
|
4019
|
221
|
|
|
|
|
|
XSRETURN(1); |
|
4020
|
221
|
50
|
|
|
|
|
}); } |
|
4021
|
|
|
|
|
|
|
|
|
4022
|
|
|
|
|
|
|
|
|
4023
|
|
|
|
|
|
|
|
|
4024
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_toText) { xs::throw_guard(aTHX_ cv, [=]() |
|
4025
|
|
|
|
|
|
|
{ |
|
4026
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4027
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
4028
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4029
|
|
|
|
|
|
|
{ |
|
4030
|
12
|
|
|
|
|
|
std::string RETVAL; |
|
4031
|
6
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
4032
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4033
|
|
|
|
|
|
|
; |
|
4034
|
|
|
|
|
|
|
#line 49 "./xsi/Geometry.xsi" |
|
4035
|
|
|
|
|
|
|
RETVAL = THIS->toText(); |
|
4036
|
|
|
|
|
|
|
#line 4037 "Geos.xs.cc" |
|
4037
|
6
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4038
|
|
|
|
|
|
|
} |
|
4039
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4040
|
6
|
50
|
|
|
|
|
}); } |
|
4041
|
|
|
|
|
|
|
|
|
4042
|
|
|
|
|
|
|
|
|
4043
|
|
|
|
|
|
|
|
|
4044
|
30
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_equalsExact) { xs::throw_guard(aTHX_ cv, [=]() |
|
4045
|
|
|
|
|
|
|
{ |
|
4046
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4047
|
15
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
4048
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other, tolerance= 0"); |
|
4049
|
|
|
|
|
|
|
{ |
|
4050
|
|
|
|
|
|
|
bool RETVAL; |
|
4051
|
15
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4052
|
|
|
|
|
|
|
; |
|
4053
|
15
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4054
|
|
|
|
|
|
|
; |
|
4055
|
|
|
|
|
|
|
double tolerance; |
|
4056
|
|
|
|
|
|
|
|
|
4057
|
15
|
100
|
|
|
|
|
if (items < 3) |
|
4058
|
7
|
|
|
|
|
|
tolerance = 0; |
|
4059
|
|
|
|
|
|
|
else { |
|
4060
|
16
|
|
|
|
|
|
tolerance = (double)SvNV(ST(2)) |
|
4061
|
8
|
100
|
|
|
|
|
; |
|
|
|
50
|
|
|
|
|
|
|
4062
|
|
|
|
|
|
|
} |
|
4063
|
|
|
|
|
|
|
#line 51 "./xsi/Geometry.xsi" |
|
4064
|
|
|
|
|
|
|
RETVAL = THIS->equalsExact(&other, tolerance); |
|
4065
|
|
|
|
|
|
|
#line 4066 "Geos.xs.cc" |
|
4066
|
15
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
4067
|
|
|
|
|
|
|
} |
|
4068
|
15
|
|
|
|
|
|
XSRETURN(1); |
|
4069
|
15
|
50
|
|
|
|
|
}); } |
|
4070
|
|
|
|
|
|
|
|
|
4071
|
|
|
|
|
|
|
|
|
4072
|
|
|
|
|
|
|
|
|
4073
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_equals) { xs::throw_guard(aTHX_ cv, [=]() |
|
4074
|
|
|
|
|
|
|
{ |
|
4075
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4076
|
7
|
50
|
|
|
|
|
if (items != 2) |
|
4077
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4078
|
|
|
|
|
|
|
{ |
|
4079
|
|
|
|
|
|
|
bool RETVAL; |
|
4080
|
7
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4081
|
|
|
|
|
|
|
; |
|
4082
|
7
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4083
|
|
|
|
|
|
|
; |
|
4084
|
|
|
|
|
|
|
#line 53 "./xsi/Geometry.xsi" |
|
4085
|
|
|
|
|
|
|
RETVAL = THIS->equals(&other); |
|
4086
|
|
|
|
|
|
|
#line 4087 "Geos.xs.cc" |
|
4087
|
7
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
4088
|
|
|
|
|
|
|
} |
|
4089
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
4090
|
7
|
50
|
|
|
|
|
}); } |
|
4091
|
|
|
|
|
|
|
|
|
4092
|
|
|
|
|
|
|
|
|
4093
|
|
|
|
|
|
|
|
|
4094
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_compareTo) { xs::throw_guard(aTHX_ cv, [=]() |
|
4095
|
|
|
|
|
|
|
{ |
|
4096
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4097
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4098
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4099
|
|
|
|
|
|
|
{ |
|
4100
|
|
|
|
|
|
|
int RETVAL; |
|
4101
|
6
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
4102
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4103
|
|
|
|
|
|
|
; |
|
4104
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4105
|
|
|
|
|
|
|
; |
|
4106
|
|
|
|
|
|
|
#line 55 "./xsi/Geometry.xsi" |
|
4107
|
|
|
|
|
|
|
RETVAL = THIS->compareTo(&other); |
|
4108
|
|
|
|
|
|
|
#line 4109 "Geos.xs.cc" |
|
4109
|
6
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
4110
|
|
|
|
|
|
|
} |
|
4111
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4112
|
6
|
50
|
|
|
|
|
}); } |
|
4113
|
|
|
|
|
|
|
|
|
4114
|
|
|
|
|
|
|
|
|
4115
|
|
|
|
|
|
|
|
|
4116
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getBoundary) { xs::throw_guard(aTHX_ cv, [=]() |
|
4117
|
|
|
|
|
|
|
{ |
|
4118
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4119
|
7
|
50
|
|
|
|
|
if (items != 1) |
|
4120
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4121
|
|
|
|
|
|
|
{ |
|
4122
|
14
|
|
|
|
|
|
Sv RETVAL; |
|
4123
|
7
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4124
|
|
|
|
|
|
|
; |
|
4125
|
|
|
|
|
|
|
#line 57 "./xsi/Geometry.xsi" |
|
4126
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->getBoundary()); |
|
4127
|
|
|
|
|
|
|
#line 4128 "Geos.xs.cc" |
|
4128
|
|
|
|
|
|
|
{ |
|
4129
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4130
|
7
|
|
|
|
|
|
RETVALSV = NULL; |
|
4131
|
7
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
4132
|
7
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
4133
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
4134
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4135
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4136
|
|
|
|
|
|
|
case SVt_PVCV: |
|
4137
|
|
|
|
|
|
|
case SVt_PVIO: |
|
4138
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
4139
|
0
|
|
|
|
|
|
break; |
|
4140
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
4141
|
|
|
|
|
|
|
} |
|
4142
|
7
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4143
|
7
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
4144
|
|
|
|
|
|
|
} |
|
4145
|
|
|
|
|
|
|
} |
|
4146
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
4147
|
7
|
50
|
|
|
|
|
}); } |
|
4148
|
|
|
|
|
|
|
|
|
4149
|
|
|
|
|
|
|
|
|
4150
|
|
|
|
|
|
|
|
|
4151
|
16
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getArea) { xs::throw_guard(aTHX_ cv, [=]() |
|
4152
|
|
|
|
|
|
|
{ |
|
4153
|
8
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4154
|
8
|
50
|
|
|
|
|
if (items != 1) |
|
4155
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4156
|
|
|
|
|
|
|
{ |
|
4157
|
|
|
|
|
|
|
double RETVAL; |
|
4158
|
8
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
4159
|
8
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4160
|
|
|
|
|
|
|
; |
|
4161
|
|
|
|
|
|
|
#line 59 "./xsi/Geometry.xsi" |
|
4162
|
|
|
|
|
|
|
RETVAL = THIS->getArea(); |
|
4163
|
|
|
|
|
|
|
#line 4164 "Geos.xs.cc" |
|
4164
|
8
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
4165
|
|
|
|
|
|
|
} |
|
4166
|
8
|
|
|
|
|
|
XSRETURN(1); |
|
4167
|
8
|
50
|
|
|
|
|
}); } |
|
4168
|
|
|
|
|
|
|
|
|
4169
|
|
|
|
|
|
|
|
|
4170
|
|
|
|
|
|
|
|
|
4171
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getLength) { xs::throw_guard(aTHX_ cv, [=]() |
|
4172
|
|
|
|
|
|
|
{ |
|
4173
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4174
|
7
|
50
|
|
|
|
|
if (items != 1) |
|
4175
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4176
|
|
|
|
|
|
|
{ |
|
4177
|
|
|
|
|
|
|
double RETVAL; |
|
4178
|
7
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
4179
|
7
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4180
|
|
|
|
|
|
|
; |
|
4181
|
|
|
|
|
|
|
#line 61 "./xsi/Geometry.xsi" |
|
4182
|
|
|
|
|
|
|
RETVAL = THIS->getLength(); |
|
4183
|
|
|
|
|
|
|
#line 4184 "Geos.xs.cc" |
|
4184
|
7
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
4185
|
|
|
|
|
|
|
} |
|
4186
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
4187
|
7
|
50
|
|
|
|
|
}); } |
|
4188
|
|
|
|
|
|
|
|
|
4189
|
|
|
|
|
|
|
|
|
4190
|
|
|
|
|
|
|
|
|
4191
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_distance) { xs::throw_guard(aTHX_ cv, [=]() |
|
4192
|
|
|
|
|
|
|
{ |
|
4193
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4194
|
7
|
50
|
|
|
|
|
if (items != 2) |
|
4195
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, g"); |
|
4196
|
|
|
|
|
|
|
{ |
|
4197
|
|
|
|
|
|
|
double RETVAL; |
|
4198
|
7
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
4199
|
7
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4200
|
|
|
|
|
|
|
; |
|
4201
|
7
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(1)); |
|
4202
|
|
|
|
|
|
|
; |
|
4203
|
|
|
|
|
|
|
#line 63 "./xsi/Geometry.xsi" |
|
4204
|
|
|
|
|
|
|
RETVAL = THIS->distance(&g); |
|
4205
|
|
|
|
|
|
|
#line 4206 "Geos.xs.cc" |
|
4206
|
7
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
4207
|
|
|
|
|
|
|
} |
|
4208
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
4209
|
7
|
50
|
|
|
|
|
}); } |
|
4210
|
|
|
|
|
|
|
|
|
4211
|
|
|
|
|
|
|
|
|
4212
|
|
|
|
|
|
|
|
|
4213
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_isWithinDistance) { xs::throw_guard(aTHX_ cv, [=]() |
|
4214
|
|
|
|
|
|
|
{ |
|
4215
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4216
|
6
|
50
|
|
|
|
|
if (items != 3) |
|
4217
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, g, distance"); |
|
4218
|
|
|
|
|
|
|
{ |
|
4219
|
|
|
|
|
|
|
bool RETVAL; |
|
4220
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4221
|
|
|
|
|
|
|
; |
|
4222
|
6
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(1)); |
|
4223
|
|
|
|
|
|
|
; |
|
4224
|
6
|
50
|
|
|
|
|
double distance = (double)SvNV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
4225
|
|
|
|
|
|
|
; |
|
4226
|
|
|
|
|
|
|
#line 65 "./xsi/Geometry.xsi" |
|
4227
|
|
|
|
|
|
|
RETVAL = THIS->isWithinDistance(&g, distance); |
|
4228
|
|
|
|
|
|
|
#line 4229 "Geos.xs.cc" |
|
4229
|
6
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
4230
|
|
|
|
|
|
|
} |
|
4231
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4232
|
6
|
50
|
|
|
|
|
}); } |
|
4233
|
|
|
|
|
|
|
|
|
4234
|
|
|
|
|
|
|
|
|
4235
|
|
|
|
|
|
|
|
|
4236
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getCentroid) { xs::throw_guard(aTHX_ cv, [=]() |
|
4237
|
|
|
|
|
|
|
{ |
|
4238
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4239
|
7
|
50
|
|
|
|
|
if (items != 1) |
|
4240
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4241
|
|
|
|
|
|
|
{ |
|
4242
|
|
|
|
|
|
|
Point * RETVAL; |
|
4243
|
7
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4244
|
|
|
|
|
|
|
; |
|
4245
|
|
|
|
|
|
|
#line 67 "./xsi/Geometry.xsi" |
|
4246
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
4247
|
|
|
|
|
|
|
RETVAL = THIS->getCentroid(); |
|
4248
|
|
|
|
|
|
|
#line 4249 "Geos.xs.cc" |
|
4249
|
|
|
|
|
|
|
{ |
|
4250
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4251
|
7
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
4252
|
7
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4253
|
7
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
4254
|
|
|
|
|
|
|
} |
|
4255
|
|
|
|
|
|
|
} |
|
4256
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
4257
|
7
|
50
|
|
|
|
|
}); } |
|
4258
|
|
|
|
|
|
|
|
|
4259
|
|
|
|
|
|
|
|
|
4260
|
|
|
|
|
|
|
|
|
4261
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getInteriorPoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
4262
|
|
|
|
|
|
|
{ |
|
4263
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4264
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
4265
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4266
|
|
|
|
|
|
|
{ |
|
4267
|
|
|
|
|
|
|
Point * RETVAL; |
|
4268
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4269
|
|
|
|
|
|
|
; |
|
4270
|
|
|
|
|
|
|
#line 69 "./xsi/Geometry.xsi" |
|
4271
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
4272
|
|
|
|
|
|
|
RETVAL = THIS->getInteriorPoint(); |
|
4273
|
|
|
|
|
|
|
#line 4274 "Geos.xs.cc" |
|
4274
|
|
|
|
|
|
|
{ |
|
4275
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4276
|
6
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
4277
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4278
|
6
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
4279
|
|
|
|
|
|
|
} |
|
4280
|
|
|
|
|
|
|
} |
|
4281
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4282
|
6
|
50
|
|
|
|
|
}); } |
|
4283
|
|
|
|
|
|
|
|
|
4284
|
|
|
|
|
|
|
|
|
4285
|
|
|
|
|
|
|
|
|
4286
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_symDifference) { xs::throw_guard(aTHX_ cv, [=]() |
|
4287
|
|
|
|
|
|
|
{ |
|
4288
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4289
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4290
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4291
|
|
|
|
|
|
|
{ |
|
4292
|
12
|
|
|
|
|
|
Sv RETVAL; |
|
4293
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4294
|
|
|
|
|
|
|
; |
|
4295
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4296
|
|
|
|
|
|
|
; |
|
4297
|
|
|
|
|
|
|
#line 71 "./xsi/Geometry.xsi" |
|
4298
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->symDifference(&other)); |
|
4299
|
|
|
|
|
|
|
#line 4300 "Geos.xs.cc" |
|
4300
|
|
|
|
|
|
|
{ |
|
4301
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4302
|
6
|
|
|
|
|
|
RETVALSV = NULL; |
|
4303
|
6
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
4304
|
6
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
4305
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
4306
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4307
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4308
|
|
|
|
|
|
|
case SVt_PVCV: |
|
4309
|
|
|
|
|
|
|
case SVt_PVIO: |
|
4310
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
4311
|
0
|
|
|
|
|
|
break; |
|
4312
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
4313
|
|
|
|
|
|
|
} |
|
4314
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4315
|
6
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
4316
|
|
|
|
|
|
|
} |
|
4317
|
|
|
|
|
|
|
} |
|
4318
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4319
|
6
|
50
|
|
|
|
|
}); } |
|
4320
|
|
|
|
|
|
|
|
|
4321
|
|
|
|
|
|
|
|
|
4322
|
|
|
|
|
|
|
|
|
4323
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_difference) { xs::throw_guard(aTHX_ cv, [=]() |
|
4324
|
|
|
|
|
|
|
{ |
|
4325
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4326
|
7
|
50
|
|
|
|
|
if (items != 2) |
|
4327
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4328
|
|
|
|
|
|
|
{ |
|
4329
|
14
|
|
|
|
|
|
Sv RETVAL; |
|
4330
|
7
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4331
|
|
|
|
|
|
|
; |
|
4332
|
7
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4333
|
|
|
|
|
|
|
; |
|
4334
|
|
|
|
|
|
|
#line 73 "./xsi/Geometry.xsi" |
|
4335
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->difference(&other)); |
|
4336
|
|
|
|
|
|
|
#line 4337 "Geos.xs.cc" |
|
4337
|
|
|
|
|
|
|
{ |
|
4338
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4339
|
7
|
|
|
|
|
|
RETVALSV = NULL; |
|
4340
|
7
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
4341
|
7
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
4342
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
4343
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4344
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4345
|
|
|
|
|
|
|
case SVt_PVCV: |
|
4346
|
|
|
|
|
|
|
case SVt_PVIO: |
|
4347
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
4348
|
0
|
|
|
|
|
|
break; |
|
4349
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
4350
|
|
|
|
|
|
|
} |
|
4351
|
7
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4352
|
7
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
4353
|
|
|
|
|
|
|
} |
|
4354
|
|
|
|
|
|
|
} |
|
4355
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
4356
|
7
|
50
|
|
|
|
|
}); } |
|
4357
|
|
|
|
|
|
|
|
|
4358
|
|
|
|
|
|
|
|
|
4359
|
|
|
|
|
|
|
|
|
4360
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_Union) { xs::throw_guard(aTHX_ cv, [=]() |
|
4361
|
|
|
|
|
|
|
{ |
|
4362
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4363
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4364
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4365
|
|
|
|
|
|
|
{ |
|
4366
|
12
|
|
|
|
|
|
Sv RETVAL; |
|
4367
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4368
|
|
|
|
|
|
|
; |
|
4369
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4370
|
|
|
|
|
|
|
; |
|
4371
|
|
|
|
|
|
|
#line 75 "./xsi/Geometry.xsi" |
|
4372
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->Union(&other)); |
|
4373
|
|
|
|
|
|
|
#line 4374 "Geos.xs.cc" |
|
4374
|
|
|
|
|
|
|
{ |
|
4375
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4376
|
6
|
|
|
|
|
|
RETVALSV = NULL; |
|
4377
|
6
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
4378
|
6
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
4379
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
4380
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4381
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4382
|
|
|
|
|
|
|
case SVt_PVCV: |
|
4383
|
|
|
|
|
|
|
case SVt_PVIO: |
|
4384
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
4385
|
0
|
|
|
|
|
|
break; |
|
4386
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
4387
|
|
|
|
|
|
|
} |
|
4388
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4389
|
6
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
4390
|
|
|
|
|
|
|
} |
|
4391
|
|
|
|
|
|
|
} |
|
4392
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4393
|
6
|
50
|
|
|
|
|
}); } |
|
4394
|
|
|
|
|
|
|
|
|
4395
|
|
|
|
|
|
|
|
|
4396
|
|
|
|
|
|
|
|
|
4397
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_intersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
4398
|
|
|
|
|
|
|
{ |
|
4399
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4400
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4401
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4402
|
|
|
|
|
|
|
{ |
|
4403
|
12
|
|
|
|
|
|
Sv RETVAL; |
|
4404
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4405
|
|
|
|
|
|
|
; |
|
4406
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4407
|
|
|
|
|
|
|
; |
|
4408
|
|
|
|
|
|
|
#line 77 "./xsi/Geometry.xsi" |
|
4409
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->intersection(&other)); |
|
4410
|
|
|
|
|
|
|
#line 4411 "Geos.xs.cc" |
|
4411
|
|
|
|
|
|
|
{ |
|
4412
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4413
|
6
|
|
|
|
|
|
RETVALSV = NULL; |
|
4414
|
6
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
4415
|
6
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
4416
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
4417
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4418
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4419
|
|
|
|
|
|
|
case SVt_PVCV: |
|
4420
|
|
|
|
|
|
|
case SVt_PVIO: |
|
4421
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
4422
|
0
|
|
|
|
|
|
break; |
|
4423
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
4424
|
|
|
|
|
|
|
} |
|
4425
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4426
|
6
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
4427
|
|
|
|
|
|
|
} |
|
4428
|
|
|
|
|
|
|
} |
|
4429
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4430
|
6
|
50
|
|
|
|
|
}); } |
|
4431
|
|
|
|
|
|
|
|
|
4432
|
|
|
|
|
|
|
|
|
4433
|
|
|
|
|
|
|
|
|
4434
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_convexHull) { xs::throw_guard(aTHX_ cv, [=]() |
|
4435
|
|
|
|
|
|
|
{ |
|
4436
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4437
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
4438
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4439
|
|
|
|
|
|
|
{ |
|
4440
|
12
|
|
|
|
|
|
Sv RETVAL; |
|
4441
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4442
|
|
|
|
|
|
|
; |
|
4443
|
|
|
|
|
|
|
#line 79 "./xsi/Geometry.xsi" |
|
4444
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->convexHull()); |
|
4445
|
|
|
|
|
|
|
#line 4446 "Geos.xs.cc" |
|
4446
|
|
|
|
|
|
|
{ |
|
4447
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4448
|
6
|
|
|
|
|
|
RETVALSV = NULL; |
|
4449
|
6
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
4450
|
6
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
4451
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
4452
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4453
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4454
|
|
|
|
|
|
|
case SVt_PVCV: |
|
4455
|
|
|
|
|
|
|
case SVt_PVIO: |
|
4456
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
4457
|
0
|
|
|
|
|
|
break; |
|
4458
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
4459
|
|
|
|
|
|
|
} |
|
4460
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4461
|
6
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
4462
|
|
|
|
|
|
|
} |
|
4463
|
|
|
|
|
|
|
} |
|
4464
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4465
|
6
|
50
|
|
|
|
|
}); } |
|
4466
|
|
|
|
|
|
|
|
|
4467
|
|
|
|
|
|
|
|
|
4468
|
|
|
|
|
|
|
|
|
4469
|
36
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_buffer) { xs::throw_guard(aTHX_ cv, [=]() |
|
4470
|
|
|
|
|
|
|
{ |
|
4471
|
18
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4472
|
18
|
50
|
|
|
|
|
if (items < 2 || items > 4) |
|
|
|
50
|
|
|
|
|
|
|
4473
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, distance, arg2= NULL, arg3= NULL"); |
|
4474
|
|
|
|
|
|
|
{ |
|
4475
|
36
|
|
|
|
|
|
Sv RETVAL; |
|
4476
|
18
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4477
|
|
|
|
|
|
|
; |
|
4478
|
18
|
50
|
|
|
|
|
double distance = (double)SvNV(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
4479
|
|
|
|
|
|
|
; |
|
4480
|
|
|
|
|
|
|
SV* arg2; |
|
4481
|
|
|
|
|
|
|
SV* arg3; |
|
4482
|
|
|
|
|
|
|
|
|
4483
|
18
|
100
|
|
|
|
|
if (items < 3) |
|
4484
|
6
|
|
|
|
|
|
arg2 = NULL; |
|
4485
|
|
|
|
|
|
|
else { |
|
4486
|
12
|
|
|
|
|
|
arg2 = ST(2) |
|
4487
|
12
|
|
|
|
|
|
; |
|
4488
|
|
|
|
|
|
|
} |
|
4489
|
|
|
|
|
|
|
|
|
4490
|
18
|
100
|
|
|
|
|
if (items < 4) |
|
4491
|
12
|
|
|
|
|
|
arg3 = NULL; |
|
4492
|
|
|
|
|
|
|
else { |
|
4493
|
6
|
|
|
|
|
|
arg3 = ST(3) |
|
4494
|
6
|
|
|
|
|
|
; |
|
4495
|
|
|
|
|
|
|
} |
|
4496
|
|
|
|
|
|
|
#line 82 "./xsi/Geometry.xsi" |
|
4497
|
|
|
|
|
|
|
Geometry* r; |
|
4498
|
|
|
|
|
|
|
if (!arg2) r = THIS->buffer(distance); |
|
4499
|
|
|
|
|
|
|
else { |
|
4500
|
|
|
|
|
|
|
int quadrantSegments = SvIV(arg2); |
|
4501
|
|
|
|
|
|
|
if (arg3) { |
|
4502
|
|
|
|
|
|
|
int endCapStyle = SvIV(arg3); |
|
4503
|
|
|
|
|
|
|
r = THIS->buffer(distance, quadrantSegments, endCapStyle); |
|
4504
|
|
|
|
|
|
|
} else { |
|
4505
|
|
|
|
|
|
|
r = THIS->buffer(distance, quadrantSegments); |
|
4506
|
|
|
|
|
|
|
} |
|
4507
|
|
|
|
|
|
|
} |
|
4508
|
|
|
|
|
|
|
RETVAL = Helper::uplift(r); |
|
4509
|
|
|
|
|
|
|
#line 4510 "Geos.xs.cc" |
|
4510
|
|
|
|
|
|
|
{ |
|
4511
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4512
|
18
|
|
|
|
|
|
RETVALSV = NULL; |
|
4513
|
18
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
4514
|
18
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
4515
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
4516
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4517
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4518
|
|
|
|
|
|
|
case SVt_PVCV: |
|
4519
|
|
|
|
|
|
|
case SVt_PVIO: |
|
4520
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
4521
|
0
|
|
|
|
|
|
break; |
|
4522
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
4523
|
|
|
|
|
|
|
} |
|
4524
|
18
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4525
|
18
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
4526
|
|
|
|
|
|
|
} |
|
4527
|
|
|
|
|
|
|
} |
|
4528
|
18
|
|
|
|
|
|
XSRETURN(1); |
|
4529
|
18
|
50
|
|
|
|
|
}); } |
|
4530
|
|
|
|
|
|
|
|
|
4531
|
|
|
|
|
|
|
|
|
4532
|
|
|
|
|
|
|
|
|
4533
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_coveredBy) { xs::throw_guard(aTHX_ cv, [=]() |
|
4534
|
|
|
|
|
|
|
{ |
|
4535
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4536
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4537
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4538
|
|
|
|
|
|
|
{ |
|
4539
|
|
|
|
|
|
|
bool RETVAL; |
|
4540
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4541
|
|
|
|
|
|
|
; |
|
4542
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4543
|
|
|
|
|
|
|
; |
|
4544
|
|
|
|
|
|
|
#line 96 "./xsi/Geometry.xsi" |
|
4545
|
|
|
|
|
|
|
RETVAL = THIS->coveredBy(&other); |
|
4546
|
|
|
|
|
|
|
#line 4547 "Geos.xs.cc" |
|
4547
|
6
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
4548
|
|
|
|
|
|
|
} |
|
4549
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4550
|
6
|
50
|
|
|
|
|
}); } |
|
4551
|
|
|
|
|
|
|
|
|
4552
|
|
|
|
|
|
|
|
|
4553
|
|
|
|
|
|
|
|
|
4554
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_covers) { xs::throw_guard(aTHX_ cv, [=]() |
|
4555
|
|
|
|
|
|
|
{ |
|
4556
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4557
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4558
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4559
|
|
|
|
|
|
|
{ |
|
4560
|
|
|
|
|
|
|
bool RETVAL; |
|
4561
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4562
|
|
|
|
|
|
|
; |
|
4563
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4564
|
|
|
|
|
|
|
; |
|
4565
|
|
|
|
|
|
|
#line 98 "./xsi/Geometry.xsi" |
|
4566
|
|
|
|
|
|
|
RETVAL = THIS->covers(&other); |
|
4567
|
|
|
|
|
|
|
#line 4568 "Geos.xs.cc" |
|
4568
|
6
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
4569
|
|
|
|
|
|
|
} |
|
4570
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4571
|
6
|
50
|
|
|
|
|
}); } |
|
4572
|
|
|
|
|
|
|
|
|
4573
|
|
|
|
|
|
|
|
|
4574
|
|
|
|
|
|
|
|
|
4575
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_overlaps) { xs::throw_guard(aTHX_ cv, [=]() |
|
4576
|
|
|
|
|
|
|
{ |
|
4577
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4578
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4579
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4580
|
|
|
|
|
|
|
{ |
|
4581
|
|
|
|
|
|
|
bool RETVAL; |
|
4582
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4583
|
|
|
|
|
|
|
; |
|
4584
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4585
|
|
|
|
|
|
|
; |
|
4586
|
|
|
|
|
|
|
#line 100 "./xsi/Geometry.xsi" |
|
4587
|
|
|
|
|
|
|
RETVAL = THIS->overlaps(&other); |
|
4588
|
|
|
|
|
|
|
#line 4589 "Geos.xs.cc" |
|
4589
|
6
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
4590
|
|
|
|
|
|
|
} |
|
4591
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4592
|
6
|
50
|
|
|
|
|
}); } |
|
4593
|
|
|
|
|
|
|
|
|
4594
|
|
|
|
|
|
|
|
|
4595
|
|
|
|
|
|
|
|
|
4596
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_contains) { xs::throw_guard(aTHX_ cv, [=]() |
|
4597
|
|
|
|
|
|
|
{ |
|
4598
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4599
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4600
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4601
|
|
|
|
|
|
|
{ |
|
4602
|
|
|
|
|
|
|
bool RETVAL; |
|
4603
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4604
|
|
|
|
|
|
|
; |
|
4605
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4606
|
|
|
|
|
|
|
; |
|
4607
|
|
|
|
|
|
|
#line 102 "./xsi/Geometry.xsi" |
|
4608
|
|
|
|
|
|
|
RETVAL = THIS->contains(&other); |
|
4609
|
|
|
|
|
|
|
#line 4610 "Geos.xs.cc" |
|
4610
|
6
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
4611
|
|
|
|
|
|
|
} |
|
4612
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4613
|
6
|
50
|
|
|
|
|
}); } |
|
4614
|
|
|
|
|
|
|
|
|
4615
|
|
|
|
|
|
|
|
|
4616
|
|
|
|
|
|
|
|
|
4617
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_within) { xs::throw_guard(aTHX_ cv, [=]() |
|
4618
|
|
|
|
|
|
|
{ |
|
4619
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4620
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4621
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4622
|
|
|
|
|
|
|
{ |
|
4623
|
|
|
|
|
|
|
bool RETVAL; |
|
4624
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4625
|
|
|
|
|
|
|
; |
|
4626
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4627
|
|
|
|
|
|
|
; |
|
4628
|
|
|
|
|
|
|
#line 104 "./xsi/Geometry.xsi" |
|
4629
|
|
|
|
|
|
|
RETVAL = THIS->within(&other); |
|
4630
|
|
|
|
|
|
|
#line 4631 "Geos.xs.cc" |
|
4631
|
6
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
4632
|
|
|
|
|
|
|
} |
|
4633
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4634
|
6
|
50
|
|
|
|
|
}); } |
|
4635
|
|
|
|
|
|
|
|
|
4636
|
|
|
|
|
|
|
|
|
4637
|
|
|
|
|
|
|
|
|
4638
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_crosses) { xs::throw_guard(aTHX_ cv, [=]() |
|
4639
|
|
|
|
|
|
|
{ |
|
4640
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4641
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4642
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4643
|
|
|
|
|
|
|
{ |
|
4644
|
|
|
|
|
|
|
bool RETVAL; |
|
4645
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4646
|
|
|
|
|
|
|
; |
|
4647
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4648
|
|
|
|
|
|
|
; |
|
4649
|
|
|
|
|
|
|
#line 106 "./xsi/Geometry.xsi" |
|
4650
|
|
|
|
|
|
|
RETVAL = THIS->crosses(&other); |
|
4651
|
|
|
|
|
|
|
#line 4652 "Geos.xs.cc" |
|
4652
|
6
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
4653
|
|
|
|
|
|
|
} |
|
4654
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4655
|
6
|
50
|
|
|
|
|
}); } |
|
4656
|
|
|
|
|
|
|
|
|
4657
|
|
|
|
|
|
|
|
|
4658
|
|
|
|
|
|
|
|
|
4659
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_intersects) { xs::throw_guard(aTHX_ cv, [=]() |
|
4660
|
|
|
|
|
|
|
{ |
|
4661
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4662
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4663
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4664
|
|
|
|
|
|
|
{ |
|
4665
|
|
|
|
|
|
|
bool RETVAL; |
|
4666
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4667
|
|
|
|
|
|
|
; |
|
4668
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4669
|
|
|
|
|
|
|
; |
|
4670
|
|
|
|
|
|
|
#line 108 "./xsi/Geometry.xsi" |
|
4671
|
|
|
|
|
|
|
RETVAL = THIS->intersects(&other); |
|
4672
|
|
|
|
|
|
|
#line 4673 "Geos.xs.cc" |
|
4673
|
6
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
4674
|
|
|
|
|
|
|
} |
|
4675
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4676
|
6
|
50
|
|
|
|
|
}); } |
|
4677
|
|
|
|
|
|
|
|
|
4678
|
|
|
|
|
|
|
|
|
4679
|
|
|
|
|
|
|
|
|
4680
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_touches) { xs::throw_guard(aTHX_ cv, [=]() |
|
4681
|
|
|
|
|
|
|
{ |
|
4682
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4683
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4684
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4685
|
|
|
|
|
|
|
{ |
|
4686
|
|
|
|
|
|
|
bool RETVAL; |
|
4687
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4688
|
|
|
|
|
|
|
; |
|
4689
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4690
|
|
|
|
|
|
|
; |
|
4691
|
|
|
|
|
|
|
#line 110 "./xsi/Geometry.xsi" |
|
4692
|
|
|
|
|
|
|
RETVAL = THIS->touches(&other); |
|
4693
|
|
|
|
|
|
|
#line 4694 "Geos.xs.cc" |
|
4694
|
6
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
4695
|
|
|
|
|
|
|
} |
|
4696
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4697
|
6
|
50
|
|
|
|
|
}); } |
|
4698
|
|
|
|
|
|
|
|
|
4699
|
|
|
|
|
|
|
|
|
4700
|
|
|
|
|
|
|
|
|
4701
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_disjoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
4702
|
|
|
|
|
|
|
{ |
|
4703
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4704
|
6
|
50
|
|
|
|
|
if (items != 2) |
|
4705
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
4706
|
|
|
|
|
|
|
{ |
|
4707
|
|
|
|
|
|
|
bool RETVAL; |
|
4708
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4709
|
|
|
|
|
|
|
; |
|
4710
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4711
|
|
|
|
|
|
|
; |
|
4712
|
|
|
|
|
|
|
#line 112 "./xsi/Geometry.xsi" |
|
4713
|
|
|
|
|
|
|
RETVAL = THIS->disjoint(&other); |
|
4714
|
|
|
|
|
|
|
#line 4715 "Geos.xs.cc" |
|
4715
|
6
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
4716
|
|
|
|
|
|
|
} |
|
4717
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4718
|
6
|
50
|
|
|
|
|
}); } |
|
4719
|
|
|
|
|
|
|
|
|
4720
|
|
|
|
|
|
|
|
|
4721
|
|
|
|
|
|
|
|
|
4722
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getEnvelope) { xs::throw_guard(aTHX_ cv, [=]() |
|
4723
|
|
|
|
|
|
|
{ |
|
4724
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4725
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
4726
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4727
|
|
|
|
|
|
|
{ |
|
4728
|
12
|
|
|
|
|
|
Sv RETVAL; |
|
4729
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4730
|
|
|
|
|
|
|
; |
|
4731
|
|
|
|
|
|
|
#line 114 "./xsi/Geometry.xsi" |
|
4732
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->getEnvelope()); |
|
4733
|
|
|
|
|
|
|
#line 4734 "Geos.xs.cc" |
|
4734
|
|
|
|
|
|
|
{ |
|
4735
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4736
|
6
|
|
|
|
|
|
RETVALSV = NULL; |
|
4737
|
6
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
4738
|
6
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
4739
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
4740
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4741
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4742
|
|
|
|
|
|
|
case SVt_PVCV: |
|
4743
|
|
|
|
|
|
|
case SVt_PVIO: |
|
4744
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
4745
|
0
|
|
|
|
|
|
break; |
|
4746
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
4747
|
|
|
|
|
|
|
} |
|
4748
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4749
|
6
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
4750
|
|
|
|
|
|
|
} |
|
4751
|
|
|
|
|
|
|
} |
|
4752
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4753
|
6
|
50
|
|
|
|
|
}); } |
|
4754
|
|
|
|
|
|
|
|
|
4755
|
|
|
|
|
|
|
|
|
4756
|
|
|
|
|
|
|
|
|
4757
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_clone) { xs::throw_guard(aTHX_ cv, [=]() |
|
4758
|
|
|
|
|
|
|
{ |
|
4759
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4760
|
7
|
50
|
|
|
|
|
if (items != 1) |
|
4761
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4762
|
|
|
|
|
|
|
{ |
|
4763
|
14
|
|
|
|
|
|
Sv RETVAL; |
|
4764
|
7
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4765
|
|
|
|
|
|
|
; |
|
4766
|
|
|
|
|
|
|
#line 116 "./xsi/Geometry.xsi" |
|
4767
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->clone()); |
|
4768
|
|
|
|
|
|
|
#line 4769 "Geos.xs.cc" |
|
4769
|
|
|
|
|
|
|
{ |
|
4770
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4771
|
7
|
|
|
|
|
|
RETVALSV = NULL; |
|
4772
|
7
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
4773
|
7
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
4774
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
4775
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4776
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4777
|
|
|
|
|
|
|
case SVt_PVCV: |
|
4778
|
|
|
|
|
|
|
case SVt_PVIO: |
|
4779
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
4780
|
0
|
|
|
|
|
|
break; |
|
4781
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
4782
|
|
|
|
|
|
|
} |
|
4783
|
7
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4784
|
7
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
4785
|
|
|
|
|
|
|
} |
|
4786
|
|
|
|
|
|
|
} |
|
4787
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
4788
|
7
|
50
|
|
|
|
|
}); } |
|
4789
|
|
|
|
|
|
|
|
|
4790
|
|
|
|
|
|
|
|
|
4791
|
|
|
|
|
|
|
|
|
4792
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getPrecisionModel) { xs::throw_guard(aTHX_ cv, [=]() |
|
4793
|
|
|
|
|
|
|
{ |
|
4794
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4795
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
4796
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4797
|
|
|
|
|
|
|
{ |
|
4798
|
|
|
|
|
|
|
PrecisionModel * RETVAL; |
|
4799
|
6
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4800
|
|
|
|
|
|
|
; |
|
4801
|
|
|
|
|
|
|
#line 119 "./xsi/Geometry.xsi" |
|
4802
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
4803
|
|
|
|
|
|
|
auto pm = THIS->getPrecisionModel(); |
|
4804
|
|
|
|
|
|
|
RETVAL = new PrecisionModel(*pm); |
|
4805
|
|
|
|
|
|
|
#line 4806 "Geos.xs.cc" |
|
4806
|
|
|
|
|
|
|
{ |
|
4807
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4808
|
6
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
4809
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4810
|
6
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
4811
|
|
|
|
|
|
|
} |
|
4812
|
|
|
|
|
|
|
} |
|
4813
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
4814
|
6
|
50
|
|
|
|
|
}); } |
|
4815
|
|
|
|
|
|
|
|
|
4816
|
|
|
|
|
|
|
|
|
4817
|
|
|
|
|
|
|
|
|
4818
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_getCoordinates) { xs::throw_guard(aTHX_ cv, [=]() |
|
4819
|
|
|
|
|
|
|
{ |
|
4820
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4821
|
7
|
50
|
|
|
|
|
if (items != 1) |
|
4822
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4823
|
|
|
|
|
|
|
{ |
|
4824
|
14
|
|
|
|
|
|
Array RETVAL; |
|
4825
|
7
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4826
|
|
|
|
|
|
|
; |
|
4827
|
|
|
|
|
|
|
#line 124 "./xsi/Geometry.xsi" |
|
4828
|
|
|
|
|
|
|
auto seq = std::unique_ptr(THIS->getCoordinates()); |
|
4829
|
|
|
|
|
|
|
RETVAL = Helper::convert_copy(seq.get()); |
|
4830
|
|
|
|
|
|
|
#line 4831 "Geos.xs.cc" |
|
4831
|
|
|
|
|
|
|
{ |
|
4832
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4833
|
7
|
|
|
|
|
|
RETVALSV = NULL; |
|
4834
|
7
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
4835
|
7
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
4836
|
7
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4837
|
7
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
4838
|
|
|
|
|
|
|
} |
|
4839
|
|
|
|
|
|
|
} |
|
4840
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
4841
|
7
|
50
|
|
|
|
|
}); } |
|
4842
|
|
|
|
|
|
|
|
|
4843
|
|
|
|
|
|
|
|
|
4844
|
|
|
|
|
|
|
|
|
4845
|
24
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_relate) { xs::throw_guard(aTHX_ cv, [=]() |
|
4846
|
|
|
|
|
|
|
{ |
|
4847
|
12
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4848
|
12
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
4849
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other, arg= NULL"); |
|
4850
|
|
|
|
|
|
|
{ |
|
4851
|
24
|
|
|
|
|
|
Sv RETVAL; |
|
4852
|
12
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4853
|
|
|
|
|
|
|
; |
|
4854
|
12
|
50
|
|
|
|
|
Geometry& other = xs::in(aTHX_ ST(1)); |
|
4855
|
|
|
|
|
|
|
; |
|
4856
|
|
|
|
|
|
|
SV* arg; |
|
4857
|
|
|
|
|
|
|
|
|
4858
|
12
|
100
|
|
|
|
|
if (items < 3) |
|
4859
|
6
|
|
|
|
|
|
arg = NULL; |
|
4860
|
|
|
|
|
|
|
else { |
|
4861
|
6
|
|
|
|
|
|
arg = ST(2) |
|
4862
|
6
|
|
|
|
|
|
; |
|
4863
|
|
|
|
|
|
|
} |
|
4864
|
|
|
|
|
|
|
#line 129 "./xsi/Geometry.xsi" |
|
4865
|
|
|
|
|
|
|
if (!arg) RETVAL = xs::out(THIS->relate(&other)); |
|
4866
|
|
|
|
|
|
|
else { |
|
4867
|
|
|
|
|
|
|
std::string intersectionPattern { SvPV_nolen(arg) }; |
|
4868
|
|
|
|
|
|
|
RETVAL = Simple(THIS->relate(&other, intersectionPattern)); |
|
4869
|
|
|
|
|
|
|
} |
|
4870
|
|
|
|
|
|
|
#line 4871 "Geos.xs.cc" |
|
4871
|
|
|
|
|
|
|
{ |
|
4872
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4873
|
12
|
|
|
|
|
|
RETVALSV = NULL; |
|
4874
|
12
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
4875
|
12
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
4876
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
4877
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4878
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4879
|
|
|
|
|
|
|
case SVt_PVCV: |
|
4880
|
|
|
|
|
|
|
case SVt_PVIO: |
|
4881
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
4882
|
0
|
|
|
|
|
|
break; |
|
4883
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
4884
|
|
|
|
|
|
|
} |
|
4885
|
12
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4886
|
12
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
4887
|
|
|
|
|
|
|
} |
|
4888
|
|
|
|
|
|
|
} |
|
4889
|
12
|
|
|
|
|
|
XSRETURN(1); |
|
4890
|
12
|
50
|
|
|
|
|
}); } |
|
4891
|
|
|
|
|
|
|
|
|
4892
|
|
|
|
|
|
|
|
|
4893
|
|
|
|
|
|
|
|
|
4894
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_normalize) { xs::throw_guard(aTHX_ cv, [=]() |
|
4895
|
|
|
|
|
|
|
{ |
|
4896
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4897
|
7
|
50
|
|
|
|
|
if (items != 1) |
|
4898
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4899
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
4900
|
7
|
|
|
|
|
|
SP -= items; |
|
4901
|
|
|
|
|
|
|
{ |
|
4902
|
7
|
50
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4903
|
|
|
|
|
|
|
; |
|
4904
|
|
|
|
|
|
|
#line 137 "./xsi/Geometry.xsi" |
|
4905
|
|
|
|
|
|
|
THIS->normalize(); |
|
4906
|
|
|
|
|
|
|
#line 4907 "Geos.xs.cc" |
|
4907
|
7
|
|
|
|
|
|
PUTBACK; |
|
4908
|
7
|
|
|
|
|
|
return; |
|
4909
|
|
|
|
|
|
|
} |
|
4910
|
7
|
50
|
|
|
|
|
}); } |
|
4911
|
|
|
|
|
|
|
|
|
4912
|
|
|
|
|
|
|
|
|
4913
|
|
|
|
|
|
|
|
|
4914
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
4915
|
|
|
|
|
|
|
{ |
|
4916
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4917
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
4918
|
|
|
|
|
|
|
{ |
|
4919
|
|
|
|
|
|
|
int RETVAL; |
|
4920
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
4921
|
|
|
|
|
|
|
#line 169 "./xsi/Geometry.xsi" |
|
4922
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
4923
|
|
|
|
|
|
|
#line 4924 "Geos.xs.cc" |
|
4924
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
4925
|
|
|
|
|
|
|
} |
|
4926
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
4927
|
0
|
0
|
|
|
|
|
}); } |
|
4928
|
|
|
|
|
|
|
|
|
4929
|
|
|
|
|
|
|
|
|
4930
|
|
|
|
|
|
|
|
|
4931
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Geometry_HOOK_CLONE) { xs::throw_guard(aTHX_ cv, [=]() |
|
4932
|
|
|
|
|
|
|
{ |
|
4933
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4934
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
4935
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
4936
|
|
|
|
|
|
|
{ |
|
4937
|
0
|
|
|
|
|
|
Sv RETVAL; |
|
4938
|
0
|
0
|
|
|
|
|
Geometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4939
|
|
|
|
|
|
|
; |
|
4940
|
|
|
|
|
|
|
#line 172 "./xsi/Geometry.xsi" |
|
4941
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->clone()); |
|
4942
|
|
|
|
|
|
|
#line 4943 "Geos.xs.cc" |
|
4943
|
|
|
|
|
|
|
{ |
|
4944
|
|
|
|
|
|
|
SV * RETVALSV; |
|
4945
|
0
|
|
|
|
|
|
RETVALSV = NULL; |
|
4946
|
0
|
0
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
4947
|
0
|
0
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
0
|
|
|
|
|
|
|
4948
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
4949
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4950
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
4951
|
|
|
|
|
|
|
case SVt_PVCV: |
|
4952
|
|
|
|
|
|
|
case SVt_PVIO: |
|
4953
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
4954
|
0
|
|
|
|
|
|
break; |
|
4955
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
4956
|
|
|
|
|
|
|
} |
|
4957
|
0
|
0
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
4958
|
0
|
0
|
|
|
|
|
ST(0) = RETVALSV; |
|
4959
|
|
|
|
|
|
|
} |
|
4960
|
|
|
|
|
|
|
} |
|
4961
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
4962
|
0
|
0
|
|
|
|
|
}); } |
|
4963
|
|
|
|
|
|
|
|
|
4964
|
|
|
|
|
|
|
|
|
4965
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/Geometry.xsi' */ |
|
4966
|
|
|
|
|
|
|
|
|
4967
|
|
|
|
|
|
|
|
|
4968
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/GeometryCollection.xsi' from 'Geos.xs' */ |
|
4969
|
|
|
|
|
|
|
|
|
4970
|
|
|
|
|
|
|
|
|
4971
|
|
|
|
|
|
|
|
|
4972
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__GeometryCollection_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
4973
|
|
|
|
|
|
|
{ |
|
4974
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4975
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
4976
|
|
|
|
|
|
|
{ |
|
4977
|
|
|
|
|
|
|
int RETVAL; |
|
4978
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
4979
|
|
|
|
|
|
|
#line 4 "./xsi/GeometryCollection.xsi" |
|
4980
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
4981
|
|
|
|
|
|
|
#line 4982 "Geos.xs.cc" |
|
4982
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
4983
|
|
|
|
|
|
|
} |
|
4984
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
4985
|
0
|
0
|
|
|
|
|
}); } |
|
4986
|
|
|
|
|
|
|
|
|
4987
|
|
|
|
|
|
|
|
|
4988
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/GeometryCollection.xsi' */ |
|
4989
|
|
|
|
|
|
|
|
|
4990
|
|
|
|
|
|
|
|
|
4991
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/Point.xsi' from 'Geos.xs' */ |
|
4992
|
|
|
|
|
|
|
|
|
4993
|
|
|
|
|
|
|
|
|
4994
|
|
|
|
|
|
|
|
|
4995
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Point_getX) { xs::throw_guard(aTHX_ cv, [=]() |
|
4996
|
|
|
|
|
|
|
{ |
|
4997
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
4998
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
4999
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5000
|
|
|
|
|
|
|
{ |
|
5001
|
|
|
|
|
|
|
double RETVAL; |
|
5002
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5003
|
3
|
50
|
|
|
|
|
Point* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5004
|
|
|
|
|
|
|
; |
|
5005
|
|
|
|
|
|
|
#line 4 "./xsi/Point.xsi" |
|
5006
|
|
|
|
|
|
|
RETVAL = THIS->getX(); |
|
5007
|
|
|
|
|
|
|
#line 5008 "Geos.xs.cc" |
|
5008
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
5009
|
|
|
|
|
|
|
} |
|
5010
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
5011
|
3
|
50
|
|
|
|
|
}); } |
|
5012
|
|
|
|
|
|
|
|
|
5013
|
|
|
|
|
|
|
|
|
5014
|
|
|
|
|
|
|
|
|
5015
|
8
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Point_getY) { xs::throw_guard(aTHX_ cv, [=]() |
|
5016
|
|
|
|
|
|
|
{ |
|
5017
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5018
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
5019
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5020
|
|
|
|
|
|
|
{ |
|
5021
|
|
|
|
|
|
|
double RETVAL; |
|
5022
|
4
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5023
|
4
|
50
|
|
|
|
|
Point* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5024
|
|
|
|
|
|
|
; |
|
5025
|
|
|
|
|
|
|
#line 6 "./xsi/Point.xsi" |
|
5026
|
|
|
|
|
|
|
RETVAL = THIS->getY(); |
|
5027
|
|
|
|
|
|
|
#line 5028 "Geos.xs.cc" |
|
5028
|
4
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
5029
|
|
|
|
|
|
|
} |
|
5030
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
5031
|
4
|
50
|
|
|
|
|
}); } |
|
5032
|
|
|
|
|
|
|
|
|
5033
|
|
|
|
|
|
|
|
|
5034
|
|
|
|
|
|
|
|
|
5035
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Point_reverse) { xs::throw_guard(aTHX_ cv, [=]() |
|
5036
|
|
|
|
|
|
|
{ |
|
5037
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5038
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
5039
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5040
|
|
|
|
|
|
|
{ |
|
5041
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
5042
|
1
|
50
|
|
|
|
|
Point* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5043
|
|
|
|
|
|
|
; |
|
5044
|
|
|
|
|
|
|
#line 8 "./xsi/Point.xsi" |
|
5045
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->reverse()); |
|
5046
|
|
|
|
|
|
|
#line 5047 "Geos.xs.cc" |
|
5047
|
|
|
|
|
|
|
{ |
|
5048
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5049
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
5050
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
5051
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
5052
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
5053
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
5054
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
5055
|
|
|
|
|
|
|
case SVt_PVCV: |
|
5056
|
|
|
|
|
|
|
case SVt_PVIO: |
|
5057
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
5058
|
0
|
|
|
|
|
|
break; |
|
5059
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
5060
|
|
|
|
|
|
|
} |
|
5061
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5062
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
5063
|
|
|
|
|
|
|
} |
|
5064
|
|
|
|
|
|
|
} |
|
5065
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
5066
|
1
|
50
|
|
|
|
|
}); } |
|
5067
|
|
|
|
|
|
|
|
|
5068
|
|
|
|
|
|
|
|
|
5069
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/Point.xsi' */ |
|
5070
|
|
|
|
|
|
|
|
|
5071
|
|
|
|
|
|
|
|
|
5072
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/MultiPoint.xsi' from 'Geos.xs' */ |
|
5073
|
|
|
|
|
|
|
|
|
5074
|
|
|
|
|
|
|
|
|
5075
|
|
|
|
|
|
|
|
|
5076
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__MultiPoint_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
5077
|
|
|
|
|
|
|
{ |
|
5078
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5079
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
5080
|
|
|
|
|
|
|
{ |
|
5081
|
|
|
|
|
|
|
int RETVAL; |
|
5082
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5083
|
|
|
|
|
|
|
#line 4 "./xsi/MultiPoint.xsi" |
|
5084
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
5085
|
|
|
|
|
|
|
#line 5086 "Geos.xs.cc" |
|
5086
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
5087
|
|
|
|
|
|
|
} |
|
5088
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
5089
|
0
|
0
|
|
|
|
|
}); } |
|
5090
|
|
|
|
|
|
|
|
|
5091
|
|
|
|
|
|
|
|
|
5092
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/MultiPoint.xsi' */ |
|
5093
|
|
|
|
|
|
|
|
|
5094
|
|
|
|
|
|
|
|
|
5095
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/LineString.xsi' from 'Geos.xs' */ |
|
5096
|
|
|
|
|
|
|
|
|
5097
|
|
|
|
|
|
|
|
|
5098
|
|
|
|
|
|
|
|
|
5099
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineString_getPointN) { xs::throw_guard(aTHX_ cv, [=]() |
|
5100
|
|
|
|
|
|
|
{ |
|
5101
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5102
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
5103
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, n"); |
|
5104
|
|
|
|
|
|
|
{ |
|
5105
|
|
|
|
|
|
|
Point * RETVAL; |
|
5106
|
1
|
50
|
|
|
|
|
LineString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5107
|
|
|
|
|
|
|
; |
|
5108
|
1
|
50
|
|
|
|
|
std::size_t n = xs::in(aTHX_ ST(1)); |
|
5109
|
|
|
|
|
|
|
; |
|
5110
|
|
|
|
|
|
|
#line 4 "./xsi/LineString.xsi" |
|
5111
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
5112
|
|
|
|
|
|
|
RETVAL = THIS->getPointN(n); |
|
5113
|
|
|
|
|
|
|
#line 5114 "Geos.xs.cc" |
|
5114
|
|
|
|
|
|
|
{ |
|
5115
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5116
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
5117
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5118
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
5119
|
|
|
|
|
|
|
} |
|
5120
|
|
|
|
|
|
|
} |
|
5121
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
5122
|
1
|
50
|
|
|
|
|
}); } |
|
5123
|
|
|
|
|
|
|
|
|
5124
|
|
|
|
|
|
|
|
|
5125
|
|
|
|
|
|
|
|
|
5126
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineString_getStartPoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
5127
|
|
|
|
|
|
|
{ |
|
5128
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5129
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
5130
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5131
|
|
|
|
|
|
|
{ |
|
5132
|
|
|
|
|
|
|
Point * RETVAL; |
|
5133
|
1
|
50
|
|
|
|
|
LineString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5134
|
|
|
|
|
|
|
; |
|
5135
|
|
|
|
|
|
|
#line 6 "./xsi/LineString.xsi" |
|
5136
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
5137
|
|
|
|
|
|
|
RETVAL = THIS->getStartPoint(); |
|
5138
|
|
|
|
|
|
|
#line 5139 "Geos.xs.cc" |
|
5139
|
|
|
|
|
|
|
{ |
|
5140
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5141
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
5142
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5143
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
5144
|
|
|
|
|
|
|
} |
|
5145
|
|
|
|
|
|
|
} |
|
5146
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
5147
|
1
|
50
|
|
|
|
|
}); } |
|
5148
|
|
|
|
|
|
|
|
|
5149
|
|
|
|
|
|
|
|
|
5150
|
|
|
|
|
|
|
|
|
5151
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineString_getEndPoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
5152
|
|
|
|
|
|
|
{ |
|
5153
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5154
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
5155
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5156
|
|
|
|
|
|
|
{ |
|
5157
|
|
|
|
|
|
|
Point * RETVAL; |
|
5158
|
1
|
50
|
|
|
|
|
LineString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5159
|
|
|
|
|
|
|
; |
|
5160
|
|
|
|
|
|
|
#line 8 "./xsi/LineString.xsi" |
|
5161
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
5162
|
|
|
|
|
|
|
RETVAL = THIS->getEndPoint(); |
|
5163
|
|
|
|
|
|
|
#line 5164 "Geos.xs.cc" |
|
5164
|
|
|
|
|
|
|
{ |
|
5165
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5166
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
5167
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5168
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
5169
|
|
|
|
|
|
|
} |
|
5170
|
|
|
|
|
|
|
} |
|
5171
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
5172
|
1
|
50
|
|
|
|
|
}); } |
|
5173
|
|
|
|
|
|
|
|
|
5174
|
|
|
|
|
|
|
|
|
5175
|
|
|
|
|
|
|
|
|
5176
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineString_isClosed) { xs::throw_guard(aTHX_ cv, [=]() |
|
5177
|
|
|
|
|
|
|
{ |
|
5178
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5179
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
5180
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5181
|
|
|
|
|
|
|
{ |
|
5182
|
|
|
|
|
|
|
bool RETVAL; |
|
5183
|
1
|
50
|
|
|
|
|
LineString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5184
|
|
|
|
|
|
|
; |
|
5185
|
|
|
|
|
|
|
#line 10 "./xsi/LineString.xsi" |
|
5186
|
|
|
|
|
|
|
RETVAL = THIS->isClosed(); |
|
5187
|
|
|
|
|
|
|
#line 5188 "Geos.xs.cc" |
|
5188
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
5189
|
|
|
|
|
|
|
} |
|
5190
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
5191
|
1
|
50
|
|
|
|
|
}); } |
|
5192
|
|
|
|
|
|
|
|
|
5193
|
|
|
|
|
|
|
|
|
5194
|
|
|
|
|
|
|
|
|
5195
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LineString_isRing) { xs::throw_guard(aTHX_ cv, [=]() |
|
5196
|
|
|
|
|
|
|
{ |
|
5197
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5198
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
5199
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5200
|
|
|
|
|
|
|
{ |
|
5201
|
|
|
|
|
|
|
bool RETVAL; |
|
5202
|
1
|
50
|
|
|
|
|
LineString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5203
|
|
|
|
|
|
|
; |
|
5204
|
|
|
|
|
|
|
#line 12 "./xsi/LineString.xsi" |
|
5205
|
|
|
|
|
|
|
RETVAL = THIS->isRing(); |
|
5206
|
|
|
|
|
|
|
#line 5207 "Geos.xs.cc" |
|
5207
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
5208
|
|
|
|
|
|
|
} |
|
5209
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
5210
|
1
|
50
|
|
|
|
|
}); } |
|
5211
|
|
|
|
|
|
|
|
|
5212
|
|
|
|
|
|
|
|
|
5213
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/LineString.xsi' */ |
|
5214
|
|
|
|
|
|
|
|
|
5215
|
|
|
|
|
|
|
|
|
5216
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/MultiLineString.xsi' from 'Geos.xs' */ |
|
5217
|
|
|
|
|
|
|
|
|
5218
|
|
|
|
|
|
|
|
|
5219
|
|
|
|
|
|
|
|
|
5220
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__MultiLineString_isClosed) { xs::throw_guard(aTHX_ cv, [=]() |
|
5221
|
|
|
|
|
|
|
{ |
|
5222
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5223
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
5224
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5225
|
|
|
|
|
|
|
{ |
|
5226
|
|
|
|
|
|
|
bool RETVAL; |
|
5227
|
1
|
50
|
|
|
|
|
MultiLineString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5228
|
|
|
|
|
|
|
; |
|
5229
|
|
|
|
|
|
|
#line 4 "./xsi/MultiLineString.xsi" |
|
5230
|
|
|
|
|
|
|
RETVAL = THIS->isClosed(); |
|
5231
|
|
|
|
|
|
|
#line 5232 "Geos.xs.cc" |
|
5232
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
5233
|
|
|
|
|
|
|
} |
|
5234
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
5235
|
1
|
50
|
|
|
|
|
}); } |
|
5236
|
|
|
|
|
|
|
|
|
5237
|
|
|
|
|
|
|
|
|
5238
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/MultiLineString.xsi' */ |
|
5239
|
|
|
|
|
|
|
|
|
5240
|
|
|
|
|
|
|
|
|
5241
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/LinearRing.xsi' from 'Geos.xs' */ |
|
5242
|
|
|
|
|
|
|
|
|
5243
|
|
|
|
|
|
|
|
|
5244
|
|
|
|
|
|
|
|
|
5245
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__LinearRing_reverse) { xs::throw_guard(aTHX_ cv, [=]() |
|
5246
|
|
|
|
|
|
|
{ |
|
5247
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5248
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
5249
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5250
|
|
|
|
|
|
|
{ |
|
5251
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
5252
|
1
|
50
|
|
|
|
|
LinearRing* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5253
|
|
|
|
|
|
|
; |
|
5254
|
|
|
|
|
|
|
#line 4 "./xsi/LinearRing.xsi" |
|
5255
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->reverse()); |
|
5256
|
|
|
|
|
|
|
#line 5257 "Geos.xs.cc" |
|
5257
|
|
|
|
|
|
|
{ |
|
5258
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5259
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
5260
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
5261
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
5262
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
5263
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
5264
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
5265
|
|
|
|
|
|
|
case SVt_PVCV: |
|
5266
|
|
|
|
|
|
|
case SVt_PVIO: |
|
5267
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
5268
|
0
|
|
|
|
|
|
break; |
|
5269
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
5270
|
|
|
|
|
|
|
} |
|
5271
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5272
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
5273
|
|
|
|
|
|
|
} |
|
5274
|
|
|
|
|
|
|
} |
|
5275
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
5276
|
1
|
50
|
|
|
|
|
}); } |
|
5277
|
|
|
|
|
|
|
|
|
5278
|
|
|
|
|
|
|
|
|
5279
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/LinearRing.xsi' */ |
|
5280
|
|
|
|
|
|
|
|
|
5281
|
|
|
|
|
|
|
|
|
5282
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/Polygon.xsi' from 'Geos.xs' */ |
|
5283
|
|
|
|
|
|
|
|
|
5284
|
|
|
|
|
|
|
|
|
5285
|
|
|
|
|
|
|
|
|
5286
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Polygon_getExteriorRing) { xs::throw_guard(aTHX_ cv, [=]() |
|
5287
|
|
|
|
|
|
|
{ |
|
5288
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5289
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
5290
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5291
|
|
|
|
|
|
|
{ |
|
5292
|
|
|
|
|
|
|
LinearRing * RETVAL; |
|
5293
|
1
|
50
|
|
|
|
|
Polygon* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5294
|
|
|
|
|
|
|
; |
|
5295
|
|
|
|
|
|
|
#line 6 "./xsi/Polygon.xsi" |
|
5296
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
5297
|
|
|
|
|
|
|
RETVAL = dyn_cast(THIS->getExteriorRing()->clone()); |
|
5298
|
|
|
|
|
|
|
#line 5299 "Geos.xs.cc" |
|
5299
|
|
|
|
|
|
|
{ |
|
5300
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5301
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
5302
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5303
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
5304
|
|
|
|
|
|
|
} |
|
5305
|
|
|
|
|
|
|
} |
|
5306
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
5307
|
1
|
50
|
|
|
|
|
}); } |
|
5308
|
|
|
|
|
|
|
|
|
5309
|
|
|
|
|
|
|
|
|
5310
|
|
|
|
|
|
|
|
|
5311
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Polygon_getInteriorRingN) { xs::throw_guard(aTHX_ cv, [=]() |
|
5312
|
|
|
|
|
|
|
{ |
|
5313
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5314
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
5315
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, index"); |
|
5316
|
|
|
|
|
|
|
{ |
|
5317
|
|
|
|
|
|
|
LinearRing * RETVAL; |
|
5318
|
1
|
50
|
|
|
|
|
Polygon* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5319
|
|
|
|
|
|
|
; |
|
5320
|
1
|
50
|
|
|
|
|
std::size_t index = xs::in(aTHX_ ST(1)); |
|
5321
|
|
|
|
|
|
|
; |
|
5322
|
|
|
|
|
|
|
#line 10 "./xsi/Polygon.xsi" |
|
5323
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
5324
|
|
|
|
|
|
|
auto r = THIS->getInteriorRingN(index); |
|
5325
|
|
|
|
|
|
|
if (r) RETVAL = dyn_cast(r->clone()); |
|
5326
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
5327
|
|
|
|
|
|
|
#line 5328 "Geos.xs.cc" |
|
5328
|
|
|
|
|
|
|
{ |
|
5329
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5330
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
5331
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5332
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
5333
|
|
|
|
|
|
|
} |
|
5334
|
|
|
|
|
|
|
} |
|
5335
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
5336
|
1
|
50
|
|
|
|
|
}); } |
|
5337
|
|
|
|
|
|
|
|
|
5338
|
|
|
|
|
|
|
|
|
5339
|
|
|
|
|
|
|
|
|
5340
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Polygon_getNumInteriorRing) { xs::throw_guard(aTHX_ cv, [=]() |
|
5341
|
|
|
|
|
|
|
{ |
|
5342
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5343
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
5344
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5345
|
|
|
|
|
|
|
{ |
|
5346
|
|
|
|
|
|
|
std::size_t RETVAL; |
|
5347
|
2
|
50
|
|
|
|
|
Polygon* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5348
|
|
|
|
|
|
|
; |
|
5349
|
|
|
|
|
|
|
#line 15 "./xsi/Polygon.xsi" |
|
5350
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
5351
|
|
|
|
|
|
|
RETVAL = THIS->getNumInteriorRing(); |
|
5352
|
|
|
|
|
|
|
#line 5353 "Geos.xs.cc" |
|
5353
|
|
|
|
|
|
|
{ |
|
5354
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5355
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
5356
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5357
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
5358
|
|
|
|
|
|
|
} |
|
5359
|
|
|
|
|
|
|
} |
|
5360
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
5361
|
2
|
50
|
|
|
|
|
}); } |
|
5362
|
|
|
|
|
|
|
|
|
5363
|
|
|
|
|
|
|
|
|
5364
|
|
|
|
|
|
|
|
|
5365
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Polygon_tesselate) { xs::throw_guard(aTHX_ cv, [=]() |
|
5366
|
|
|
|
|
|
|
{ |
|
5367
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5368
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
5369
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5370
|
|
|
|
|
|
|
{ |
|
5371
|
|
|
|
|
|
|
GeometryCollection * RETVAL; |
|
5372
|
1
|
50
|
|
|
|
|
Polygon* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5373
|
|
|
|
|
|
|
; |
|
5374
|
|
|
|
|
|
|
#line 18 "./xsi/Polygon.xsi" |
|
5375
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
5376
|
|
|
|
|
|
|
RETVAL = panda::Geos::tesselate(*THIS); |
|
5377
|
|
|
|
|
|
|
#line 5378 "Geos.xs.cc" |
|
5378
|
|
|
|
|
|
|
{ |
|
5379
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5380
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
5381
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5382
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
5383
|
|
|
|
|
|
|
} |
|
5384
|
|
|
|
|
|
|
} |
|
5385
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
5386
|
1
|
50
|
|
|
|
|
}); } |
|
5387
|
|
|
|
|
|
|
|
|
5388
|
|
|
|
|
|
|
|
|
5389
|
|
|
|
|
|
|
|
|
5390
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Polygon_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
5391
|
|
|
|
|
|
|
{ |
|
5392
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5393
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
5394
|
|
|
|
|
|
|
{ |
|
5395
|
|
|
|
|
|
|
int RETVAL; |
|
5396
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5397
|
|
|
|
|
|
|
#line 21 "./xsi/Polygon.xsi" |
|
5398
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
5399
|
|
|
|
|
|
|
#line 5400 "Geos.xs.cc" |
|
5400
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
5401
|
|
|
|
|
|
|
} |
|
5402
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
5403
|
0
|
0
|
|
|
|
|
}); } |
|
5404
|
|
|
|
|
|
|
|
|
5405
|
|
|
|
|
|
|
|
|
5406
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/Polygon.xsi' */ |
|
5407
|
|
|
|
|
|
|
|
|
5408
|
|
|
|
|
|
|
|
|
5409
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/MultiPolygon.xsi' from 'Geos.xs' */ |
|
5410
|
|
|
|
|
|
|
|
|
5411
|
|
|
|
|
|
|
|
|
5412
|
|
|
|
|
|
|
|
|
5413
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__MultiPolygon_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
5414
|
|
|
|
|
|
|
{ |
|
5415
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5416
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
5417
|
|
|
|
|
|
|
{ |
|
5418
|
|
|
|
|
|
|
int RETVAL; |
|
5419
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5420
|
|
|
|
|
|
|
#line 4 "./xsi/MultiPolygon.xsi" |
|
5421
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
5422
|
|
|
|
|
|
|
#line 5423 "Geos.xs.cc" |
|
5423
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
5424
|
|
|
|
|
|
|
} |
|
5425
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
5426
|
0
|
0
|
|
|
|
|
}); } |
|
5427
|
|
|
|
|
|
|
|
|
5428
|
|
|
|
|
|
|
|
|
5429
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/MultiPolygon.xsi' */ |
|
5430
|
|
|
|
|
|
|
|
|
5431
|
|
|
|
|
|
|
|
|
5432
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/WKBConstants.xsi' from 'Geos.xs' */ |
|
5433
|
|
|
|
|
|
|
|
|
5434
|
|
|
|
|
|
|
|
|
5435
|
|
|
|
|
|
|
|
|
5436
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBConstants_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
5437
|
|
|
|
|
|
|
{ |
|
5438
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5439
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
5440
|
|
|
|
|
|
|
{ |
|
5441
|
|
|
|
|
|
|
int RETVAL; |
|
5442
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5443
|
|
|
|
|
|
|
#line 4 "./xsi/WKBConstants.xsi" |
|
5444
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
5445
|
|
|
|
|
|
|
#line 5446 "Geos.xs.cc" |
|
5446
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
5447
|
|
|
|
|
|
|
} |
|
5448
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
5449
|
0
|
0
|
|
|
|
|
}); } |
|
5450
|
|
|
|
|
|
|
|
|
5451
|
|
|
|
|
|
|
|
|
5452
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/WKBConstants.xsi' */ |
|
5453
|
|
|
|
|
|
|
|
|
5454
|
|
|
|
|
|
|
|
|
5455
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/WKBWriter.xsi' from 'Geos.xs' */ |
|
5456
|
|
|
|
|
|
|
|
|
5457
|
|
|
|
|
|
|
|
|
5458
|
|
|
|
|
|
|
|
|
5459
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBWriter_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
5460
|
|
|
|
|
|
|
{ |
|
5461
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5462
|
6
|
50
|
|
|
|
|
if (items < 1 || items > 4) |
|
|
|
50
|
|
|
|
|
|
|
5463
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, dims= 2, bo= getMachineByteOrder(), includeSRID= false"); |
|
5464
|
|
|
|
|
|
|
{ |
|
5465
|
|
|
|
|
|
|
WKBWriter * RETVAL; |
|
5466
|
|
|
|
|
|
|
int dims; |
|
5467
|
|
|
|
|
|
|
int bo; |
|
5468
|
|
|
|
|
|
|
bool includeSRID; |
|
5469
|
|
|
|
|
|
|
|
|
5470
|
6
|
50
|
|
|
|
|
if (items < 2) |
|
5471
|
0
|
|
|
|
|
|
dims = 2; |
|
5472
|
|
|
|
|
|
|
else { |
|
5473
|
0
|
0
|
|
|
|
|
dims = (int)SvIV(ST(1)) |
|
5474
|
6
|
50
|
|
|
|
|
; |
|
5475
|
|
|
|
|
|
|
} |
|
5476
|
|
|
|
|
|
|
|
|
5477
|
6
|
100
|
|
|
|
|
if (items < 3) |
|
5478
|
2
|
|
|
|
|
|
bo = getMachineByteOrder(); |
|
5479
|
|
|
|
|
|
|
else { |
|
5480
|
0
|
0
|
|
|
|
|
bo = (int)SvIV(ST(2)) |
|
5481
|
4
|
50
|
|
|
|
|
; |
|
5482
|
|
|
|
|
|
|
} |
|
5483
|
|
|
|
|
|
|
|
|
5484
|
6
|
100
|
|
|
|
|
if (items < 4) |
|
5485
|
2
|
|
|
|
|
|
includeSRID = false; |
|
5486
|
|
|
|
|
|
|
else { |
|
5487
|
4
|
50
|
|
|
|
|
includeSRID = (bool)SvTRUE(ST(3)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5488
|
4
|
|
|
|
|
|
; |
|
5489
|
|
|
|
|
|
|
} |
|
5490
|
|
|
|
|
|
|
#line 5 "./xsi/WKBWriter.xsi" |
|
5491
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
5492
|
|
|
|
|
|
|
RETVAL = new WKBWriter(dims, bo, includeSRID); |
|
5493
|
|
|
|
|
|
|
#line 5494 "Geos.xs.cc" |
|
5494
|
|
|
|
|
|
|
{ |
|
5495
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5496
|
6
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
5497
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5498
|
6
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
5499
|
|
|
|
|
|
|
} |
|
5500
|
|
|
|
|
|
|
} |
|
5501
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
5502
|
6
|
50
|
|
|
|
|
}); } |
|
5503
|
|
|
|
|
|
|
|
|
5504
|
|
|
|
|
|
|
|
|
5505
|
|
|
|
|
|
|
|
|
5506
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBWriter_getOutputDimension) { xs::throw_guard(aTHX_ cv, [=]() |
|
5507
|
|
|
|
|
|
|
{ |
|
5508
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5509
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
5510
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5511
|
|
|
|
|
|
|
{ |
|
5512
|
|
|
|
|
|
|
int RETVAL; |
|
5513
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5514
|
0
|
0
|
|
|
|
|
WKBWriter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5515
|
|
|
|
|
|
|
; |
|
5516
|
|
|
|
|
|
|
#line 8 "./xsi/WKBWriter.xsi" |
|
5517
|
|
|
|
|
|
|
RETVAL = THIS->getOutputDimension(); |
|
5518
|
|
|
|
|
|
|
#line 5519 "Geos.xs.cc" |
|
5519
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
5520
|
|
|
|
|
|
|
} |
|
5521
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
5522
|
0
|
0
|
|
|
|
|
}); } |
|
5523
|
|
|
|
|
|
|
|
|
5524
|
|
|
|
|
|
|
|
|
5525
|
|
|
|
|
|
|
|
|
5526
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBWriter_setOutputDimension) { xs::throw_guard(aTHX_ cv, [=]() |
|
5527
|
|
|
|
|
|
|
{ |
|
5528
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5529
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
5530
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newOutputDimension"); |
|
5531
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
5532
|
0
|
|
|
|
|
|
SP -= items; |
|
5533
|
|
|
|
|
|
|
{ |
|
5534
|
0
|
0
|
|
|
|
|
WKBWriter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5535
|
|
|
|
|
|
|
; |
|
5536
|
0
|
0
|
|
|
|
|
int newOutputDimension = (int)SvIV(ST(1)) |
|
5537
|
|
|
|
|
|
|
; |
|
5538
|
|
|
|
|
|
|
#line 10 "./xsi/WKBWriter.xsi" |
|
5539
|
|
|
|
|
|
|
THIS->setOutputDimension(newOutputDimension); |
|
5540
|
|
|
|
|
|
|
#line 5541 "Geos.xs.cc" |
|
5541
|
0
|
|
|
|
|
|
PUTBACK; |
|
5542
|
0
|
|
|
|
|
|
return; |
|
5543
|
|
|
|
|
|
|
} |
|
5544
|
0
|
0
|
|
|
|
|
}); } |
|
5545
|
|
|
|
|
|
|
|
|
5546
|
|
|
|
|
|
|
|
|
5547
|
|
|
|
|
|
|
|
|
5548
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBWriter_getByteOrder) { xs::throw_guard(aTHX_ cv, [=]() |
|
5549
|
|
|
|
|
|
|
{ |
|
5550
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5551
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
5552
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5553
|
|
|
|
|
|
|
{ |
|
5554
|
|
|
|
|
|
|
int RETVAL; |
|
5555
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5556
|
0
|
0
|
|
|
|
|
WKBWriter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5557
|
|
|
|
|
|
|
; |
|
5558
|
|
|
|
|
|
|
#line 12 "./xsi/WKBWriter.xsi" |
|
5559
|
|
|
|
|
|
|
RETVAL = THIS->getByteOrder(); |
|
5560
|
|
|
|
|
|
|
#line 5561 "Geos.xs.cc" |
|
5561
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
5562
|
|
|
|
|
|
|
} |
|
5563
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
5564
|
0
|
0
|
|
|
|
|
}); } |
|
5565
|
|
|
|
|
|
|
|
|
5566
|
|
|
|
|
|
|
|
|
5567
|
|
|
|
|
|
|
|
|
5568
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBWriter_setByteOrder) { xs::throw_guard(aTHX_ cv, [=]() |
|
5569
|
|
|
|
|
|
|
{ |
|
5570
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5571
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
5572
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newByteOrder"); |
|
5573
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
5574
|
0
|
|
|
|
|
|
SP -= items; |
|
5575
|
|
|
|
|
|
|
{ |
|
5576
|
0
|
0
|
|
|
|
|
WKBWriter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5577
|
|
|
|
|
|
|
; |
|
5578
|
0
|
0
|
|
|
|
|
int newByteOrder = (int)SvIV(ST(1)) |
|
5579
|
|
|
|
|
|
|
; |
|
5580
|
|
|
|
|
|
|
#line 14 "./xsi/WKBWriter.xsi" |
|
5581
|
|
|
|
|
|
|
THIS->setByteOrder(newByteOrder); |
|
5582
|
|
|
|
|
|
|
#line 5583 "Geos.xs.cc" |
|
5583
|
0
|
|
|
|
|
|
PUTBACK; |
|
5584
|
0
|
|
|
|
|
|
return; |
|
5585
|
|
|
|
|
|
|
} |
|
5586
|
0
|
0
|
|
|
|
|
}); } |
|
5587
|
|
|
|
|
|
|
|
|
5588
|
|
|
|
|
|
|
|
|
5589
|
|
|
|
|
|
|
|
|
5590
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBWriter_getIncludeSRID) { xs::throw_guard(aTHX_ cv, [=]() |
|
5591
|
|
|
|
|
|
|
{ |
|
5592
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5593
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
5594
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
5595
|
|
|
|
|
|
|
{ |
|
5596
|
|
|
|
|
|
|
int RETVAL; |
|
5597
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5598
|
0
|
0
|
|
|
|
|
WKBWriter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5599
|
|
|
|
|
|
|
; |
|
5600
|
|
|
|
|
|
|
#line 16 "./xsi/WKBWriter.xsi" |
|
5601
|
|
|
|
|
|
|
RETVAL = THIS->getIncludeSRID(); |
|
5602
|
|
|
|
|
|
|
#line 5603 "Geos.xs.cc" |
|
5603
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
5604
|
|
|
|
|
|
|
} |
|
5605
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
5606
|
0
|
0
|
|
|
|
|
}); } |
|
5607
|
|
|
|
|
|
|
|
|
5608
|
|
|
|
|
|
|
|
|
5609
|
|
|
|
|
|
|
|
|
5610
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBWriter_setIncludeSRID) { xs::throw_guard(aTHX_ cv, [=]() |
|
5611
|
|
|
|
|
|
|
{ |
|
5612
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5613
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
5614
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newIncludeSRID"); |
|
5615
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
5616
|
0
|
|
|
|
|
|
SP -= items; |
|
5617
|
|
|
|
|
|
|
{ |
|
5618
|
0
|
0
|
|
|
|
|
WKBWriter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5619
|
|
|
|
|
|
|
; |
|
5620
|
0
|
0
|
|
|
|
|
int newIncludeSRID = (int)SvIV(ST(1)) |
|
5621
|
|
|
|
|
|
|
; |
|
5622
|
|
|
|
|
|
|
#line 18 "./xsi/WKBWriter.xsi" |
|
5623
|
|
|
|
|
|
|
THIS->setIncludeSRID(newIncludeSRID); |
|
5624
|
|
|
|
|
|
|
#line 5625 "Geos.xs.cc" |
|
5625
|
0
|
|
|
|
|
|
PUTBACK; |
|
5626
|
0
|
|
|
|
|
|
return; |
|
5627
|
|
|
|
|
|
|
} |
|
5628
|
0
|
0
|
|
|
|
|
}); } |
|
5629
|
|
|
|
|
|
|
|
|
5630
|
|
|
|
|
|
|
|
|
5631
|
|
|
|
|
|
|
|
|
5632
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBWriter_write) { xs::throw_guard(aTHX_ cv, [=]() |
|
5633
|
|
|
|
|
|
|
{ |
|
5634
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5635
|
3
|
50
|
|
|
|
|
if (items != 2) |
|
5636
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, g"); |
|
5637
|
|
|
|
|
|
|
{ |
|
5638
|
6
|
|
|
|
|
|
std::string RETVAL; |
|
5639
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5640
|
3
|
50
|
|
|
|
|
WKBWriter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5641
|
|
|
|
|
|
|
; |
|
5642
|
3
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(1)); |
|
5643
|
|
|
|
|
|
|
; |
|
5644
|
|
|
|
|
|
|
#line 21 "./xsi/WKBWriter.xsi" |
|
5645
|
|
|
|
|
|
|
std::ostringstream out; |
|
5646
|
|
|
|
|
|
|
THIS->write(g, out); |
|
5647
|
|
|
|
|
|
|
RETVAL = out.str(); |
|
5648
|
|
|
|
|
|
|
#line 5649 "Geos.xs.cc" |
|
5649
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5650
|
|
|
|
|
|
|
} |
|
5651
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
5652
|
3
|
50
|
|
|
|
|
}); } |
|
5653
|
|
|
|
|
|
|
|
|
5654
|
|
|
|
|
|
|
|
|
5655
|
|
|
|
|
|
|
|
|
5656
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBWriter_writeHEX) { xs::throw_guard(aTHX_ cv, [=]() |
|
5657
|
|
|
|
|
|
|
{ |
|
5658
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5659
|
3
|
50
|
|
|
|
|
if (items != 2) |
|
5660
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, g"); |
|
5661
|
|
|
|
|
|
|
{ |
|
5662
|
6
|
|
|
|
|
|
std::string RETVAL; |
|
5663
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5664
|
3
|
50
|
|
|
|
|
WKBWriter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5665
|
|
|
|
|
|
|
; |
|
5666
|
3
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(1)); |
|
5667
|
|
|
|
|
|
|
; |
|
5668
|
|
|
|
|
|
|
#line 27 "./xsi/WKBWriter.xsi" |
|
5669
|
|
|
|
|
|
|
std::ostringstream out; |
|
5670
|
|
|
|
|
|
|
THIS->writeHEX(g, out); |
|
5671
|
|
|
|
|
|
|
RETVAL = out.str(); |
|
5672
|
|
|
|
|
|
|
#line 5673 "Geos.xs.cc" |
|
5673
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5674
|
|
|
|
|
|
|
} |
|
5675
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
5676
|
3
|
50
|
|
|
|
|
}); } |
|
5677
|
|
|
|
|
|
|
|
|
5678
|
|
|
|
|
|
|
|
|
5679
|
|
|
|
|
|
|
|
|
5680
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBWriter_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
5681
|
|
|
|
|
|
|
{ |
|
5682
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5683
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
5684
|
|
|
|
|
|
|
{ |
|
5685
|
|
|
|
|
|
|
int RETVAL; |
|
5686
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5687
|
|
|
|
|
|
|
#line 32 "./xsi/WKBWriter.xsi" |
|
5688
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
5689
|
|
|
|
|
|
|
#line 5690 "Geos.xs.cc" |
|
5690
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
5691
|
|
|
|
|
|
|
} |
|
5692
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
5693
|
0
|
0
|
|
|
|
|
}); } |
|
5694
|
|
|
|
|
|
|
|
|
5695
|
|
|
|
|
|
|
|
|
5696
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/WKBWriter.xsi' */ |
|
5697
|
|
|
|
|
|
|
|
|
5698
|
|
|
|
|
|
|
|
|
5699
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/WKBReader.xsi' from 'Geos.xs' */ |
|
5700
|
|
|
|
|
|
|
|
|
5701
|
|
|
|
|
|
|
|
|
5702
|
|
|
|
|
|
|
|
|
5703
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBReader_read) { xs::throw_guard(aTHX_ cv, [=]() |
|
5704
|
|
|
|
|
|
|
{ |
|
5705
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5706
|
3
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
5707
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "in, geometry_factory= NULL"); |
|
5708
|
|
|
|
|
|
|
{ |
|
5709
|
6
|
|
|
|
|
|
Sv RETVAL; |
|
5710
|
6
|
50
|
|
|
|
|
std::string in; |
|
5711
|
|
|
|
|
|
|
SV* geometry_factory; |
|
5712
|
|
|
|
|
|
|
|
|
5713
|
|
|
|
|
|
|
{ STRLEN __in_len; |
|
5714
|
3
|
50
|
|
|
|
|
const char* __in_buf = SvPV(ST(0), __in_len); |
|
|
|
0
|
|
|
|
|
|
|
5715
|
3
|
50
|
|
|
|
|
in.assign(__in_buf, __in_len); } |
|
5716
|
|
|
|
|
|
|
; |
|
5717
|
|
|
|
|
|
|
|
|
5718
|
3
|
100
|
|
|
|
|
if (items < 2) |
|
5719
|
1
|
|
|
|
|
|
geometry_factory = NULL; |
|
5720
|
|
|
|
|
|
|
else { |
|
5721
|
2
|
|
|
|
|
|
geometry_factory = ST(1) |
|
5722
|
2
|
|
|
|
|
|
; |
|
5723
|
|
|
|
|
|
|
} |
|
5724
|
|
|
|
|
|
|
#line 5 "./xsi/WKBReader.xsi" |
|
5725
|
|
|
|
|
|
|
std::istringstream in_stream(in); |
|
5726
|
|
|
|
|
|
|
Geometry* g; |
|
5727
|
|
|
|
|
|
|
if (geometry_factory) { |
|
5728
|
|
|
|
|
|
|
WKBReader r(xs::in(geometry_factory)); |
|
5729
|
|
|
|
|
|
|
g = r.read(in_stream); |
|
5730
|
|
|
|
|
|
|
} |
|
5731
|
|
|
|
|
|
|
else { |
|
5732
|
|
|
|
|
|
|
WKBReader r; |
|
5733
|
|
|
|
|
|
|
g = r.read(in_stream); |
|
5734
|
|
|
|
|
|
|
} |
|
5735
|
|
|
|
|
|
|
RETVAL = Helper::uplift(g); |
|
5736
|
|
|
|
|
|
|
#line 5737 "Geos.xs.cc" |
|
5737
|
|
|
|
|
|
|
{ |
|
5738
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5739
|
3
|
|
|
|
|
|
RETVALSV = NULL; |
|
5740
|
3
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
5741
|
3
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
5742
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
5743
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
5744
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
5745
|
|
|
|
|
|
|
case SVt_PVCV: |
|
5746
|
|
|
|
|
|
|
case SVt_PVIO: |
|
5747
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
5748
|
0
|
|
|
|
|
|
break; |
|
5749
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
5750
|
|
|
|
|
|
|
} |
|
5751
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5752
|
3
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
5753
|
|
|
|
|
|
|
} |
|
5754
|
|
|
|
|
|
|
} |
|
5755
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
5756
|
3
|
50
|
|
|
|
|
}); } |
|
5757
|
|
|
|
|
|
|
|
|
5758
|
|
|
|
|
|
|
|
|
5759
|
|
|
|
|
|
|
|
|
5760
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKBReader_readHEX) { xs::throw_guard(aTHX_ cv, [=]() |
|
5761
|
|
|
|
|
|
|
{ |
|
5762
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5763
|
3
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
5764
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "in, geometry_factory= NULL"); |
|
5765
|
|
|
|
|
|
|
{ |
|
5766
|
6
|
|
|
|
|
|
Sv RETVAL; |
|
5767
|
6
|
50
|
|
|
|
|
std::string in; |
|
5768
|
|
|
|
|
|
|
SV* geometry_factory; |
|
5769
|
|
|
|
|
|
|
|
|
5770
|
|
|
|
|
|
|
{ STRLEN __in_len; |
|
5771
|
3
|
50
|
|
|
|
|
const char* __in_buf = SvPV(ST(0), __in_len); |
|
|
|
0
|
|
|
|
|
|
|
5772
|
3
|
50
|
|
|
|
|
in.assign(__in_buf, __in_len); } |
|
5773
|
|
|
|
|
|
|
; |
|
5774
|
|
|
|
|
|
|
|
|
5775
|
3
|
100
|
|
|
|
|
if (items < 2) |
|
5776
|
1
|
|
|
|
|
|
geometry_factory = NULL; |
|
5777
|
|
|
|
|
|
|
else { |
|
5778
|
2
|
|
|
|
|
|
geometry_factory = ST(1) |
|
5779
|
2
|
|
|
|
|
|
; |
|
5780
|
|
|
|
|
|
|
} |
|
5781
|
|
|
|
|
|
|
#line 19 "./xsi/WKBReader.xsi" |
|
5782
|
|
|
|
|
|
|
std::istringstream in_stream(in); |
|
5783
|
|
|
|
|
|
|
Geometry* g; |
|
5784
|
|
|
|
|
|
|
if (geometry_factory) { |
|
5785
|
|
|
|
|
|
|
WKBReader r(xs::in(geometry_factory)); |
|
5786
|
|
|
|
|
|
|
g = r.readHEX(in_stream); |
|
5787
|
|
|
|
|
|
|
} |
|
5788
|
|
|
|
|
|
|
else { |
|
5789
|
|
|
|
|
|
|
WKBReader r; |
|
5790
|
|
|
|
|
|
|
g = r.readHEX(in_stream); |
|
5791
|
|
|
|
|
|
|
} |
|
5792
|
|
|
|
|
|
|
RETVAL = Helper::uplift(g); |
|
5793
|
|
|
|
|
|
|
#line 5794 "Geos.xs.cc" |
|
5794
|
|
|
|
|
|
|
{ |
|
5795
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5796
|
3
|
|
|
|
|
|
RETVALSV = NULL; |
|
5797
|
3
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
5798
|
3
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
5799
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
5800
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
5801
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
5802
|
|
|
|
|
|
|
case SVt_PVCV: |
|
5803
|
|
|
|
|
|
|
case SVt_PVIO: |
|
5804
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
5805
|
0
|
|
|
|
|
|
break; |
|
5806
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
5807
|
|
|
|
|
|
|
} |
|
5808
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5809
|
3
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
5810
|
|
|
|
|
|
|
} |
|
5811
|
|
|
|
|
|
|
} |
|
5812
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
5813
|
3
|
50
|
|
|
|
|
}); } |
|
5814
|
|
|
|
|
|
|
|
|
5815
|
|
|
|
|
|
|
|
|
5816
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/WKBReader.xsi' */ |
|
5817
|
|
|
|
|
|
|
|
|
5818
|
|
|
|
|
|
|
|
|
5819
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/WKTWriter.xsi' from 'Geos.xs' */ |
|
5820
|
|
|
|
|
|
|
|
|
5821
|
|
|
|
|
|
|
|
|
5822
|
|
|
|
|
|
|
|
|
5823
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKTWriter_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
5824
|
|
|
|
|
|
|
{ |
|
5825
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5826
|
2
|
50
|
|
|
|
|
if (items < 1 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
5827
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, roundingPrecision= NULL, trim= NULL"); |
|
5828
|
|
|
|
|
|
|
{ |
|
5829
|
|
|
|
|
|
|
WKTWriter * RETVAL; |
|
5830
|
|
|
|
|
|
|
SV* roundingPrecision; |
|
5831
|
|
|
|
|
|
|
SV* trim; |
|
5832
|
|
|
|
|
|
|
|
|
5833
|
2
|
50
|
|
|
|
|
if (items < 2) |
|
5834
|
2
|
|
|
|
|
|
roundingPrecision = NULL; |
|
5835
|
|
|
|
|
|
|
else { |
|
5836
|
0
|
|
|
|
|
|
roundingPrecision = ST(1) |
|
5837
|
0
|
|
|
|
|
|
; |
|
5838
|
|
|
|
|
|
|
} |
|
5839
|
|
|
|
|
|
|
|
|
5840
|
2
|
50
|
|
|
|
|
if (items < 3) |
|
5841
|
2
|
|
|
|
|
|
trim = NULL; |
|
5842
|
|
|
|
|
|
|
else { |
|
5843
|
0
|
|
|
|
|
|
trim = ST(2) |
|
5844
|
0
|
|
|
|
|
|
; |
|
5845
|
|
|
|
|
|
|
} |
|
5846
|
|
|
|
|
|
|
#line 5 "./xsi/WKTWriter.xsi" |
|
5847
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
5848
|
|
|
|
|
|
|
RETVAL = new WKTWriter(); |
|
5849
|
|
|
|
|
|
|
if (roundingPrecision) RETVAL->setRoundingPrecision(SvIV(roundingPrecision)); |
|
5850
|
|
|
|
|
|
|
if (trim) RETVAL->setTrim(SvTRUE(trim)); |
|
5851
|
|
|
|
|
|
|
#line 5852 "Geos.xs.cc" |
|
5852
|
|
|
|
|
|
|
{ |
|
5853
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5854
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
5855
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
5856
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
5857
|
|
|
|
|
|
|
} |
|
5858
|
|
|
|
|
|
|
} |
|
5859
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
5860
|
2
|
50
|
|
|
|
|
}); } |
|
5861
|
|
|
|
|
|
|
|
|
5862
|
|
|
|
|
|
|
|
|
5863
|
|
|
|
|
|
|
|
|
5864
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKTWriter_setTrim) { xs::throw_guard(aTHX_ cv, [=]() |
|
5865
|
|
|
|
|
|
|
{ |
|
5866
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5867
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
5868
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, value"); |
|
5869
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
5870
|
0
|
|
|
|
|
|
SP -= items; |
|
5871
|
|
|
|
|
|
|
{ |
|
5872
|
0
|
0
|
|
|
|
|
WKTWriter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5873
|
|
|
|
|
|
|
; |
|
5874
|
0
|
0
|
|
|
|
|
bool value = (bool)SvTRUE(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5875
|
|
|
|
|
|
|
; |
|
5876
|
|
|
|
|
|
|
#line 10 "./xsi/WKTWriter.xsi" |
|
5877
|
|
|
|
|
|
|
THIS->setTrim(value); |
|
5878
|
|
|
|
|
|
|
#line 5879 "Geos.xs.cc" |
|
5879
|
0
|
|
|
|
|
|
PUTBACK; |
|
5880
|
0
|
|
|
|
|
|
return; |
|
5881
|
|
|
|
|
|
|
} |
|
5882
|
0
|
0
|
|
|
|
|
}); } |
|
5883
|
|
|
|
|
|
|
|
|
5884
|
|
|
|
|
|
|
|
|
5885
|
|
|
|
|
|
|
|
|
5886
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKTWriter_setRoundingPrecision) { xs::throw_guard(aTHX_ cv, [=]() |
|
5887
|
|
|
|
|
|
|
{ |
|
5888
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5889
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
5890
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, value"); |
|
5891
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
5892
|
0
|
|
|
|
|
|
SP -= items; |
|
5893
|
|
|
|
|
|
|
{ |
|
5894
|
0
|
0
|
|
|
|
|
WKTWriter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5895
|
|
|
|
|
|
|
; |
|
5896
|
0
|
0
|
|
|
|
|
int value = (int)SvIV(ST(1)) |
|
5897
|
|
|
|
|
|
|
; |
|
5898
|
|
|
|
|
|
|
#line 12 "./xsi/WKTWriter.xsi" |
|
5899
|
|
|
|
|
|
|
THIS->setRoundingPrecision(value); |
|
5900
|
|
|
|
|
|
|
#line 5901 "Geos.xs.cc" |
|
5901
|
0
|
|
|
|
|
|
PUTBACK; |
|
5902
|
0
|
|
|
|
|
|
return; |
|
5903
|
|
|
|
|
|
|
} |
|
5904
|
0
|
0
|
|
|
|
|
}); } |
|
5905
|
|
|
|
|
|
|
|
|
5906
|
|
|
|
|
|
|
|
|
5907
|
|
|
|
|
|
|
|
|
5908
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKTWriter_write) { xs::throw_guard(aTHX_ cv, [=]() |
|
5909
|
|
|
|
|
|
|
{ |
|
5910
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5911
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
5912
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, g"); |
|
5913
|
|
|
|
|
|
|
{ |
|
5914
|
4
|
|
|
|
|
|
std::string RETVAL; |
|
5915
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5916
|
2
|
50
|
|
|
|
|
WKTWriter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5917
|
|
|
|
|
|
|
; |
|
5918
|
2
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(1)); |
|
5919
|
|
|
|
|
|
|
; |
|
5920
|
|
|
|
|
|
|
#line 14 "./xsi/WKTWriter.xsi" |
|
5921
|
|
|
|
|
|
|
RETVAL = THIS->write(&g); |
|
5922
|
|
|
|
|
|
|
#line 5923 "Geos.xs.cc" |
|
5923
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5924
|
|
|
|
|
|
|
} |
|
5925
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
5926
|
2
|
50
|
|
|
|
|
}); } |
|
5927
|
|
|
|
|
|
|
|
|
5928
|
|
|
|
|
|
|
|
|
5929
|
|
|
|
|
|
|
|
|
5930
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKTWriter_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
5931
|
|
|
|
|
|
|
{ |
|
5932
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5933
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
5934
|
|
|
|
|
|
|
{ |
|
5935
|
|
|
|
|
|
|
int RETVAL; |
|
5936
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
5937
|
|
|
|
|
|
|
#line 16 "./xsi/WKTWriter.xsi" |
|
5938
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
5939
|
|
|
|
|
|
|
#line 5940 "Geos.xs.cc" |
|
5940
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
5941
|
|
|
|
|
|
|
} |
|
5942
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
5943
|
0
|
0
|
|
|
|
|
}); } |
|
5944
|
|
|
|
|
|
|
|
|
5945
|
|
|
|
|
|
|
|
|
5946
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/WKTWriter.xsi' */ |
|
5947
|
|
|
|
|
|
|
|
|
5948
|
|
|
|
|
|
|
|
|
5949
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/WKTReader.xsi' from 'Geos.xs' */ |
|
5950
|
|
|
|
|
|
|
|
|
5951
|
|
|
|
|
|
|
|
|
5952
|
|
|
|
|
|
|
|
|
5953
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__WKTReader_read) { xs::throw_guard(aTHX_ cv, [=]() |
|
5954
|
|
|
|
|
|
|
{ |
|
5955
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
5956
|
2
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
5957
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "in, geometry_factory= NULL"); |
|
5958
|
|
|
|
|
|
|
{ |
|
5959
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
5960
|
4
|
50
|
|
|
|
|
std::string in; |
|
5961
|
|
|
|
|
|
|
SV* geometry_factory; |
|
5962
|
|
|
|
|
|
|
|
|
5963
|
|
|
|
|
|
|
{ STRLEN __in_len; |
|
5964
|
2
|
50
|
|
|
|
|
const char* __in_buf = SvPV(ST(0), __in_len); |
|
|
|
0
|
|
|
|
|
|
|
5965
|
2
|
50
|
|
|
|
|
in.assign(__in_buf, __in_len); } |
|
5966
|
|
|
|
|
|
|
; |
|
5967
|
|
|
|
|
|
|
|
|
5968
|
2
|
100
|
|
|
|
|
if (items < 2) |
|
5969
|
1
|
|
|
|
|
|
geometry_factory = NULL; |
|
5970
|
|
|
|
|
|
|
else { |
|
5971
|
1
|
|
|
|
|
|
geometry_factory = ST(1) |
|
5972
|
1
|
|
|
|
|
|
; |
|
5973
|
|
|
|
|
|
|
} |
|
5974
|
|
|
|
|
|
|
#line 5 "./xsi/WKTReader.xsi" |
|
5975
|
|
|
|
|
|
|
Geometry* g; |
|
5976
|
|
|
|
|
|
|
if (geometry_factory) { |
|
5977
|
|
|
|
|
|
|
WKTReader r(xs::in(geometry_factory)); |
|
5978
|
|
|
|
|
|
|
g = r.read(in); |
|
5979
|
|
|
|
|
|
|
} |
|
5980
|
|
|
|
|
|
|
else { |
|
5981
|
|
|
|
|
|
|
WKTReader r; |
|
5982
|
|
|
|
|
|
|
g = r.read(in); |
|
5983
|
|
|
|
|
|
|
} |
|
5984
|
|
|
|
|
|
|
RETVAL = Helper::uplift(g); |
|
5985
|
|
|
|
|
|
|
#line 5986 "Geos.xs.cc" |
|
5986
|
|
|
|
|
|
|
{ |
|
5987
|
|
|
|
|
|
|
SV * RETVALSV; |
|
5988
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
5989
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
5990
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
5991
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
5992
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
5993
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
5994
|
|
|
|
|
|
|
case SVt_PVCV: |
|
5995
|
|
|
|
|
|
|
case SVt_PVIO: |
|
5996
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
5997
|
0
|
|
|
|
|
|
break; |
|
5998
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
5999
|
|
|
|
|
|
|
} |
|
6000
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
6001
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
6002
|
|
|
|
|
|
|
} |
|
6003
|
|
|
|
|
|
|
} |
|
6004
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
6005
|
2
|
50
|
|
|
|
|
}); } |
|
6006
|
|
|
|
|
|
|
|
|
6007
|
|
|
|
|
|
|
|
|
6008
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/WKTReader.xsi' */ |
|
6009
|
|
|
|
|
|
|
|
|
6010
|
|
|
|
|
|
|
|
|
6011
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/PrepGeometry.xsi' from 'Geos.xs' */ |
|
6012
|
|
|
|
|
|
|
|
|
6013
|
|
|
|
|
|
|
|
|
6014
|
|
|
|
|
|
|
|
|
6015
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_getGeometry) { xs::throw_guard(aTHX_ cv, [=]() |
|
6016
|
|
|
|
|
|
|
{ |
|
6017
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6018
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
6019
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
6020
|
|
|
|
|
|
|
{ |
|
6021
|
|
|
|
|
|
|
Geometry * RETVAL; |
|
6022
|
0
|
0
|
|
|
|
|
BasicPreparedGeometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6023
|
|
|
|
|
|
|
; |
|
6024
|
|
|
|
|
|
|
#line 4 "./xsi/PrepGeometry.xsi" |
|
6025
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
6026
|
|
|
|
|
|
|
RETVAL = THIS->getGeometry().clone(); |
|
6027
|
|
|
|
|
|
|
#line 6028 "Geos.xs.cc" |
|
6028
|
|
|
|
|
|
|
{ |
|
6029
|
|
|
|
|
|
|
SV * RETVALSV; |
|
6030
|
0
|
0
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
6031
|
0
|
0
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
6032
|
0
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
6033
|
|
|
|
|
|
|
} |
|
6034
|
|
|
|
|
|
|
} |
|
6035
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
6036
|
0
|
0
|
|
|
|
|
}); } |
|
6037
|
|
|
|
|
|
|
|
|
6038
|
|
|
|
|
|
|
|
|
6039
|
|
|
|
|
|
|
|
|
6040
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_contains) { xs::throw_guard(aTHX_ cv, [=]() |
|
6041
|
|
|
|
|
|
|
{ |
|
6042
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6043
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6044
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, geom"); |
|
6045
|
|
|
|
|
|
|
{ |
|
6046
|
|
|
|
|
|
|
bool RETVAL; |
|
6047
|
1
|
50
|
|
|
|
|
BasicPreparedGeometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6048
|
|
|
|
|
|
|
; |
|
6049
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
6050
|
|
|
|
|
|
|
; |
|
6051
|
|
|
|
|
|
|
#line 6 "./xsi/PrepGeometry.xsi" |
|
6052
|
|
|
|
|
|
|
RETVAL = THIS->contains(&geom); |
|
6053
|
|
|
|
|
|
|
#line 6054 "Geos.xs.cc" |
|
6054
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6055
|
|
|
|
|
|
|
} |
|
6056
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6057
|
1
|
50
|
|
|
|
|
}); } |
|
6058
|
|
|
|
|
|
|
|
|
6059
|
|
|
|
|
|
|
|
|
6060
|
|
|
|
|
|
|
|
|
6061
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_containsProperly) { xs::throw_guard(aTHX_ cv, [=]() |
|
6062
|
|
|
|
|
|
|
{ |
|
6063
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6064
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6065
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, geom"); |
|
6066
|
|
|
|
|
|
|
{ |
|
6067
|
|
|
|
|
|
|
bool RETVAL; |
|
6068
|
1
|
50
|
|
|
|
|
BasicPreparedGeometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6069
|
|
|
|
|
|
|
; |
|
6070
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
6071
|
|
|
|
|
|
|
; |
|
6072
|
|
|
|
|
|
|
#line 8 "./xsi/PrepGeometry.xsi" |
|
6073
|
|
|
|
|
|
|
RETVAL = THIS->containsProperly(&geom); |
|
6074
|
|
|
|
|
|
|
#line 6075 "Geos.xs.cc" |
|
6075
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6076
|
|
|
|
|
|
|
} |
|
6077
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6078
|
1
|
50
|
|
|
|
|
}); } |
|
6079
|
|
|
|
|
|
|
|
|
6080
|
|
|
|
|
|
|
|
|
6081
|
|
|
|
|
|
|
|
|
6082
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_coveredBy) { xs::throw_guard(aTHX_ cv, [=]() |
|
6083
|
|
|
|
|
|
|
{ |
|
6084
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6085
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6086
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, geom"); |
|
6087
|
|
|
|
|
|
|
{ |
|
6088
|
|
|
|
|
|
|
bool RETVAL; |
|
6089
|
1
|
50
|
|
|
|
|
BasicPreparedGeometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6090
|
|
|
|
|
|
|
; |
|
6091
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
6092
|
|
|
|
|
|
|
; |
|
6093
|
|
|
|
|
|
|
#line 10 "./xsi/PrepGeometry.xsi" |
|
6094
|
|
|
|
|
|
|
RETVAL = THIS->coveredBy(&geom); |
|
6095
|
|
|
|
|
|
|
#line 6096 "Geos.xs.cc" |
|
6096
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6097
|
|
|
|
|
|
|
} |
|
6098
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6099
|
1
|
50
|
|
|
|
|
}); } |
|
6100
|
|
|
|
|
|
|
|
|
6101
|
|
|
|
|
|
|
|
|
6102
|
|
|
|
|
|
|
|
|
6103
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_covers) { xs::throw_guard(aTHX_ cv, [=]() |
|
6104
|
|
|
|
|
|
|
{ |
|
6105
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6106
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6107
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, geom"); |
|
6108
|
|
|
|
|
|
|
{ |
|
6109
|
|
|
|
|
|
|
bool RETVAL; |
|
6110
|
1
|
50
|
|
|
|
|
BasicPreparedGeometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6111
|
|
|
|
|
|
|
; |
|
6112
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
6113
|
|
|
|
|
|
|
; |
|
6114
|
|
|
|
|
|
|
#line 12 "./xsi/PrepGeometry.xsi" |
|
6115
|
|
|
|
|
|
|
RETVAL = THIS->covers(&geom); |
|
6116
|
|
|
|
|
|
|
#line 6117 "Geos.xs.cc" |
|
6117
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6118
|
|
|
|
|
|
|
} |
|
6119
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6120
|
1
|
50
|
|
|
|
|
}); } |
|
6121
|
|
|
|
|
|
|
|
|
6122
|
|
|
|
|
|
|
|
|
6123
|
|
|
|
|
|
|
|
|
6124
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_crosses) { xs::throw_guard(aTHX_ cv, [=]() |
|
6125
|
|
|
|
|
|
|
{ |
|
6126
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6127
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6128
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, geom"); |
|
6129
|
|
|
|
|
|
|
{ |
|
6130
|
|
|
|
|
|
|
bool RETVAL; |
|
6131
|
1
|
50
|
|
|
|
|
BasicPreparedGeometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6132
|
|
|
|
|
|
|
; |
|
6133
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
6134
|
|
|
|
|
|
|
; |
|
6135
|
|
|
|
|
|
|
#line 14 "./xsi/PrepGeometry.xsi" |
|
6136
|
|
|
|
|
|
|
RETVAL = THIS->crosses(&geom); |
|
6137
|
|
|
|
|
|
|
#line 6138 "Geos.xs.cc" |
|
6138
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6139
|
|
|
|
|
|
|
} |
|
6140
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6141
|
1
|
50
|
|
|
|
|
}); } |
|
6142
|
|
|
|
|
|
|
|
|
6143
|
|
|
|
|
|
|
|
|
6144
|
|
|
|
|
|
|
|
|
6145
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_disjoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
6146
|
|
|
|
|
|
|
{ |
|
6147
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6148
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6149
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, geom"); |
|
6150
|
|
|
|
|
|
|
{ |
|
6151
|
|
|
|
|
|
|
bool RETVAL; |
|
6152
|
1
|
50
|
|
|
|
|
BasicPreparedGeometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6153
|
|
|
|
|
|
|
; |
|
6154
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
6155
|
|
|
|
|
|
|
; |
|
6156
|
|
|
|
|
|
|
#line 16 "./xsi/PrepGeometry.xsi" |
|
6157
|
|
|
|
|
|
|
RETVAL = THIS->disjoint(&geom); |
|
6158
|
|
|
|
|
|
|
#line 6159 "Geos.xs.cc" |
|
6159
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6160
|
|
|
|
|
|
|
} |
|
6161
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6162
|
1
|
50
|
|
|
|
|
}); } |
|
6163
|
|
|
|
|
|
|
|
|
6164
|
|
|
|
|
|
|
|
|
6165
|
|
|
|
|
|
|
|
|
6166
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_intersects) { xs::throw_guard(aTHX_ cv, [=]() |
|
6167
|
|
|
|
|
|
|
{ |
|
6168
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6169
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6170
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, geom"); |
|
6171
|
|
|
|
|
|
|
{ |
|
6172
|
|
|
|
|
|
|
bool RETVAL; |
|
6173
|
1
|
50
|
|
|
|
|
BasicPreparedGeometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6174
|
|
|
|
|
|
|
; |
|
6175
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
6176
|
|
|
|
|
|
|
; |
|
6177
|
|
|
|
|
|
|
#line 18 "./xsi/PrepGeometry.xsi" |
|
6178
|
|
|
|
|
|
|
RETVAL = THIS->intersects(&geom); |
|
6179
|
|
|
|
|
|
|
#line 6180 "Geos.xs.cc" |
|
6180
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6181
|
|
|
|
|
|
|
} |
|
6182
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6183
|
1
|
50
|
|
|
|
|
}); } |
|
6184
|
|
|
|
|
|
|
|
|
6185
|
|
|
|
|
|
|
|
|
6186
|
|
|
|
|
|
|
|
|
6187
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_overlaps) { xs::throw_guard(aTHX_ cv, [=]() |
|
6188
|
|
|
|
|
|
|
{ |
|
6189
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6190
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6191
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, geom"); |
|
6192
|
|
|
|
|
|
|
{ |
|
6193
|
|
|
|
|
|
|
bool RETVAL; |
|
6194
|
1
|
50
|
|
|
|
|
BasicPreparedGeometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6195
|
|
|
|
|
|
|
; |
|
6196
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
6197
|
|
|
|
|
|
|
; |
|
6198
|
|
|
|
|
|
|
#line 20 "./xsi/PrepGeometry.xsi" |
|
6199
|
|
|
|
|
|
|
RETVAL = THIS->overlaps(&geom); |
|
6200
|
|
|
|
|
|
|
#line 6201 "Geos.xs.cc" |
|
6201
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6202
|
|
|
|
|
|
|
} |
|
6203
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6204
|
1
|
50
|
|
|
|
|
}); } |
|
6205
|
|
|
|
|
|
|
|
|
6206
|
|
|
|
|
|
|
|
|
6207
|
|
|
|
|
|
|
|
|
6208
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_touches) { xs::throw_guard(aTHX_ cv, [=]() |
|
6209
|
|
|
|
|
|
|
{ |
|
6210
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6211
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6212
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, geom"); |
|
6213
|
|
|
|
|
|
|
{ |
|
6214
|
|
|
|
|
|
|
bool RETVAL; |
|
6215
|
1
|
50
|
|
|
|
|
BasicPreparedGeometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6216
|
|
|
|
|
|
|
; |
|
6217
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
6218
|
|
|
|
|
|
|
; |
|
6219
|
|
|
|
|
|
|
#line 22 "./xsi/PrepGeometry.xsi" |
|
6220
|
|
|
|
|
|
|
RETVAL = THIS->touches(&geom); |
|
6221
|
|
|
|
|
|
|
#line 6222 "Geos.xs.cc" |
|
6222
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6223
|
|
|
|
|
|
|
} |
|
6224
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6225
|
1
|
50
|
|
|
|
|
}); } |
|
6226
|
|
|
|
|
|
|
|
|
6227
|
|
|
|
|
|
|
|
|
6228
|
|
|
|
|
|
|
|
|
6229
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_within) { xs::throw_guard(aTHX_ cv, [=]() |
|
6230
|
|
|
|
|
|
|
{ |
|
6231
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6232
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6233
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, geom"); |
|
6234
|
|
|
|
|
|
|
{ |
|
6235
|
|
|
|
|
|
|
bool RETVAL; |
|
6236
|
1
|
50
|
|
|
|
|
BasicPreparedGeometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6237
|
|
|
|
|
|
|
; |
|
6238
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
6239
|
|
|
|
|
|
|
; |
|
6240
|
|
|
|
|
|
|
#line 24 "./xsi/PrepGeometry.xsi" |
|
6241
|
|
|
|
|
|
|
RETVAL = THIS->within(&geom); |
|
6242
|
|
|
|
|
|
|
#line 6243 "Geos.xs.cc" |
|
6243
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6244
|
|
|
|
|
|
|
} |
|
6245
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6246
|
1
|
50
|
|
|
|
|
}); } |
|
6247
|
|
|
|
|
|
|
|
|
6248
|
|
|
|
|
|
|
|
|
6249
|
|
|
|
|
|
|
|
|
6250
|
8
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_toString) { xs::throw_guard(aTHX_ cv, [=]() |
|
6251
|
|
|
|
|
|
|
{ |
|
6252
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6253
|
4
|
50
|
|
|
|
|
if (items < 1) |
|
6254
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
6255
|
|
|
|
|
|
|
{ |
|
6256
|
8
|
|
|
|
|
|
std::string RETVAL; |
|
6257
|
4
|
100
|
|
|
|
|
dXSTARG; |
|
|
|
50
|
|
|
|
|
|
|
6258
|
4
|
50
|
|
|
|
|
BasicPreparedGeometry* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6259
|
|
|
|
|
|
|
; |
|
6260
|
|
|
|
|
|
|
#line 26 "./xsi/PrepGeometry.xsi" |
|
6261
|
|
|
|
|
|
|
RETVAL = THIS->toString(); |
|
6262
|
|
|
|
|
|
|
#line 6263 "Geos.xs.cc" |
|
6263
|
4
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6264
|
|
|
|
|
|
|
} |
|
6265
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
6266
|
4
|
50
|
|
|
|
|
}); } |
|
6267
|
|
|
|
|
|
|
|
|
6268
|
|
|
|
|
|
|
|
|
6269
|
|
|
|
|
|
|
|
|
6270
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__Geometry_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
6271
|
|
|
|
|
|
|
{ |
|
6272
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6273
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
6274
|
|
|
|
|
|
|
{ |
|
6275
|
|
|
|
|
|
|
int RETVAL; |
|
6276
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6277
|
|
|
|
|
|
|
#line 28 "./xsi/PrepGeometry.xsi" |
|
6278
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
6279
|
|
|
|
|
|
|
#line 6280 "Geos.xs.cc" |
|
6280
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
6281
|
|
|
|
|
|
|
} |
|
6282
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
6283
|
0
|
0
|
|
|
|
|
}); } |
|
6284
|
|
|
|
|
|
|
|
|
6285
|
|
|
|
|
|
|
|
|
6286
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/PrepGeometry.xsi' */ |
|
6287
|
|
|
|
|
|
|
|
|
6288
|
|
|
|
|
|
|
|
|
6289
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/PrepGeometryFactory.xsi' from 'Geos.xs' */ |
|
6290
|
|
|
|
|
|
|
|
|
6291
|
|
|
|
|
|
|
|
|
6292
|
|
|
|
|
|
|
|
|
6293
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Prep__GeometryFactory_prepare) { xs::throw_guard(aTHX_ cv, [=]() |
|
6294
|
|
|
|
|
|
|
{ |
|
6295
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6296
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
6297
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g"); |
|
6298
|
|
|
|
|
|
|
{ |
|
6299
|
|
|
|
|
|
|
BasicPreparedGeometry * RETVAL; |
|
6300
|
2
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(0)); |
|
6301
|
|
|
|
|
|
|
; |
|
6302
|
|
|
|
|
|
|
#line 5 "./xsi/PrepGeometryFactory.xsi" |
|
6303
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
6304
|
|
|
|
|
|
|
auto pg = const_cast(PreparedGeometryFactory::prepare(&g)); |
|
6305
|
|
|
|
|
|
|
RETVAL = static_cast(pg); |
|
6306
|
|
|
|
|
|
|
#line 6307 "Geos.xs.cc" |
|
6307
|
|
|
|
|
|
|
{ |
|
6308
|
|
|
|
|
|
|
SV * RETVALSV; |
|
6309
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
6310
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
6311
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
6312
|
|
|
|
|
|
|
} |
|
6313
|
|
|
|
|
|
|
} |
|
6314
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
6315
|
2
|
50
|
|
|
|
|
}); } |
|
6316
|
|
|
|
|
|
|
|
|
6317
|
|
|
|
|
|
|
|
|
6318
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/PrepGeometryFactory.xsi' */ |
|
6319
|
|
|
|
|
|
|
|
|
6320
|
|
|
|
|
|
|
|
|
6321
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/algorithm.xsi' from 'Geos.xs' */ |
|
6322
|
|
|
|
|
|
|
|
|
6323
|
|
|
|
|
|
|
|
|
6324
|
|
|
|
|
|
|
|
|
6325
|
16
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_toDegrees) { xs::throw_guard(aTHX_ cv, [=]() |
|
6326
|
|
|
|
|
|
|
{ |
|
6327
|
8
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6328
|
8
|
50
|
|
|
|
|
if (items != 1) |
|
6329
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "radians"); |
|
6330
|
|
|
|
|
|
|
{ |
|
6331
|
|
|
|
|
|
|
double RETVAL; |
|
6332
|
8
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6333
|
8
|
50
|
|
|
|
|
double radians = (double)SvNV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
6334
|
|
|
|
|
|
|
; |
|
6335
|
|
|
|
|
|
|
#line 4 "./xsi/algorithm.xsi" |
|
6336
|
|
|
|
|
|
|
RETVAL = Angle::toDegrees(radians); |
|
6337
|
|
|
|
|
|
|
#line 6338 "Geos.xs.cc" |
|
6338
|
8
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6339
|
|
|
|
|
|
|
} |
|
6340
|
8
|
|
|
|
|
|
XSRETURN(1); |
|
6341
|
8
|
50
|
|
|
|
|
}); } |
|
6342
|
|
|
|
|
|
|
|
|
6343
|
|
|
|
|
|
|
|
|
6344
|
|
|
|
|
|
|
|
|
6345
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_toRadians) { xs::throw_guard(aTHX_ cv, [=]() |
|
6346
|
|
|
|
|
|
|
{ |
|
6347
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6348
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
6349
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "angleDegrees"); |
|
6350
|
|
|
|
|
|
|
{ |
|
6351
|
|
|
|
|
|
|
double RETVAL; |
|
6352
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6353
|
1
|
50
|
|
|
|
|
double angleDegrees = (double)SvNV(ST(0)) |
|
|
|
50
|
|
|
|
|
|
|
6354
|
|
|
|
|
|
|
; |
|
6355
|
|
|
|
|
|
|
#line 6 "./xsi/algorithm.xsi" |
|
6356
|
|
|
|
|
|
|
RETVAL = Angle::toRadians(angleDegrees); |
|
6357
|
|
|
|
|
|
|
#line 6358 "Geos.xs.cc" |
|
6358
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6359
|
|
|
|
|
|
|
} |
|
6360
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6361
|
1
|
50
|
|
|
|
|
}); } |
|
6362
|
|
|
|
|
|
|
|
|
6363
|
|
|
|
|
|
|
|
|
6364
|
|
|
|
|
|
|
|
|
6365
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_angle) { xs::throw_guard(aTHX_ cv, [=]() |
|
6366
|
|
|
|
|
|
|
{ |
|
6367
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6368
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
6369
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p0"); |
|
6370
|
|
|
|
|
|
|
{ |
|
6371
|
|
|
|
|
|
|
double RETVAL; |
|
6372
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6373
|
2
|
100
|
|
|
|
|
Coordinate& p0 = xs::in(aTHX_ ST(0)); |
|
6374
|
|
|
|
|
|
|
; |
|
6375
|
|
|
|
|
|
|
#line 8 "./xsi/algorithm.xsi" |
|
6376
|
|
|
|
|
|
|
RETVAL = Angle::angle(p0); |
|
6377
|
|
|
|
|
|
|
#line 6378 "Geos.xs.cc" |
|
6378
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6379
|
|
|
|
|
|
|
} |
|
6380
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6381
|
2
|
50
|
|
|
|
|
}); } |
|
6382
|
|
|
|
|
|
|
|
|
6383
|
|
|
|
|
|
|
|
|
6384
|
|
|
|
|
|
|
|
|
6385
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_isAcute) { xs::throw_guard(aTHX_ cv, [=]() |
|
6386
|
|
|
|
|
|
|
{ |
|
6387
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6388
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
6389
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p0, p1, p2"); |
|
6390
|
|
|
|
|
|
|
{ |
|
6391
|
|
|
|
|
|
|
bool RETVAL; |
|
6392
|
1
|
50
|
|
|
|
|
Coordinate* p0 = xs::in(aTHX_ ST(0)); |
|
6393
|
|
|
|
|
|
|
; |
|
6394
|
1
|
50
|
|
|
|
|
Coordinate* p1 = xs::in(aTHX_ ST(1)); |
|
6395
|
|
|
|
|
|
|
; |
|
6396
|
1
|
50
|
|
|
|
|
Coordinate * p2 = xs::in(aTHX_ ST(2)); |
|
6397
|
|
|
|
|
|
|
; |
|
6398
|
|
|
|
|
|
|
#line 11 "./xsi/algorithm.xsi" |
|
6399
|
|
|
|
|
|
|
RETVAL = Angle::isAcute(*p0, *p1, *p2); |
|
6400
|
|
|
|
|
|
|
#line 6401 "Geos.xs.cc" |
|
6401
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6402
|
|
|
|
|
|
|
} |
|
6403
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6404
|
1
|
50
|
|
|
|
|
}); } |
|
6405
|
|
|
|
|
|
|
|
|
6406
|
|
|
|
|
|
|
|
|
6407
|
|
|
|
|
|
|
|
|
6408
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_isObtuse) { xs::throw_guard(aTHX_ cv, [=]() |
|
6409
|
|
|
|
|
|
|
{ |
|
6410
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6411
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
6412
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p0, p1, p2"); |
|
6413
|
|
|
|
|
|
|
{ |
|
6414
|
|
|
|
|
|
|
bool RETVAL; |
|
6415
|
1
|
50
|
|
|
|
|
Coordinate& p0 = xs::in(aTHX_ ST(0)); |
|
6416
|
|
|
|
|
|
|
; |
|
6417
|
1
|
50
|
|
|
|
|
Coordinate& p1 = xs::in(aTHX_ ST(1)); |
|
6418
|
|
|
|
|
|
|
; |
|
6419
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(aTHX_ ST(2)); |
|
6420
|
|
|
|
|
|
|
; |
|
6421
|
|
|
|
|
|
|
#line 15 "./xsi/algorithm.xsi" |
|
6422
|
|
|
|
|
|
|
RETVAL = Angle::isObtuse(p0, p1, p2); |
|
6423
|
|
|
|
|
|
|
#line 6424 "Geos.xs.cc" |
|
6424
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6425
|
|
|
|
|
|
|
} |
|
6426
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6427
|
1
|
50
|
|
|
|
|
}); } |
|
6428
|
|
|
|
|
|
|
|
|
6429
|
|
|
|
|
|
|
|
|
6430
|
|
|
|
|
|
|
|
|
6431
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_angleBetween) { xs::throw_guard(aTHX_ cv, [=]() |
|
6432
|
|
|
|
|
|
|
{ |
|
6433
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6434
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
6435
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "tip1, tail, tip2"); |
|
6436
|
|
|
|
|
|
|
{ |
|
6437
|
|
|
|
|
|
|
double RETVAL; |
|
6438
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6439
|
1
|
50
|
|
|
|
|
Coordinate& tip1 = xs::in(aTHX_ ST(0)); |
|
6440
|
|
|
|
|
|
|
; |
|
6441
|
1
|
50
|
|
|
|
|
Coordinate& tail = xs::in(aTHX_ ST(1)); |
|
6442
|
|
|
|
|
|
|
; |
|
6443
|
1
|
50
|
|
|
|
|
Coordinate& tip2 = xs::in(aTHX_ ST(2)); |
|
6444
|
|
|
|
|
|
|
; |
|
6445
|
|
|
|
|
|
|
#line 19 "./xsi/algorithm.xsi" |
|
6446
|
|
|
|
|
|
|
RETVAL = Angle::angleBetween(tip1, tail, tip2); |
|
6447
|
|
|
|
|
|
|
#line 6448 "Geos.xs.cc" |
|
6448
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6449
|
|
|
|
|
|
|
} |
|
6450
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6451
|
1
|
50
|
|
|
|
|
}); } |
|
6452
|
|
|
|
|
|
|
|
|
6453
|
|
|
|
|
|
|
|
|
6454
|
|
|
|
|
|
|
|
|
6455
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_angleBetweenOriented) { xs::throw_guard(aTHX_ cv, [=]() |
|
6456
|
|
|
|
|
|
|
{ |
|
6457
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6458
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
6459
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "tip1, tail, tip2"); |
|
6460
|
|
|
|
|
|
|
{ |
|
6461
|
|
|
|
|
|
|
double RETVAL; |
|
6462
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6463
|
1
|
50
|
|
|
|
|
Coordinate& tip1 = xs::in(aTHX_ ST(0)); |
|
6464
|
|
|
|
|
|
|
; |
|
6465
|
1
|
50
|
|
|
|
|
Coordinate& tail = xs::in(aTHX_ ST(1)); |
|
6466
|
|
|
|
|
|
|
; |
|
6467
|
1
|
50
|
|
|
|
|
Coordinate& tip2 = xs::in(aTHX_ ST(2)); |
|
6468
|
|
|
|
|
|
|
; |
|
6469
|
|
|
|
|
|
|
#line 23 "./xsi/algorithm.xsi" |
|
6470
|
|
|
|
|
|
|
RETVAL = Angle::angleBetweenOriented (tip1, tail, tip2); |
|
6471
|
|
|
|
|
|
|
#line 6472 "Geos.xs.cc" |
|
6472
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6473
|
|
|
|
|
|
|
} |
|
6474
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6475
|
1
|
50
|
|
|
|
|
}); } |
|
6476
|
|
|
|
|
|
|
|
|
6477
|
|
|
|
|
|
|
|
|
6478
|
|
|
|
|
|
|
|
|
6479
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_interiorAngle) { xs::throw_guard(aTHX_ cv, [=]() |
|
6480
|
|
|
|
|
|
|
{ |
|
6481
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6482
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
6483
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p0, p1, p2"); |
|
6484
|
|
|
|
|
|
|
{ |
|
6485
|
|
|
|
|
|
|
double RETVAL; |
|
6486
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6487
|
1
|
50
|
|
|
|
|
Coordinate& p0 = xs::in(aTHX_ ST(0)); |
|
6488
|
|
|
|
|
|
|
; |
|
6489
|
1
|
50
|
|
|
|
|
Coordinate& p1 = xs::in(aTHX_ ST(1)); |
|
6490
|
|
|
|
|
|
|
; |
|
6491
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(aTHX_ ST(2)); |
|
6492
|
|
|
|
|
|
|
; |
|
6493
|
|
|
|
|
|
|
#line 27 "./xsi/algorithm.xsi" |
|
6494
|
|
|
|
|
|
|
RETVAL = Angle::interiorAngle(p0, p1, p2); |
|
6495
|
|
|
|
|
|
|
#line 6496 "Geos.xs.cc" |
|
6496
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6497
|
|
|
|
|
|
|
} |
|
6498
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6499
|
1
|
50
|
|
|
|
|
}); } |
|
6500
|
|
|
|
|
|
|
|
|
6501
|
|
|
|
|
|
|
|
|
6502
|
|
|
|
|
|
|
|
|
6503
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_getTurn) { xs::throw_guard(aTHX_ cv, [=]() |
|
6504
|
|
|
|
|
|
|
{ |
|
6505
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6506
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6507
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ang1, ang2"); |
|
6508
|
|
|
|
|
|
|
{ |
|
6509
|
|
|
|
|
|
|
int RETVAL; |
|
6510
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6511
|
1
|
50
|
|
|
|
|
double ang1 = (double)SvNV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
6512
|
|
|
|
|
|
|
; |
|
6513
|
1
|
50
|
|
|
|
|
double ang2 = (double)SvNV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
6514
|
|
|
|
|
|
|
; |
|
6515
|
|
|
|
|
|
|
#line 30 "./xsi/algorithm.xsi" |
|
6516
|
|
|
|
|
|
|
RETVAL = Angle::getTurn(ang1, ang2); |
|
6517
|
|
|
|
|
|
|
#line 6518 "Geos.xs.cc" |
|
6518
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6519
|
|
|
|
|
|
|
} |
|
6520
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6521
|
1
|
50
|
|
|
|
|
}); } |
|
6522
|
|
|
|
|
|
|
|
|
6523
|
|
|
|
|
|
|
|
|
6524
|
|
|
|
|
|
|
|
|
6525
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_normalize) { xs::throw_guard(aTHX_ cv, [=]() |
|
6526
|
|
|
|
|
|
|
{ |
|
6527
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6528
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
6529
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "angle"); |
|
6530
|
|
|
|
|
|
|
{ |
|
6531
|
|
|
|
|
|
|
double RETVAL; |
|
6532
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6533
|
1
|
50
|
|
|
|
|
double angle = (double)SvNV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
6534
|
|
|
|
|
|
|
; |
|
6535
|
|
|
|
|
|
|
#line 32 "./xsi/algorithm.xsi" |
|
6536
|
|
|
|
|
|
|
RETVAL = Angle::normalize(angle); |
|
6537
|
|
|
|
|
|
|
#line 6538 "Geos.xs.cc" |
|
6538
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6539
|
|
|
|
|
|
|
} |
|
6540
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6541
|
1
|
50
|
|
|
|
|
}); } |
|
6542
|
|
|
|
|
|
|
|
|
6543
|
|
|
|
|
|
|
|
|
6544
|
|
|
|
|
|
|
|
|
6545
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_normalizePositive) { xs::throw_guard(aTHX_ cv, [=]() |
|
6546
|
|
|
|
|
|
|
{ |
|
6547
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6548
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
6549
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "angle"); |
|
6550
|
|
|
|
|
|
|
{ |
|
6551
|
|
|
|
|
|
|
double RETVAL; |
|
6552
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6553
|
1
|
50
|
|
|
|
|
double angle = (double)SvNV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
6554
|
|
|
|
|
|
|
; |
|
6555
|
|
|
|
|
|
|
#line 34 "./xsi/algorithm.xsi" |
|
6556
|
|
|
|
|
|
|
RETVAL = Angle::normalizePositive(angle); |
|
6557
|
|
|
|
|
|
|
#line 6558 "Geos.xs.cc" |
|
6558
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6559
|
|
|
|
|
|
|
} |
|
6560
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6561
|
1
|
50
|
|
|
|
|
}); } |
|
6562
|
|
|
|
|
|
|
|
|
6563
|
|
|
|
|
|
|
|
|
6564
|
|
|
|
|
|
|
|
|
6565
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_diff) { xs::throw_guard(aTHX_ cv, [=]() |
|
6566
|
|
|
|
|
|
|
{ |
|
6567
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6568
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6569
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ang1, ang2"); |
|
6570
|
|
|
|
|
|
|
{ |
|
6571
|
|
|
|
|
|
|
double RETVAL; |
|
6572
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6573
|
1
|
50
|
|
|
|
|
double ang1 = (double)SvNV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
6574
|
|
|
|
|
|
|
; |
|
6575
|
1
|
50
|
|
|
|
|
double ang2 = (double)SvNV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
6576
|
|
|
|
|
|
|
; |
|
6577
|
|
|
|
|
|
|
#line 36 "./xsi/algorithm.xsi" |
|
6578
|
|
|
|
|
|
|
RETVAL = Angle::diff(ang1, ang2); |
|
6579
|
|
|
|
|
|
|
#line 6580 "Geos.xs.cc" |
|
6580
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6581
|
|
|
|
|
|
|
} |
|
6582
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6583
|
1
|
50
|
|
|
|
|
}); } |
|
6584
|
|
|
|
|
|
|
|
|
6585
|
|
|
|
|
|
|
|
|
6586
|
|
|
|
|
|
|
|
|
6587
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_centroid) { xs::throw_guard(aTHX_ cv, [=]() |
|
6588
|
|
|
|
|
|
|
{ |
|
6589
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6590
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
6591
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g"); |
|
6592
|
|
|
|
|
|
|
{ |
|
6593
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
6594
|
2
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(0)); |
|
6595
|
|
|
|
|
|
|
; |
|
6596
|
|
|
|
|
|
|
#line 39 "./xsi/algorithm.xsi" |
|
6597
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
6598
|
|
|
|
|
|
|
Coordinate c; |
|
6599
|
|
|
|
|
|
|
if (Centroid::getCentroid(g, c)) RETVAL = new Coordinate(c); |
|
6600
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
6601
|
|
|
|
|
|
|
#line 6602 "Geos.xs.cc" |
|
6602
|
|
|
|
|
|
|
{ |
|
6603
|
|
|
|
|
|
|
SV * RETVALSV; |
|
6604
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
6605
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
6606
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
6607
|
|
|
|
|
|
|
} |
|
6608
|
|
|
|
|
|
|
} |
|
6609
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
6610
|
2
|
50
|
|
|
|
|
}); } |
|
6611
|
|
|
|
|
|
|
|
|
6612
|
|
|
|
|
|
|
|
|
6613
|
|
|
|
|
|
|
|
|
6614
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_centroidArea) { xs::throw_guard(aTHX_ cv, [=]() |
|
6615
|
|
|
|
|
|
|
{ |
|
6616
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6617
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
6618
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "geoms"); |
|
6619
|
|
|
|
|
|
|
{ |
|
6620
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
6621
|
5
|
50
|
|
|
|
|
Array geoms = ST(0); |
|
6622
|
3
|
50
|
|
|
|
|
if (!geoms && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
6623
|
0
|
|
|
|
|
|
; |
|
6624
|
|
|
|
|
|
|
#line 45 "./xsi/algorithm.xsi" |
|
6625
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
6626
|
|
|
|
|
|
|
Coordinate result; |
|
6627
|
|
|
|
|
|
|
CentroidArea acc; |
|
6628
|
|
|
|
|
|
|
for(size_t i = 0; i < geoms.size(); ++i) { |
|
6629
|
|
|
|
|
|
|
auto item = geoms.at(i); |
|
6630
|
|
|
|
|
|
|
if (item.is_array_ref()) { |
|
6631
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(Array(item)); |
|
6632
|
|
|
|
|
|
|
acc.add(&seq); |
|
6633
|
|
|
|
|
|
|
} |
|
6634
|
|
|
|
|
|
|
else { |
|
6635
|
|
|
|
|
|
|
acc.add(&xs::in(item)); |
|
6636
|
|
|
|
|
|
|
} |
|
6637
|
|
|
|
|
|
|
} |
|
6638
|
|
|
|
|
|
|
if (acc.getCentroid(result)) RETVAL = new Coordinate(result); |
|
6639
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
6640
|
|
|
|
|
|
|
#line 6641 "Geos.xs.cc" |
|
6641
|
|
|
|
|
|
|
{ |
|
6642
|
|
|
|
|
|
|
SV * RETVALSV; |
|
6643
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
6644
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
6645
|
3
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
6646
|
|
|
|
|
|
|
} |
|
6647
|
|
|
|
|
|
|
} |
|
6648
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
6649
|
3
|
50
|
|
|
|
|
}); } |
|
6650
|
|
|
|
|
|
|
|
|
6651
|
|
|
|
|
|
|
|
|
6652
|
|
|
|
|
|
|
|
|
6653
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_centroidLine) { xs::throw_guard(aTHX_ cv, [=]() |
|
6654
|
|
|
|
|
|
|
{ |
|
6655
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6656
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
6657
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "geoms"); |
|
6658
|
|
|
|
|
|
|
{ |
|
6659
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
6660
|
3
|
50
|
|
|
|
|
Array geoms = ST(0); |
|
6661
|
2
|
50
|
|
|
|
|
if (!geoms && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
6662
|
0
|
|
|
|
|
|
; |
|
6663
|
|
|
|
|
|
|
#line 63 "./xsi/algorithm.xsi" |
|
6664
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
6665
|
|
|
|
|
|
|
Coordinate result; |
|
6666
|
|
|
|
|
|
|
CentroidLine acc; |
|
6667
|
|
|
|
|
|
|
for(size_t i = 0; i < geoms.size(); ++i) { |
|
6668
|
|
|
|
|
|
|
auto item = geoms.at(i); |
|
6669
|
|
|
|
|
|
|
if (item.is_array_ref()) { |
|
6670
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(Array(item)); |
|
6671
|
|
|
|
|
|
|
acc.add(&seq); |
|
6672
|
|
|
|
|
|
|
} |
|
6673
|
|
|
|
|
|
|
else { |
|
6674
|
|
|
|
|
|
|
acc.add(&xs::in(item)); |
|
6675
|
|
|
|
|
|
|
} |
|
6676
|
|
|
|
|
|
|
} |
|
6677
|
|
|
|
|
|
|
if (acc.getCentroid(result)) RETVAL = new Coordinate(result); |
|
6678
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
6679
|
|
|
|
|
|
|
#line 6680 "Geos.xs.cc" |
|
6680
|
|
|
|
|
|
|
{ |
|
6681
|
|
|
|
|
|
|
SV * RETVALSV; |
|
6682
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
6683
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
6684
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
6685
|
|
|
|
|
|
|
} |
|
6686
|
|
|
|
|
|
|
} |
|
6687
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
6688
|
2
|
50
|
|
|
|
|
}); } |
|
6689
|
|
|
|
|
|
|
|
|
6690
|
|
|
|
|
|
|
|
|
6691
|
|
|
|
|
|
|
|
|
6692
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_centroidPoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
6693
|
|
|
|
|
|
|
{ |
|
6694
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6695
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
6696
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "geoms"); |
|
6697
|
|
|
|
|
|
|
{ |
|
6698
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
6699
|
5
|
50
|
|
|
|
|
Array geoms = ST(0); |
|
6700
|
3
|
50
|
|
|
|
|
if (!geoms && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
6701
|
0
|
|
|
|
|
|
; |
|
6702
|
|
|
|
|
|
|
#line 80 "./xsi/algorithm.xsi" |
|
6703
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
6704
|
|
|
|
|
|
|
Coordinate result; |
|
6705
|
|
|
|
|
|
|
CentroidPoint acc; |
|
6706
|
|
|
|
|
|
|
for(size_t i = 0; i < geoms.size(); ++i) { |
|
6707
|
|
|
|
|
|
|
Object item = Object(geoms.at(i)); |
|
6708
|
|
|
|
|
|
|
if (!item) throw ("invalid argument"); |
|
6709
|
|
|
|
|
|
|
if (item.stash().name() == "Geo::Geos::Coordinate") { |
|
6710
|
|
|
|
|
|
|
acc.add(&xs::in(item)); |
|
6711
|
|
|
|
|
|
|
} |
|
6712
|
|
|
|
|
|
|
else acc.add(&xs::in(item)); |
|
6713
|
|
|
|
|
|
|
} |
|
6714
|
|
|
|
|
|
|
if (acc.getCentroid(result)) RETVAL = new Coordinate(result); |
|
6715
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
6716
|
|
|
|
|
|
|
#line 6717 "Geos.xs.cc" |
|
6717
|
|
|
|
|
|
|
{ |
|
6718
|
|
|
|
|
|
|
SV * RETVALSV; |
|
6719
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
6720
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
6721
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
6722
|
|
|
|
|
|
|
} |
|
6723
|
|
|
|
|
|
|
} |
|
6724
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
6725
|
3
|
50
|
|
|
|
|
}); } |
|
6726
|
|
|
|
|
|
|
|
|
6727
|
|
|
|
|
|
|
|
|
6728
|
|
|
|
|
|
|
|
|
6729
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_isPointInRing) { xs::throw_guard(aTHX_ cv, [=]() |
|
6730
|
|
|
|
|
|
|
{ |
|
6731
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6732
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6733
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p, ring"); |
|
6734
|
|
|
|
|
|
|
{ |
|
6735
|
|
|
|
|
|
|
bool RETVAL; |
|
6736
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(0)); |
|
6737
|
|
|
|
|
|
|
; |
|
6738
|
2
|
50
|
|
|
|
|
Array ring = ST(1); |
|
6739
|
1
|
50
|
|
|
|
|
if (!ring && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
6740
|
0
|
|
|
|
|
|
; |
|
6741
|
|
|
|
|
|
|
#line 95 "./xsi/algorithm.xsi" |
|
6742
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(ring); |
|
6743
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::isPointInRing(p, &seq); |
|
6744
|
|
|
|
|
|
|
#line 6745 "Geos.xs.cc" |
|
6745
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6746
|
|
|
|
|
|
|
} |
|
6747
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6748
|
1
|
50
|
|
|
|
|
}); } |
|
6749
|
|
|
|
|
|
|
|
|
6750
|
|
|
|
|
|
|
|
|
6751
|
|
|
|
|
|
|
|
|
6752
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_locatePointInRing) { xs::throw_guard(aTHX_ cv, [=]() |
|
6753
|
|
|
|
|
|
|
{ |
|
6754
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6755
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6756
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p, ring"); |
|
6757
|
|
|
|
|
|
|
{ |
|
6758
|
|
|
|
|
|
|
int RETVAL; |
|
6759
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6760
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(0)); |
|
6761
|
|
|
|
|
|
|
; |
|
6762
|
2
|
50
|
|
|
|
|
Array ring = ST(1); |
|
6763
|
1
|
50
|
|
|
|
|
if (!ring && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
6764
|
0
|
|
|
|
|
|
; |
|
6765
|
|
|
|
|
|
|
#line 100 "./xsi/algorithm.xsi" |
|
6766
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(ring); |
|
6767
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::locatePointInRing(p, seq); |
|
6768
|
|
|
|
|
|
|
#line 6769 "Geos.xs.cc" |
|
6769
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6770
|
|
|
|
|
|
|
} |
|
6771
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6772
|
1
|
50
|
|
|
|
|
}); } |
|
6773
|
|
|
|
|
|
|
|
|
6774
|
|
|
|
|
|
|
|
|
6775
|
|
|
|
|
|
|
|
|
6776
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_isOnLine) { xs::throw_guard(aTHX_ cv, [=]() |
|
6777
|
|
|
|
|
|
|
{ |
|
6778
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6779
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
6780
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p, line"); |
|
6781
|
|
|
|
|
|
|
{ |
|
6782
|
|
|
|
|
|
|
bool RETVAL; |
|
6783
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(0)); |
|
6784
|
|
|
|
|
|
|
; |
|
6785
|
2
|
50
|
|
|
|
|
Array line = ST(1); |
|
6786
|
1
|
50
|
|
|
|
|
if (!line && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
6787
|
0
|
|
|
|
|
|
; |
|
6788
|
|
|
|
|
|
|
#line 105 "./xsi/algorithm.xsi" |
|
6789
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(line); |
|
6790
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::isPointInRing(p, &seq); |
|
6791
|
|
|
|
|
|
|
#line 6792 "Geos.xs.cc" |
|
6792
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6793
|
|
|
|
|
|
|
} |
|
6794
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6795
|
1
|
50
|
|
|
|
|
}); } |
|
6796
|
|
|
|
|
|
|
|
|
6797
|
|
|
|
|
|
|
|
|
6798
|
|
|
|
|
|
|
|
|
6799
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_isCCW) { xs::throw_guard(aTHX_ cv, [=]() |
|
6800
|
|
|
|
|
|
|
{ |
|
6801
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6802
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
6803
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ring"); |
|
6804
|
|
|
|
|
|
|
{ |
|
6805
|
|
|
|
|
|
|
bool RETVAL; |
|
6806
|
2
|
50
|
|
|
|
|
Array ring = ST(0); |
|
6807
|
1
|
50
|
|
|
|
|
if (!ring && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
6808
|
0
|
|
|
|
|
|
; |
|
6809
|
|
|
|
|
|
|
#line 110 "./xsi/algorithm.xsi" |
|
6810
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(ring); |
|
6811
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::isCCW(&seq); |
|
6812
|
|
|
|
|
|
|
#line 6813 "Geos.xs.cc" |
|
6813
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
6814
|
|
|
|
|
|
|
} |
|
6815
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6816
|
1
|
50
|
|
|
|
|
}); } |
|
6817
|
|
|
|
|
|
|
|
|
6818
|
|
|
|
|
|
|
|
|
6819
|
|
|
|
|
|
|
|
|
6820
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_computeOrientation) { xs::throw_guard(aTHX_ cv, [=]() |
|
6821
|
|
|
|
|
|
|
{ |
|
6822
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6823
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
6824
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p1, p2, q"); |
|
6825
|
|
|
|
|
|
|
{ |
|
6826
|
|
|
|
|
|
|
int RETVAL; |
|
6827
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6828
|
1
|
50
|
|
|
|
|
Coordinate& p1 = xs::in(aTHX_ ST(0)); |
|
6829
|
|
|
|
|
|
|
; |
|
6830
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(aTHX_ ST(1)); |
|
6831
|
|
|
|
|
|
|
; |
|
6832
|
1
|
50
|
|
|
|
|
Coordinate& q = xs::in(aTHX_ ST(2)); |
|
6833
|
|
|
|
|
|
|
; |
|
6834
|
|
|
|
|
|
|
#line 115 "./xsi/algorithm.xsi" |
|
6835
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::computeOrientation(p1, p2, q); |
|
6836
|
|
|
|
|
|
|
#line 6837 "Geos.xs.cc" |
|
6837
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6838
|
|
|
|
|
|
|
} |
|
6839
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6840
|
1
|
50
|
|
|
|
|
}); } |
|
6841
|
|
|
|
|
|
|
|
|
6842
|
|
|
|
|
|
|
|
|
6843
|
|
|
|
|
|
|
|
|
6844
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_distancePointLine) { xs::throw_guard(aTHX_ cv, [=]() |
|
6845
|
|
|
|
|
|
|
{ |
|
6846
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6847
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
6848
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p, A, B"); |
|
6849
|
|
|
|
|
|
|
{ |
|
6850
|
|
|
|
|
|
|
double RETVAL; |
|
6851
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6852
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(0)); |
|
6853
|
|
|
|
|
|
|
; |
|
6854
|
1
|
50
|
|
|
|
|
Coordinate& A = xs::in(aTHX_ ST(1)); |
|
6855
|
|
|
|
|
|
|
; |
|
6856
|
1
|
50
|
|
|
|
|
Coordinate& B = xs::in(aTHX_ ST(2)); |
|
6857
|
|
|
|
|
|
|
; |
|
6858
|
|
|
|
|
|
|
#line 119 "./xsi/algorithm.xsi" |
|
6859
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::distancePointLine(p, A, B); |
|
6860
|
|
|
|
|
|
|
#line 6861 "Geos.xs.cc" |
|
6861
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6862
|
|
|
|
|
|
|
} |
|
6863
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6864
|
1
|
50
|
|
|
|
|
}); } |
|
6865
|
|
|
|
|
|
|
|
|
6866
|
|
|
|
|
|
|
|
|
6867
|
|
|
|
|
|
|
|
|
6868
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_distancePointLinePerpendicular) { xs::throw_guard(aTHX_ cv, [=]() |
|
6869
|
|
|
|
|
|
|
{ |
|
6870
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6871
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
6872
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p, A, B"); |
|
6873
|
|
|
|
|
|
|
{ |
|
6874
|
|
|
|
|
|
|
double RETVAL; |
|
6875
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6876
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(0)); |
|
6877
|
|
|
|
|
|
|
; |
|
6878
|
1
|
50
|
|
|
|
|
Coordinate& A = xs::in(aTHX_ ST(1)); |
|
6879
|
|
|
|
|
|
|
; |
|
6880
|
1
|
50
|
|
|
|
|
Coordinate& B = xs::in(aTHX_ ST(2)); |
|
6881
|
|
|
|
|
|
|
; |
|
6882
|
|
|
|
|
|
|
#line 123 "./xsi/algorithm.xsi" |
|
6883
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::distancePointLinePerpendicular(p, A, B); |
|
6884
|
|
|
|
|
|
|
#line 6885 "Geos.xs.cc" |
|
6885
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6886
|
|
|
|
|
|
|
} |
|
6887
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6888
|
1
|
50
|
|
|
|
|
}); } |
|
6889
|
|
|
|
|
|
|
|
|
6890
|
|
|
|
|
|
|
|
|
6891
|
|
|
|
|
|
|
|
|
6892
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_distanceLineLine) { xs::throw_guard(aTHX_ cv, [=]() |
|
6893
|
|
|
|
|
|
|
{ |
|
6894
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6895
|
1
|
50
|
|
|
|
|
if (items != 4) |
|
6896
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "A, B, C, D"); |
|
6897
|
|
|
|
|
|
|
{ |
|
6898
|
|
|
|
|
|
|
double RETVAL; |
|
6899
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6900
|
1
|
50
|
|
|
|
|
Coordinate& A = xs::in(aTHX_ ST(0)); |
|
6901
|
|
|
|
|
|
|
; |
|
6902
|
1
|
50
|
|
|
|
|
Coordinate& B = xs::in(aTHX_ ST(1)); |
|
6903
|
|
|
|
|
|
|
; |
|
6904
|
1
|
50
|
|
|
|
|
Coordinate& C = xs::in(aTHX_ ST(2)); |
|
6905
|
|
|
|
|
|
|
; |
|
6906
|
1
|
50
|
|
|
|
|
Coordinate& D = xs::in(aTHX_ ST(3)); |
|
6907
|
|
|
|
|
|
|
; |
|
6908
|
|
|
|
|
|
|
#line 127 "./xsi/algorithm.xsi" |
|
6909
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::distanceLineLine(A, B, C, D); |
|
6910
|
|
|
|
|
|
|
#line 6911 "Geos.xs.cc" |
|
6911
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6912
|
|
|
|
|
|
|
} |
|
6913
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6914
|
1
|
50
|
|
|
|
|
}); } |
|
6915
|
|
|
|
|
|
|
|
|
6916
|
|
|
|
|
|
|
|
|
6917
|
|
|
|
|
|
|
|
|
6918
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_signedArea) { xs::throw_guard(aTHX_ cv, [=]() |
|
6919
|
|
|
|
|
|
|
{ |
|
6920
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6921
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
6922
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ring"); |
|
6923
|
|
|
|
|
|
|
{ |
|
6924
|
|
|
|
|
|
|
double RETVAL; |
|
6925
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6926
|
2
|
50
|
|
|
|
|
Array ring = ST(0); |
|
6927
|
1
|
50
|
|
|
|
|
if (!ring && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
6928
|
0
|
|
|
|
|
|
; |
|
6929
|
|
|
|
|
|
|
#line 131 "./xsi/algorithm.xsi" |
|
6930
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(ring); |
|
6931
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::signedArea(&seq); |
|
6932
|
|
|
|
|
|
|
#line 6933 "Geos.xs.cc" |
|
6933
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6934
|
|
|
|
|
|
|
} |
|
6935
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6936
|
1
|
50
|
|
|
|
|
}); } |
|
6937
|
|
|
|
|
|
|
|
|
6938
|
|
|
|
|
|
|
|
|
6939
|
|
|
|
|
|
|
|
|
6940
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_length) { xs::throw_guard(aTHX_ cv, [=]() |
|
6941
|
|
|
|
|
|
|
{ |
|
6942
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6943
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
6944
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "pts"); |
|
6945
|
|
|
|
|
|
|
{ |
|
6946
|
|
|
|
|
|
|
double RETVAL; |
|
6947
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6948
|
2
|
50
|
|
|
|
|
Array pts = ST(0); |
|
6949
|
1
|
50
|
|
|
|
|
if (!pts && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
6950
|
0
|
|
|
|
|
|
; |
|
6951
|
|
|
|
|
|
|
#line 136 "./xsi/algorithm.xsi" |
|
6952
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(pts); |
|
6953
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::signedArea(&seq); |
|
6954
|
|
|
|
|
|
|
#line 6955 "Geos.xs.cc" |
|
6955
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6956
|
|
|
|
|
|
|
} |
|
6957
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6958
|
1
|
50
|
|
|
|
|
}); } |
|
6959
|
|
|
|
|
|
|
|
|
6960
|
|
|
|
|
|
|
|
|
6961
|
|
|
|
|
|
|
|
|
6962
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_orientationIndex) { xs::throw_guard(aTHX_ cv, [=]() |
|
6963
|
|
|
|
|
|
|
{ |
|
6964
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6965
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
6966
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p1, p2, q"); |
|
6967
|
|
|
|
|
|
|
{ |
|
6968
|
|
|
|
|
|
|
int RETVAL; |
|
6969
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
6970
|
1
|
50
|
|
|
|
|
Coordinate& p1 = xs::in(aTHX_ ST(0)); |
|
6971
|
|
|
|
|
|
|
; |
|
6972
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(aTHX_ ST(1)); |
|
6973
|
|
|
|
|
|
|
; |
|
6974
|
1
|
50
|
|
|
|
|
Coordinate& q = xs::in(aTHX_ ST(2)); |
|
6975
|
|
|
|
|
|
|
; |
|
6976
|
|
|
|
|
|
|
#line 141 "./xsi/algorithm.xsi" |
|
6977
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::computeOrientation(p1, p2, q); |
|
6978
|
|
|
|
|
|
|
#line 6979 "Geos.xs.cc" |
|
6979
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
6980
|
|
|
|
|
|
|
} |
|
6981
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
6982
|
1
|
50
|
|
|
|
|
}); } |
|
6983
|
|
|
|
|
|
|
|
|
6984
|
|
|
|
|
|
|
|
|
6985
|
|
|
|
|
|
|
|
|
6986
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_getIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
6987
|
|
|
|
|
|
|
{ |
|
6988
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
6989
|
1
|
50
|
|
|
|
|
if (items != 4) |
|
6990
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p00, p01, p10, p11"); |
|
6991
|
|
|
|
|
|
|
{ |
|
6992
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
6993
|
1
|
50
|
|
|
|
|
Coordinate& p00 = xs::in(aTHX_ ST(0)); |
|
6994
|
|
|
|
|
|
|
; |
|
6995
|
1
|
50
|
|
|
|
|
Coordinate& p01 = xs::in(aTHX_ ST(1)); |
|
6996
|
|
|
|
|
|
|
; |
|
6997
|
1
|
50
|
|
|
|
|
Coordinate& p10 = xs::in(aTHX_ ST(2)); |
|
6998
|
|
|
|
|
|
|
; |
|
6999
|
1
|
50
|
|
|
|
|
Coordinate& p11 = xs::in(aTHX_ ST(3)); |
|
7000
|
|
|
|
|
|
|
; |
|
7001
|
|
|
|
|
|
|
#line 145 "./xsi/algorithm.xsi" |
|
7002
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
7003
|
|
|
|
|
|
|
//auto& c = CentralEndpointIntersector::getIntersection(p00, p01, p10, p11); |
|
7004
|
|
|
|
|
|
|
// ^ buggy implementation in 3.6.3, as it returns dangling reference; |
|
7005
|
|
|
|
|
|
|
CentralEndpointIntersector intor(p00, p01, p10, p11); |
|
7006
|
|
|
|
|
|
|
auto& c = intor.getIntersection(); |
|
7007
|
|
|
|
|
|
|
RETVAL = new Coordinate(c); |
|
7008
|
|
|
|
|
|
|
#line 7009 "Geos.xs.cc" |
|
7009
|
|
|
|
|
|
|
{ |
|
7010
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7011
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
7012
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7013
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
7014
|
|
|
|
|
|
|
} |
|
7015
|
|
|
|
|
|
|
} |
|
7016
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7017
|
1
|
50
|
|
|
|
|
}); } |
|
7018
|
|
|
|
|
|
|
|
|
7019
|
|
|
|
|
|
|
|
|
7020
|
|
|
|
|
|
|
|
|
7021
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_convexHull) { xs::throw_guard(aTHX_ cv, [=]() |
|
7022
|
|
|
|
|
|
|
{ |
|
7023
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7024
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
7025
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "newGeometry"); |
|
7026
|
|
|
|
|
|
|
{ |
|
7027
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
7028
|
2
|
100
|
|
|
|
|
Geometry& newGeometry = xs::in(aTHX_ ST(0)); |
|
7029
|
|
|
|
|
|
|
; |
|
7030
|
|
|
|
|
|
|
#line 153 "./xsi/algorithm.xsi" |
|
7031
|
|
|
|
|
|
|
auto ch = ConvexHull(&newGeometry); |
|
7032
|
|
|
|
|
|
|
RETVAL = Helper::uplift(ch.getConvexHull()); |
|
7033
|
|
|
|
|
|
|
#line 7034 "Geos.xs.cc" |
|
7034
|
|
|
|
|
|
|
{ |
|
7035
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7036
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
7037
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
7038
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
7039
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
7040
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
7041
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
7042
|
|
|
|
|
|
|
case SVt_PVCV: |
|
7043
|
|
|
|
|
|
|
case SVt_PVIO: |
|
7044
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
7045
|
0
|
|
|
|
|
|
break; |
|
7046
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
7047
|
|
|
|
|
|
|
} |
|
7048
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7049
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
7050
|
|
|
|
|
|
|
} |
|
7051
|
|
|
|
|
|
|
} |
|
7052
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7053
|
2
|
50
|
|
|
|
|
}); } |
|
7054
|
|
|
|
|
|
|
|
|
7055
|
|
|
|
|
|
|
|
|
7056
|
|
|
|
|
|
|
|
|
7057
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_interiorPointArea) { xs::throw_guard(aTHX_ cv, [=]() |
|
7058
|
|
|
|
|
|
|
{ |
|
7059
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7060
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
7061
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g"); |
|
7062
|
|
|
|
|
|
|
{ |
|
7063
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
7064
|
2
|
100
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(0)); |
|
7065
|
|
|
|
|
|
|
; |
|
7066
|
|
|
|
|
|
|
#line 158 "./xsi/algorithm.xsi" |
|
7067
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
7068
|
|
|
|
|
|
|
InteriorPointArea ip(&g); |
|
7069
|
|
|
|
|
|
|
Coordinate c; |
|
7070
|
|
|
|
|
|
|
if (ip.getInteriorPoint(c)) RETVAL = new Coordinate(c); |
|
7071
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
7072
|
|
|
|
|
|
|
#line 7073 "Geos.xs.cc" |
|
7073
|
|
|
|
|
|
|
{ |
|
7074
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7075
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
7076
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7077
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
7078
|
|
|
|
|
|
|
} |
|
7079
|
|
|
|
|
|
|
} |
|
7080
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7081
|
2
|
50
|
|
|
|
|
}); } |
|
7082
|
|
|
|
|
|
|
|
|
7083
|
|
|
|
|
|
|
|
|
7084
|
|
|
|
|
|
|
|
|
7085
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_interiorPointLine) { xs::throw_guard(aTHX_ cv, [=]() |
|
7086
|
|
|
|
|
|
|
{ |
|
7087
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7088
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
7089
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g"); |
|
7090
|
|
|
|
|
|
|
{ |
|
7091
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
7092
|
2
|
100
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(0)); |
|
7093
|
|
|
|
|
|
|
; |
|
7094
|
|
|
|
|
|
|
#line 165 "./xsi/algorithm.xsi" |
|
7095
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
7096
|
|
|
|
|
|
|
InteriorPointLine ip(&g); |
|
7097
|
|
|
|
|
|
|
Coordinate c; |
|
7098
|
|
|
|
|
|
|
if (ip.getInteriorPoint(c)) RETVAL = new Coordinate(c); |
|
7099
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
7100
|
|
|
|
|
|
|
#line 7101 "Geos.xs.cc" |
|
7101
|
|
|
|
|
|
|
{ |
|
7102
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7103
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
7104
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7105
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
7106
|
|
|
|
|
|
|
} |
|
7107
|
|
|
|
|
|
|
} |
|
7108
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7109
|
2
|
50
|
|
|
|
|
}); } |
|
7110
|
|
|
|
|
|
|
|
|
7111
|
|
|
|
|
|
|
|
|
7112
|
|
|
|
|
|
|
|
|
7113
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_interiorPointPoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
7114
|
|
|
|
|
|
|
{ |
|
7115
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7116
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
7117
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g"); |
|
7118
|
|
|
|
|
|
|
{ |
|
7119
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
7120
|
2
|
100
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(0)); |
|
7121
|
|
|
|
|
|
|
; |
|
7122
|
|
|
|
|
|
|
#line 172 "./xsi/algorithm.xsi" |
|
7123
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
7124
|
|
|
|
|
|
|
InteriorPointPoint ip(&g); |
|
7125
|
|
|
|
|
|
|
Coordinate c; |
|
7126
|
|
|
|
|
|
|
if (ip.getInteriorPoint(c)) RETVAL = new Coordinate(c); |
|
7127
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
7128
|
|
|
|
|
|
|
#line 7129 "Geos.xs.cc" |
|
7129
|
|
|
|
|
|
|
{ |
|
7130
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7131
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
7132
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7133
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
7134
|
|
|
|
|
|
|
} |
|
7135
|
|
|
|
|
|
|
} |
|
7136
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7137
|
2
|
50
|
|
|
|
|
}); } |
|
7138
|
|
|
|
|
|
|
|
|
7139
|
|
|
|
|
|
|
|
|
7140
|
|
|
|
|
|
|
|
|
7141
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_locate) { xs::throw_guard(aTHX_ cv, [=]() |
|
7142
|
|
|
|
|
|
|
{ |
|
7143
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7144
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
7145
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p, geom"); |
|
7146
|
|
|
|
|
|
|
{ |
|
7147
|
|
|
|
|
|
|
int RETVAL; |
|
7148
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
7149
|
2
|
50
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(0)); |
|
7150
|
|
|
|
|
|
|
; |
|
7151
|
2
|
100
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
7152
|
|
|
|
|
|
|
; |
|
7153
|
|
|
|
|
|
|
#line 179 "./xsi/algorithm.xsi" |
|
7154
|
|
|
|
|
|
|
PointLocator pl; |
|
7155
|
|
|
|
|
|
|
RETVAL = pl.locate(p, &geom); |
|
7156
|
|
|
|
|
|
|
#line 7157 "Geos.xs.cc" |
|
7157
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
7158
|
|
|
|
|
|
|
} |
|
7159
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7160
|
2
|
50
|
|
|
|
|
}); } |
|
7161
|
|
|
|
|
|
|
|
|
7162
|
|
|
|
|
|
|
|
|
7163
|
|
|
|
|
|
|
|
|
7164
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_intersects) { xs::throw_guard(aTHX_ cv, [=]() |
|
7165
|
|
|
|
|
|
|
{ |
|
7166
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7167
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
7168
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p, geom"); |
|
7169
|
|
|
|
|
|
|
{ |
|
7170
|
|
|
|
|
|
|
bool RETVAL; |
|
7171
|
2
|
50
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(0)); |
|
7172
|
|
|
|
|
|
|
; |
|
7173
|
2
|
100
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
7174
|
|
|
|
|
|
|
; |
|
7175
|
|
|
|
|
|
|
#line 184 "./xsi/algorithm.xsi" |
|
7176
|
|
|
|
|
|
|
PointLocator pl; |
|
7177
|
|
|
|
|
|
|
RETVAL = pl.intersects(p, &geom); |
|
7178
|
|
|
|
|
|
|
#line 7179 "Geos.xs.cc" |
|
7179
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
7180
|
|
|
|
|
|
|
} |
|
7181
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7182
|
2
|
50
|
|
|
|
|
}); } |
|
7183
|
|
|
|
|
|
|
|
|
7184
|
|
|
|
|
|
|
|
|
7185
|
|
|
|
|
|
|
|
|
7186
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_signOfDet2x2) { xs::throw_guard(aTHX_ cv, [=]() |
|
7187
|
|
|
|
|
|
|
{ |
|
7188
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7189
|
1
|
50
|
|
|
|
|
if (items != 4) |
|
7190
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "x1, y1, x2, y2"); |
|
7191
|
|
|
|
|
|
|
{ |
|
7192
|
|
|
|
|
|
|
int RETVAL; |
|
7193
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
7194
|
1
|
50
|
|
|
|
|
double x1 = (double)SvNV(ST(0)) |
|
|
|
50
|
|
|
|
|
|
|
7195
|
|
|
|
|
|
|
; |
|
7196
|
1
|
50
|
|
|
|
|
double y1 = (double)SvNV(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
7197
|
|
|
|
|
|
|
; |
|
7198
|
1
|
50
|
|
|
|
|
double x2 = (double)SvNV(ST(2)) |
|
|
|
50
|
|
|
|
|
|
|
7199
|
|
|
|
|
|
|
; |
|
7200
|
1
|
50
|
|
|
|
|
double y2 = (double)SvNV(ST(3)) |
|
|
|
50
|
|
|
|
|
|
|
7201
|
|
|
|
|
|
|
; |
|
7202
|
|
|
|
|
|
|
#line 189 "./xsi/algorithm.xsi" |
|
7203
|
|
|
|
|
|
|
RETVAL = RobustDeterminant::signOfDet2x2(x1, y1, x2, y2); |
|
7204
|
|
|
|
|
|
|
#line 7205 "Geos.xs.cc" |
|
7205
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
7206
|
|
|
|
|
|
|
} |
|
7207
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7208
|
1
|
50
|
|
|
|
|
}); } |
|
7209
|
|
|
|
|
|
|
|
|
7210
|
|
|
|
|
|
|
|
|
7211
|
|
|
|
|
|
|
|
|
7212
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_locateIndexedPointInArea) { xs::throw_guard(aTHX_ cv, [=]() |
|
7213
|
|
|
|
|
|
|
{ |
|
7214
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7215
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
7216
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p, geom"); |
|
7217
|
|
|
|
|
|
|
{ |
|
7218
|
|
|
|
|
|
|
int RETVAL; |
|
7219
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
7220
|
2
|
100
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(0)); |
|
7221
|
|
|
|
|
|
|
; |
|
7222
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
7223
|
|
|
|
|
|
|
; |
|
7224
|
|
|
|
|
|
|
#line 193 "./xsi/algorithm.xsi" |
|
7225
|
|
|
|
|
|
|
locate::IndexedPointInAreaLocator locator(geom); |
|
7226
|
|
|
|
|
|
|
RETVAL = locator.locate(&p); |
|
7227
|
|
|
|
|
|
|
#line 7228 "Geos.xs.cc" |
|
7228
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
7229
|
|
|
|
|
|
|
} |
|
7230
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7231
|
2
|
50
|
|
|
|
|
}); } |
|
7232
|
|
|
|
|
|
|
|
|
7233
|
|
|
|
|
|
|
|
|
7234
|
|
|
|
|
|
|
|
|
7235
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm_locateSimplePointInArea) { xs::throw_guard(aTHX_ cv, [=]() |
|
7236
|
|
|
|
|
|
|
{ |
|
7237
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7238
|
3
|
50
|
|
|
|
|
if (items != 2) |
|
7239
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p, geom"); |
|
7240
|
|
|
|
|
|
|
{ |
|
7241
|
|
|
|
|
|
|
int RETVAL; |
|
7242
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
7243
|
3
|
100
|
|
|
|
|
Coordinate& p = xs::in(aTHX_ ST(0)); |
|
7244
|
|
|
|
|
|
|
; |
|
7245
|
2
|
100
|
|
|
|
|
Geometry& geom = xs::in(aTHX_ ST(1)); |
|
7246
|
|
|
|
|
|
|
; |
|
7247
|
|
|
|
|
|
|
#line 198 "./xsi/algorithm.xsi" |
|
7248
|
|
|
|
|
|
|
locate::SimplePointInAreaLocator locator(&geom); |
|
7249
|
|
|
|
|
|
|
RETVAL = locator.locate(&p); |
|
7250
|
|
|
|
|
|
|
#line 7251 "Geos.xs.cc" |
|
7251
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
7252
|
|
|
|
|
|
|
} |
|
7253
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7254
|
3
|
50
|
|
|
|
|
}); } |
|
7255
|
|
|
|
|
|
|
|
|
7256
|
|
|
|
|
|
|
|
|
7257
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/algorithm.xsi' */ |
|
7258
|
|
|
|
|
|
|
|
|
7259
|
|
|
|
|
|
|
|
|
7260
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/algorithm/HCoordinate.xsi' from 'Geos.xs' */ |
|
7261
|
|
|
|
|
|
|
|
|
7262
|
|
|
|
|
|
|
|
|
7263
|
|
|
|
|
|
|
|
|
7264
|
10
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__HCoordinate_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
7265
|
|
|
|
|
|
|
{ |
|
7266
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7267
|
5
|
50
|
|
|
|
|
if (items < 2 || items > 5) |
|
|
|
50
|
|
|
|
|
|
|
7268
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg1, arg2= NULL, arg3= NULL, arg4= NULL"); |
|
7269
|
|
|
|
|
|
|
{ |
|
7270
|
|
|
|
|
|
|
HCoordinate * RETVAL; |
|
7271
|
5
|
|
|
|
|
|
SV* arg1 = ST(1) |
|
7272
|
|
|
|
|
|
|
; |
|
7273
|
|
|
|
|
|
|
SV* arg2; |
|
7274
|
|
|
|
|
|
|
SV* arg3; |
|
7275
|
|
|
|
|
|
|
SV* arg4; |
|
7276
|
|
|
|
|
|
|
|
|
7277
|
5
|
100
|
|
|
|
|
if (items < 3) |
|
7278
|
1
|
|
|
|
|
|
arg2 = NULL; |
|
7279
|
|
|
|
|
|
|
else { |
|
7280
|
4
|
|
|
|
|
|
arg2 = ST(2) |
|
7281
|
4
|
|
|
|
|
|
; |
|
7282
|
|
|
|
|
|
|
} |
|
7283
|
|
|
|
|
|
|
|
|
7284
|
5
|
100
|
|
|
|
|
if (items < 4) |
|
7285
|
3
|
|
|
|
|
|
arg3 = NULL; |
|
7286
|
|
|
|
|
|
|
else { |
|
7287
|
2
|
|
|
|
|
|
arg3 = ST(3) |
|
7288
|
2
|
|
|
|
|
|
; |
|
7289
|
|
|
|
|
|
|
} |
|
7290
|
|
|
|
|
|
|
|
|
7291
|
5
|
100
|
|
|
|
|
if (items < 5) |
|
7292
|
4
|
|
|
|
|
|
arg4 = NULL; |
|
7293
|
|
|
|
|
|
|
else { |
|
7294
|
1
|
|
|
|
|
|
arg4 = ST(4) |
|
7295
|
1
|
|
|
|
|
|
; |
|
7296
|
|
|
|
|
|
|
} |
|
7297
|
|
|
|
|
|
|
#line 5 "./xsi/algorithm/HCoordinate.xsi" |
|
7298
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
7299
|
|
|
|
|
|
|
if (!arg2) { |
|
7300
|
|
|
|
|
|
|
auto c = xs::in(arg1); |
|
7301
|
|
|
|
|
|
|
RETVAL = new HCoordinate(*c); |
|
7302
|
|
|
|
|
|
|
} |
|
7303
|
|
|
|
|
|
|
else if(!arg3) { |
|
7304
|
|
|
|
|
|
|
Object obj1 {arg1}, obj2{arg2}; |
|
7305
|
|
|
|
|
|
|
if(!obj1) throw("wrong argument"); |
|
7306
|
|
|
|
|
|
|
if(!obj2) throw("wrong argument"); |
|
7307
|
|
|
|
|
|
|
if (obj1.stash().name() == "Geo::Geos::Algorithm::HCoordinate") { |
|
7308
|
|
|
|
|
|
|
auto& c1 = xs::in(obj1); |
|
7309
|
|
|
|
|
|
|
auto& c2 = xs::in(obj1); |
|
7310
|
|
|
|
|
|
|
RETVAL = new HCoordinate(c1, c2); |
|
7311
|
|
|
|
|
|
|
} |
|
7312
|
|
|
|
|
|
|
else { |
|
7313
|
|
|
|
|
|
|
auto& c1 = xs::in(obj1); |
|
7314
|
|
|
|
|
|
|
auto& c2 = xs::in(obj1); |
|
7315
|
|
|
|
|
|
|
RETVAL = new HCoordinate(c1, c2); |
|
7316
|
|
|
|
|
|
|
} |
|
7317
|
|
|
|
|
|
|
} |
|
7318
|
|
|
|
|
|
|
else if(!arg4) { |
|
7319
|
|
|
|
|
|
|
if(!arg1) throw("undef not allowed"); |
|
7320
|
|
|
|
|
|
|
if(!arg2) throw("undef not allowed"); |
|
7321
|
|
|
|
|
|
|
if(!arg3) throw("undef not allowed"); |
|
7322
|
|
|
|
|
|
|
RETVAL = new HCoordinate(Simple(arg1), Simple(arg2), Simple(arg3)); |
|
7323
|
|
|
|
|
|
|
} |
|
7324
|
|
|
|
|
|
|
else { |
|
7325
|
|
|
|
|
|
|
auto& c1 = xs::in(arg1); |
|
7326
|
|
|
|
|
|
|
auto& c2 = xs::in(arg2); |
|
7327
|
|
|
|
|
|
|
auto& c3 = xs::in(arg3); |
|
7328
|
|
|
|
|
|
|
auto& c4 = xs::in(arg4); |
|
7329
|
|
|
|
|
|
|
RETVAL = new HCoordinate(c1, c2, c3, c4); |
|
7330
|
|
|
|
|
|
|
} |
|
7331
|
|
|
|
|
|
|
#line 7332 "Geos.xs.cc" |
|
7332
|
|
|
|
|
|
|
{ |
|
7333
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7334
|
5
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
7335
|
5
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7336
|
5
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
7337
|
|
|
|
|
|
|
} |
|
7338
|
|
|
|
|
|
|
} |
|
7339
|
5
|
|
|
|
|
|
XSRETURN(1); |
|
7340
|
5
|
50
|
|
|
|
|
}); } |
|
7341
|
|
|
|
|
|
|
|
|
7342
|
|
|
|
|
|
|
|
|
7343
|
|
|
|
|
|
|
|
|
7344
|
16
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__HCoordinate_x) { xs::throw_guard(aTHX_ cv, [=]() |
|
7345
|
|
|
|
|
|
|
{ |
|
7346
|
8
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7347
|
8
|
|
|
|
|
|
dXSI32; |
|
7348
|
8
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
7349
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
7350
|
|
|
|
|
|
|
{ |
|
7351
|
|
|
|
|
|
|
double RETVAL; |
|
7352
|
8
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
7353
|
8
|
50
|
|
|
|
|
HCoordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7354
|
|
|
|
|
|
|
; |
|
7355
|
|
|
|
|
|
|
SV* newval; |
|
7356
|
|
|
|
|
|
|
|
|
7357
|
8
|
50
|
|
|
|
|
if (items < 2) |
|
7358
|
8
|
|
|
|
|
|
newval = NULL; |
|
7359
|
|
|
|
|
|
|
else { |
|
7360
|
0
|
|
|
|
|
|
newval = ST(1) |
|
7361
|
0
|
|
|
|
|
|
; |
|
7362
|
|
|
|
|
|
|
} |
|
7363
|
|
|
|
|
|
|
#line 40 "./xsi/algorithm/HCoordinate.xsi" |
|
7364
|
|
|
|
|
|
|
double* val; |
|
7365
|
|
|
|
|
|
|
switch (ix) { |
|
7366
|
|
|
|
|
|
|
case 0: val = &THIS->x; break; |
|
7367
|
|
|
|
|
|
|
case 1: val = &THIS->y; break; |
|
7368
|
|
|
|
|
|
|
default: val = &THIS->w; break; |
|
7369
|
|
|
|
|
|
|
} |
|
7370
|
|
|
|
|
|
|
if (newval) { |
|
7371
|
|
|
|
|
|
|
*val = SvNV(newval); |
|
7372
|
|
|
|
|
|
|
} |
|
7373
|
|
|
|
|
|
|
RETVAL = *val; |
|
7374
|
|
|
|
|
|
|
#line 7375 "Geos.xs.cc" |
|
7375
|
8
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
7376
|
|
|
|
|
|
|
} |
|
7377
|
8
|
|
|
|
|
|
XSRETURN(1); |
|
7378
|
8
|
50
|
|
|
|
|
}); } |
|
7379
|
|
|
|
|
|
|
|
|
7380
|
|
|
|
|
|
|
|
|
7381
|
|
|
|
|
|
|
|
|
7382
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__HCoordinate_getCoordinate) { xs::throw_guard(aTHX_ cv, [=]() |
|
7383
|
|
|
|
|
|
|
{ |
|
7384
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7385
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
7386
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
7387
|
|
|
|
|
|
|
{ |
|
7388
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
7389
|
1
|
50
|
|
|
|
|
HCoordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7390
|
|
|
|
|
|
|
; |
|
7391
|
|
|
|
|
|
|
#line 53 "./xsi/algorithm/HCoordinate.xsi" |
|
7392
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
7393
|
|
|
|
|
|
|
Coordinate c; |
|
7394
|
|
|
|
|
|
|
THIS->getCoordinate(c); |
|
7395
|
|
|
|
|
|
|
RETVAL = new Coordinate(c); |
|
7396
|
|
|
|
|
|
|
#line 7397 "Geos.xs.cc" |
|
7397
|
|
|
|
|
|
|
{ |
|
7398
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7399
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
7400
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7401
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
7402
|
|
|
|
|
|
|
} |
|
7403
|
|
|
|
|
|
|
} |
|
7404
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7405
|
1
|
50
|
|
|
|
|
}); } |
|
7406
|
|
|
|
|
|
|
|
|
7407
|
|
|
|
|
|
|
|
|
7408
|
|
|
|
|
|
|
|
|
7409
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__HCoordinate_intersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
7410
|
|
|
|
|
|
|
{ |
|
7411
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7412
|
1
|
50
|
|
|
|
|
if (items != 4) |
|
7413
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p1, p2, q1, q2"); |
|
7414
|
|
|
|
|
|
|
{ |
|
7415
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
7416
|
1
|
50
|
|
|
|
|
Coordinate& p1 = xs::in(aTHX_ ST(0)); |
|
7417
|
|
|
|
|
|
|
; |
|
7418
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(aTHX_ ST(1)); |
|
7419
|
|
|
|
|
|
|
; |
|
7420
|
1
|
50
|
|
|
|
|
Coordinate& q1 = xs::in(aTHX_ ST(2)); |
|
7421
|
|
|
|
|
|
|
; |
|
7422
|
1
|
50
|
|
|
|
|
Coordinate& q2 = xs::in(aTHX_ ST(3)); |
|
7423
|
|
|
|
|
|
|
; |
|
7424
|
|
|
|
|
|
|
#line 60 "./xsi/algorithm/HCoordinate.xsi" |
|
7425
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
7426
|
|
|
|
|
|
|
Coordinate c; |
|
7427
|
|
|
|
|
|
|
HCoordinate::intersection(p1, p2, q1, q2, c); |
|
7428
|
|
|
|
|
|
|
RETVAL = new Coordinate(c); |
|
7429
|
|
|
|
|
|
|
#line 7430 "Geos.xs.cc" |
|
7430
|
|
|
|
|
|
|
{ |
|
7431
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7432
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
7433
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7434
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
7435
|
|
|
|
|
|
|
} |
|
7436
|
|
|
|
|
|
|
} |
|
7437
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7438
|
1
|
50
|
|
|
|
|
}); } |
|
7439
|
|
|
|
|
|
|
|
|
7440
|
|
|
|
|
|
|
|
|
7441
|
|
|
|
|
|
|
|
|
7442
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__HCoordinate_toString) { xs::throw_guard(aTHX_ cv, [=]() |
|
7443
|
|
|
|
|
|
|
{ |
|
7444
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7445
|
6
|
50
|
|
|
|
|
if (items < 1) |
|
7446
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
7447
|
|
|
|
|
|
|
{ |
|
7448
|
12
|
|
|
|
|
|
std::string RETVAL; |
|
7449
|
6
|
100
|
|
|
|
|
dXSTARG; |
|
|
|
50
|
|
|
|
|
|
|
7450
|
6
|
50
|
|
|
|
|
HCoordinate* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7451
|
|
|
|
|
|
|
; |
|
7452
|
|
|
|
|
|
|
#line 66 "./xsi/algorithm/HCoordinate.xsi" |
|
7453
|
|
|
|
|
|
|
std::ostringstream out; |
|
7454
|
|
|
|
|
|
|
out << *THIS; |
|
7455
|
|
|
|
|
|
|
RETVAL = out.str(); |
|
7456
|
|
|
|
|
|
|
#line 7457 "Geos.xs.cc" |
|
7457
|
6
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7458
|
|
|
|
|
|
|
} |
|
7459
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
7460
|
6
|
50
|
|
|
|
|
}); } |
|
7461
|
|
|
|
|
|
|
|
|
7462
|
|
|
|
|
|
|
|
|
7463
|
|
|
|
|
|
|
|
|
7464
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__HCoordinate_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
7465
|
|
|
|
|
|
|
{ |
|
7466
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7467
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
7468
|
|
|
|
|
|
|
{ |
|
7469
|
|
|
|
|
|
|
int RETVAL; |
|
7470
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
7471
|
|
|
|
|
|
|
#line 71 "./xsi/algorithm/HCoordinate.xsi" |
|
7472
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
7473
|
|
|
|
|
|
|
#line 7474 "Geos.xs.cc" |
|
7474
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
7475
|
|
|
|
|
|
|
} |
|
7476
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
7477
|
0
|
0
|
|
|
|
|
}); } |
|
7478
|
|
|
|
|
|
|
|
|
7479
|
|
|
|
|
|
|
|
|
7480
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/algorithm/HCoordinate.xsi' */ |
|
7481
|
|
|
|
|
|
|
|
|
7482
|
|
|
|
|
|
|
|
|
7483
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/algorithm/MinimumDiameter.xsi' from 'Geos.xs' */ |
|
7484
|
|
|
|
|
|
|
|
|
7485
|
|
|
|
|
|
|
|
|
7486
|
|
|
|
|
|
|
|
|
7487
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__MinimumDiameter_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
7488
|
|
|
|
|
|
|
{ |
|
7489
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7490
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
7491
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, g, hint= NULL"); |
|
7492
|
|
|
|
|
|
|
{ |
|
7493
|
|
|
|
|
|
|
MinimumDiameter * RETVAL; |
|
7494
|
2
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(1)); |
|
7495
|
|
|
|
|
|
|
; |
|
7496
|
|
|
|
|
|
|
SV* hint; |
|
7497
|
|
|
|
|
|
|
|
|
7498
|
2
|
100
|
|
|
|
|
if (items < 3) |
|
7499
|
1
|
|
|
|
|
|
hint = NULL; |
|
7500
|
|
|
|
|
|
|
else { |
|
7501
|
1
|
|
|
|
|
|
hint = ST(2) |
|
7502
|
1
|
|
|
|
|
|
; |
|
7503
|
|
|
|
|
|
|
} |
|
7504
|
|
|
|
|
|
|
#line 5 "./xsi/algorithm/MinimumDiameter.xsi" |
|
7505
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
7506
|
|
|
|
|
|
|
if (!hint) { |
|
7507
|
|
|
|
|
|
|
bool convex = SvTRUE(hint); |
|
7508
|
|
|
|
|
|
|
RETVAL = new MinimumDiameter(&g, convex); |
|
7509
|
|
|
|
|
|
|
} |
|
7510
|
|
|
|
|
|
|
else RETVAL = new MinimumDiameter(&g); |
|
7511
|
|
|
|
|
|
|
#line 7512 "Geos.xs.cc" |
|
7512
|
|
|
|
|
|
|
{ |
|
7513
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7514
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
7515
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7516
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
7517
|
|
|
|
|
|
|
} |
|
7518
|
|
|
|
|
|
|
} |
|
7519
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
7520
|
2
|
50
|
|
|
|
|
}); } |
|
7521
|
|
|
|
|
|
|
|
|
7522
|
|
|
|
|
|
|
|
|
7523
|
|
|
|
|
|
|
|
|
7524
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__MinimumDiameter_getMinimumRectangle) { xs::throw_guard(aTHX_ cv, [=]() |
|
7525
|
|
|
|
|
|
|
{ |
|
7526
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7527
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
7528
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "obj"); |
|
7529
|
|
|
|
|
|
|
{ |
|
7530
|
6
|
|
|
|
|
|
Sv RETVAL; |
|
7531
|
6
|
50
|
|
|
|
|
Object obj = ST(0); |
|
|
|
50
|
|
|
|
|
|
|
7532
|
3
|
50
|
|
|
|
|
if (!obj && SvOK(ST(0))) throw "arg is not a blessed reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
7533
|
0
|
|
|
|
|
|
; |
|
7534
|
|
|
|
|
|
|
#line 13 "./xsi/algorithm/MinimumDiameter.xsi" |
|
7535
|
|
|
|
|
|
|
Geometry* r; |
|
7536
|
|
|
|
|
|
|
if (obj.stash().name() == "Geo::Geos::Algorithm::MinimumDiameter") { |
|
7537
|
|
|
|
|
|
|
auto& self = xs::in(obj); |
|
7538
|
|
|
|
|
|
|
r = self.getMinimumRectangle(); |
|
7539
|
|
|
|
|
|
|
} |
|
7540
|
|
|
|
|
|
|
else { |
|
7541
|
|
|
|
|
|
|
auto& g = xs::in(obj); |
|
7542
|
|
|
|
|
|
|
r = MinimumDiameter::getMinimumRectangle(&g); |
|
7543
|
|
|
|
|
|
|
} |
|
7544
|
|
|
|
|
|
|
RETVAL = Helper::uplift(r); |
|
7545
|
|
|
|
|
|
|
#line 7546 "Geos.xs.cc" |
|
7546
|
|
|
|
|
|
|
{ |
|
7547
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7548
|
3
|
|
|
|
|
|
RETVALSV = NULL; |
|
7549
|
3
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
7550
|
3
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
7551
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
7552
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
7553
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
7554
|
|
|
|
|
|
|
case SVt_PVCV: |
|
7555
|
|
|
|
|
|
|
case SVt_PVIO: |
|
7556
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
7557
|
0
|
|
|
|
|
|
break; |
|
7558
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
7559
|
|
|
|
|
|
|
} |
|
7560
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7561
|
3
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
7562
|
|
|
|
|
|
|
} |
|
7563
|
|
|
|
|
|
|
} |
|
7564
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
7565
|
3
|
50
|
|
|
|
|
}); } |
|
7566
|
|
|
|
|
|
|
|
|
7567
|
|
|
|
|
|
|
|
|
7568
|
|
|
|
|
|
|
|
|
7569
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__MinimumDiameter_getMinimumDiameter) { xs::throw_guard(aTHX_ cv, [=]() |
|
7570
|
|
|
|
|
|
|
{ |
|
7571
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7572
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
7573
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g"); |
|
7574
|
|
|
|
|
|
|
{ |
|
7575
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
7576
|
1
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(0)); |
|
7577
|
|
|
|
|
|
|
; |
|
7578
|
|
|
|
|
|
|
#line 26 "./xsi/algorithm/MinimumDiameter.xsi" |
|
7579
|
|
|
|
|
|
|
RETVAL = Helper::uplift(MinimumDiameter::getMinimumDiameter(&g)); |
|
7580
|
|
|
|
|
|
|
#line 7581 "Geos.xs.cc" |
|
7581
|
|
|
|
|
|
|
{ |
|
7582
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7583
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
7584
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
7585
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
7586
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
7587
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
7588
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
7589
|
|
|
|
|
|
|
case SVt_PVCV: |
|
7590
|
|
|
|
|
|
|
case SVt_PVIO: |
|
7591
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
7592
|
0
|
|
|
|
|
|
break; |
|
7593
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
7594
|
|
|
|
|
|
|
} |
|
7595
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7596
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
7597
|
|
|
|
|
|
|
} |
|
7598
|
|
|
|
|
|
|
} |
|
7599
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7600
|
1
|
50
|
|
|
|
|
}); } |
|
7601
|
|
|
|
|
|
|
|
|
7602
|
|
|
|
|
|
|
|
|
7603
|
|
|
|
|
|
|
|
|
7604
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__MinimumDiameter_getLength) { xs::throw_guard(aTHX_ cv, [=]() |
|
7605
|
|
|
|
|
|
|
{ |
|
7606
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7607
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
7608
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
7609
|
|
|
|
|
|
|
{ |
|
7610
|
|
|
|
|
|
|
double RETVAL; |
|
7611
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
7612
|
1
|
50
|
|
|
|
|
MinimumDiameter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7613
|
|
|
|
|
|
|
; |
|
7614
|
|
|
|
|
|
|
#line 29 "./xsi/algorithm/MinimumDiameter.xsi" |
|
7615
|
|
|
|
|
|
|
RETVAL = THIS->getLength(); |
|
7616
|
|
|
|
|
|
|
#line 7617 "Geos.xs.cc" |
|
7617
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
7618
|
|
|
|
|
|
|
} |
|
7619
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7620
|
1
|
50
|
|
|
|
|
}); } |
|
7621
|
|
|
|
|
|
|
|
|
7622
|
|
|
|
|
|
|
|
|
7623
|
|
|
|
|
|
|
|
|
7624
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__MinimumDiameter_getWidthCoordinate) { xs::throw_guard(aTHX_ cv, [=]() |
|
7625
|
|
|
|
|
|
|
{ |
|
7626
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7627
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
7628
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
7629
|
|
|
|
|
|
|
{ |
|
7630
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
7631
|
1
|
50
|
|
|
|
|
MinimumDiameter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7632
|
|
|
|
|
|
|
; |
|
7633
|
|
|
|
|
|
|
#line 32 "./xsi/algorithm/MinimumDiameter.xsi" |
|
7634
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
7635
|
|
|
|
|
|
|
RETVAL = new Coordinate(* (THIS->getWidthCoordinate())); |
|
7636
|
|
|
|
|
|
|
#line 7637 "Geos.xs.cc" |
|
7637
|
|
|
|
|
|
|
{ |
|
7638
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7639
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
7640
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7641
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
7642
|
|
|
|
|
|
|
} |
|
7643
|
|
|
|
|
|
|
} |
|
7644
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7645
|
1
|
50
|
|
|
|
|
}); } |
|
7646
|
|
|
|
|
|
|
|
|
7647
|
|
|
|
|
|
|
|
|
7648
|
|
|
|
|
|
|
|
|
7649
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__MinimumDiameter_getSupportingSegment) { xs::throw_guard(aTHX_ cv, [=]() |
|
7650
|
|
|
|
|
|
|
{ |
|
7651
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7652
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
7653
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
7654
|
|
|
|
|
|
|
{ |
|
7655
|
|
|
|
|
|
|
LineString * RETVAL; |
|
7656
|
1
|
50
|
|
|
|
|
MinimumDiameter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7657
|
|
|
|
|
|
|
; |
|
7658
|
|
|
|
|
|
|
#line 36 "./xsi/algorithm/MinimumDiameter.xsi" |
|
7659
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
7660
|
|
|
|
|
|
|
RETVAL = dyn_cast(THIS->getSupportingSegment()); |
|
7661
|
|
|
|
|
|
|
#line 7662 "Geos.xs.cc" |
|
7662
|
|
|
|
|
|
|
{ |
|
7663
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7664
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
7665
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7666
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
7667
|
|
|
|
|
|
|
} |
|
7668
|
|
|
|
|
|
|
} |
|
7669
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7670
|
1
|
50
|
|
|
|
|
}); } |
|
7671
|
|
|
|
|
|
|
|
|
7672
|
|
|
|
|
|
|
|
|
7673
|
|
|
|
|
|
|
|
|
7674
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__MinimumDiameter_getDiameter) { xs::throw_guard(aTHX_ cv, [=]() |
|
7675
|
|
|
|
|
|
|
{ |
|
7676
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7677
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
7678
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
7679
|
|
|
|
|
|
|
{ |
|
7680
|
|
|
|
|
|
|
LineString * RETVAL; |
|
7681
|
2
|
50
|
|
|
|
|
MinimumDiameter* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7682
|
|
|
|
|
|
|
; |
|
7683
|
|
|
|
|
|
|
#line 40 "./xsi/algorithm/MinimumDiameter.xsi" |
|
7684
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
7685
|
|
|
|
|
|
|
RETVAL = dyn_cast(THIS->getDiameter()); |
|
7686
|
|
|
|
|
|
|
#line 7687 "Geos.xs.cc" |
|
7687
|
|
|
|
|
|
|
{ |
|
7688
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7689
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
7690
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7691
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
7692
|
|
|
|
|
|
|
} |
|
7693
|
|
|
|
|
|
|
} |
|
7694
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
7695
|
2
|
50
|
|
|
|
|
}); } |
|
7696
|
|
|
|
|
|
|
|
|
7697
|
|
|
|
|
|
|
|
|
7698
|
|
|
|
|
|
|
|
|
7699
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__MinimumDiameter_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
7700
|
|
|
|
|
|
|
{ |
|
7701
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7702
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
7703
|
|
|
|
|
|
|
{ |
|
7704
|
|
|
|
|
|
|
int RETVAL; |
|
7705
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
7706
|
|
|
|
|
|
|
#line 44 "./xsi/algorithm/MinimumDiameter.xsi" |
|
7707
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
7708
|
|
|
|
|
|
|
#line 7709 "Geos.xs.cc" |
|
7709
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
7710
|
|
|
|
|
|
|
} |
|
7711
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
7712
|
0
|
0
|
|
|
|
|
}); } |
|
7713
|
|
|
|
|
|
|
|
|
7714
|
|
|
|
|
|
|
|
|
7715
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/algorithm/MinimumDiameter.xsi' */ |
|
7716
|
|
|
|
|
|
|
|
|
7717
|
|
|
|
|
|
|
|
|
7718
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/algorithm/LineIntersector.xsi' from 'Geos.xs' */ |
|
7719
|
|
|
|
|
|
|
|
|
7720
|
|
|
|
|
|
|
|
|
7721
|
|
|
|
|
|
|
|
|
7722
|
24
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
7723
|
|
|
|
|
|
|
{ |
|
7724
|
12
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7725
|
12
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
7726
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, precisionModel= NULL"); |
|
7727
|
|
|
|
|
|
|
{ |
|
7728
|
24
|
|
|
|
|
|
Sv RETVAL; |
|
7729
|
|
|
|
|
|
|
SV* precisionModel; |
|
7730
|
|
|
|
|
|
|
|
|
7731
|
12
|
100
|
|
|
|
|
if (items < 2) |
|
7732
|
2
|
|
|
|
|
|
precisionModel = NULL; |
|
7733
|
|
|
|
|
|
|
else { |
|
7734
|
10
|
|
|
|
|
|
precisionModel = ST(1) |
|
7735
|
10
|
|
|
|
|
|
; |
|
7736
|
|
|
|
|
|
|
} |
|
7737
|
|
|
|
|
|
|
#line 5 "./xsi/algorithm/LineIntersector.xsi" |
|
7738
|
|
|
|
|
|
|
PrecisionModel* pm = precisionModel ? xs::in(precisionModel) : NULL; |
|
7739
|
|
|
|
|
|
|
Object wrapped = xs::out(new LineIntersector(pm)); |
|
7740
|
|
|
|
|
|
|
if (pm) wrapped.payload_attach(precisionModel, &payload_marker); |
|
7741
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
7742
|
|
|
|
|
|
|
#line 7743 "Geos.xs.cc" |
|
7743
|
|
|
|
|
|
|
{ |
|
7744
|
|
|
|
|
|
|
SV * RETVALSV; |
|
7745
|
12
|
|
|
|
|
|
RETVALSV = NULL; |
|
7746
|
12
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
7747
|
12
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
7748
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
7749
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
7750
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
7751
|
|
|
|
|
|
|
case SVt_PVCV: |
|
7752
|
|
|
|
|
|
|
case SVt_PVIO: |
|
7753
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
7754
|
0
|
|
|
|
|
|
break; |
|
7755
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
7756
|
|
|
|
|
|
|
} |
|
7757
|
12
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
7758
|
12
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
7759
|
|
|
|
|
|
|
} |
|
7760
|
|
|
|
|
|
|
} |
|
7761
|
12
|
|
|
|
|
|
XSRETURN(1); |
|
7762
|
12
|
50
|
|
|
|
|
}); } |
|
7763
|
|
|
|
|
|
|
|
|
7764
|
|
|
|
|
|
|
|
|
7765
|
|
|
|
|
|
|
|
|
7766
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_interpolateZ) { xs::throw_guard(aTHX_ cv, [=]() |
|
7767
|
|
|
|
|
|
|
{ |
|
7768
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7769
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
7770
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p, p0, p1"); |
|
7771
|
|
|
|
|
|
|
{ |
|
7772
|
|
|
|
|
|
|
double RETVAL; |
|
7773
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
7774
|
1
|
50
|
|
|
|
|
Coordinate * p = xs::in(aTHX_ ST(0)); |
|
7775
|
|
|
|
|
|
|
; |
|
7776
|
1
|
50
|
|
|
|
|
Coordinate * p0 = xs::in(aTHX_ ST(1)); |
|
7777
|
|
|
|
|
|
|
; |
|
7778
|
1
|
50
|
|
|
|
|
Coordinate * p1 = xs::in(aTHX_ ST(2)); |
|
7779
|
|
|
|
|
|
|
; |
|
7780
|
|
|
|
|
|
|
#line 11 "./xsi/algorithm/LineIntersector.xsi" |
|
7781
|
|
|
|
|
|
|
RETVAL = LineIntersector::interpolateZ(*p, *p0, *p1); |
|
7782
|
|
|
|
|
|
|
#line 7783 "Geos.xs.cc" |
|
7783
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
7784
|
|
|
|
|
|
|
} |
|
7785
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7786
|
1
|
50
|
|
|
|
|
}); } |
|
7787
|
|
|
|
|
|
|
|
|
7788
|
|
|
|
|
|
|
|
|
7789
|
|
|
|
|
|
|
|
|
7790
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_computeEdgeDistance) { xs::throw_guard(aTHX_ cv, [=]() |
|
7791
|
|
|
|
|
|
|
{ |
|
7792
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7793
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
7794
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "p, p0, p1"); |
|
7795
|
|
|
|
|
|
|
{ |
|
7796
|
|
|
|
|
|
|
double RETVAL; |
|
7797
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
7798
|
1
|
50
|
|
|
|
|
Coordinate * p = xs::in(aTHX_ ST(0)); |
|
7799
|
|
|
|
|
|
|
; |
|
7800
|
1
|
50
|
|
|
|
|
Coordinate * p0 = xs::in(aTHX_ ST(1)); |
|
7801
|
|
|
|
|
|
|
; |
|
7802
|
1
|
50
|
|
|
|
|
Coordinate * p1 = xs::in(aTHX_ ST(2)); |
|
7803
|
|
|
|
|
|
|
; |
|
7804
|
|
|
|
|
|
|
#line 13 "./xsi/algorithm/LineIntersector.xsi" |
|
7805
|
|
|
|
|
|
|
RETVAL = LineIntersector::computeEdgeDistance(*p, *p0, *p1); |
|
7806
|
|
|
|
|
|
|
#line 7807 "Geos.xs.cc" |
|
7807
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
7808
|
|
|
|
|
|
|
} |
|
7809
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7810
|
1
|
50
|
|
|
|
|
}); } |
|
7811
|
|
|
|
|
|
|
|
|
7812
|
|
|
|
|
|
|
|
|
7813
|
|
|
|
|
|
|
|
|
7814
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_isSameSignAndNonZero) { xs::throw_guard(aTHX_ cv, [=]() |
|
7815
|
|
|
|
|
|
|
{ |
|
7816
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7817
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
7818
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "a, b"); |
|
7819
|
|
|
|
|
|
|
{ |
|
7820
|
|
|
|
|
|
|
bool RETVAL; |
|
7821
|
1
|
50
|
|
|
|
|
double a = (double)SvNV(ST(0)) |
|
|
|
50
|
|
|
|
|
|
|
7822
|
|
|
|
|
|
|
; |
|
7823
|
1
|
50
|
|
|
|
|
double b = (double)SvNV(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
7824
|
|
|
|
|
|
|
; |
|
7825
|
|
|
|
|
|
|
#line 15 "./xsi/algorithm/LineIntersector.xsi" |
|
7826
|
|
|
|
|
|
|
RETVAL = LineIntersector::isSameSignAndNonZero(a, b); |
|
7827
|
|
|
|
|
|
|
#line 7828 "Geos.xs.cc" |
|
7828
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
7829
|
|
|
|
|
|
|
} |
|
7830
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7831
|
1
|
50
|
|
|
|
|
}); } |
|
7832
|
|
|
|
|
|
|
|
|
7833
|
|
|
|
|
|
|
|
|
7834
|
|
|
|
|
|
|
|
|
7835
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_hasIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
7836
|
|
|
|
|
|
|
{ |
|
7837
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7838
|
6
|
50
|
|
|
|
|
if (items < 1 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
7839
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "arg0, p1= NULL, p2= NULL"); |
|
7840
|
|
|
|
|
|
|
{ |
|
7841
|
|
|
|
|
|
|
bool RETVAL; |
|
7842
|
12
|
50
|
|
|
|
|
Object arg0 = ST(0); |
|
7843
|
6
|
50
|
|
|
|
|
if (!arg0 && SvOK(ST(0))) throw "arg is not a blessed reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
7844
|
0
|
|
|
|
|
|
; |
|
7845
|
|
|
|
|
|
|
Coordinate * p1; |
|
7846
|
|
|
|
|
|
|
Coordinate * p2; |
|
7847
|
|
|
|
|
|
|
|
|
7848
|
6
|
100
|
|
|
|
|
if (items < 2) |
|
7849
|
5
|
|
|
|
|
|
p1 = NULL; |
|
7850
|
|
|
|
|
|
|
else { |
|
7851
|
1
|
50
|
|
|
|
|
p1 = xs::in(aTHX_ ST(1)); |
|
7852
|
|
|
|
|
|
|
; |
|
7853
|
|
|
|
|
|
|
} |
|
7854
|
|
|
|
|
|
|
|
|
7855
|
6
|
100
|
|
|
|
|
if (items < 3) |
|
7856
|
5
|
|
|
|
|
|
p2 = NULL; |
|
7857
|
|
|
|
|
|
|
else { |
|
7858
|
1
|
50
|
|
|
|
|
p2 = xs::in(aTHX_ ST(2)); |
|
7859
|
|
|
|
|
|
|
; |
|
7860
|
|
|
|
|
|
|
} |
|
7861
|
|
|
|
|
|
|
#line 18 "./xsi/algorithm/LineIntersector.xsi" |
|
7862
|
|
|
|
|
|
|
if (p1 == NULL) RETVAL = xs::in(arg0).hasIntersection(); |
|
7863
|
|
|
|
|
|
|
else { |
|
7864
|
|
|
|
|
|
|
auto& p0 = xs::in(arg0); |
|
7865
|
|
|
|
|
|
|
if(!p1) throw("undef not allowed"); |
|
7866
|
|
|
|
|
|
|
if(!p2) throw("undef not allowed"); |
|
7867
|
|
|
|
|
|
|
RETVAL = LineIntersector::hasIntersection(p0, *p1, *p2); |
|
7868
|
|
|
|
|
|
|
} |
|
7869
|
|
|
|
|
|
|
#line 7870 "Geos.xs.cc" |
|
7870
|
6
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
7871
|
|
|
|
|
|
|
} |
|
7872
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
7873
|
6
|
50
|
|
|
|
|
}); } |
|
7874
|
|
|
|
|
|
|
|
|
7875
|
|
|
|
|
|
|
|
|
7876
|
|
|
|
|
|
|
|
|
7877
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_isInteriorIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
7878
|
|
|
|
|
|
|
{ |
|
7879
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7880
|
1
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
7881
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg= NULL"); |
|
7882
|
|
|
|
|
|
|
{ |
|
7883
|
|
|
|
|
|
|
bool RETVAL; |
|
7884
|
1
|
50
|
|
|
|
|
LineIntersector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7885
|
|
|
|
|
|
|
; |
|
7886
|
|
|
|
|
|
|
SV* arg; |
|
7887
|
|
|
|
|
|
|
|
|
7888
|
1
|
50
|
|
|
|
|
if (items < 2) |
|
7889
|
1
|
|
|
|
|
|
arg = NULL; |
|
7890
|
|
|
|
|
|
|
else { |
|
7891
|
0
|
|
|
|
|
|
arg = ST(1) |
|
7892
|
0
|
|
|
|
|
|
; |
|
7893
|
|
|
|
|
|
|
} |
|
7894
|
|
|
|
|
|
|
#line 29 "./xsi/algorithm/LineIntersector.xsi" |
|
7895
|
|
|
|
|
|
|
if(!arg) RETVAL = THIS->isInteriorIntersection(); |
|
7896
|
|
|
|
|
|
|
else { |
|
7897
|
|
|
|
|
|
|
int inputLineIndex = SvIV(arg); |
|
7898
|
|
|
|
|
|
|
RETVAL = THIS->isInteriorIntersection(inputLineIndex); |
|
7899
|
|
|
|
|
|
|
} |
|
7900
|
|
|
|
|
|
|
#line 7901 "Geos.xs.cc" |
|
7901
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
7902
|
|
|
|
|
|
|
} |
|
7903
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7904
|
1
|
50
|
|
|
|
|
}); } |
|
7905
|
|
|
|
|
|
|
|
|
7906
|
|
|
|
|
|
|
|
|
7907
|
|
|
|
|
|
|
|
|
7908
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_setPrecisionModel) { xs::throw_guard(aTHX_ cv, [=]() |
|
7909
|
|
|
|
|
|
|
{ |
|
7910
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7911
|
3
|
50
|
|
|
|
|
if (items != 2) |
|
7912
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, pm"); |
|
7913
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
7914
|
3
|
|
|
|
|
|
SP -= items; |
|
7915
|
|
|
|
|
|
|
{ |
|
7916
|
3
|
50
|
|
|
|
|
LineIntersector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7917
|
|
|
|
|
|
|
; |
|
7918
|
3
|
|
|
|
|
|
SV* pm = ST(1) |
|
7919
|
|
|
|
|
|
|
; |
|
7920
|
|
|
|
|
|
|
#line 37 "./xsi/algorithm/LineIntersector.xsi" |
|
7921
|
|
|
|
|
|
|
PrecisionModel& newPM = xs::in(pm); |
|
7922
|
|
|
|
|
|
|
THIS->setPrecisionModel(&newPM); |
|
7923
|
|
|
|
|
|
|
Object me {ST(0)}; |
|
7924
|
|
|
|
|
|
|
if (me.payload_exists(&payload_marker)) { |
|
7925
|
|
|
|
|
|
|
me.payload_detach(&payload_marker); |
|
7926
|
|
|
|
|
|
|
} |
|
7927
|
|
|
|
|
|
|
me.payload_attach(SvRV(pm), &payload_marker); |
|
7928
|
|
|
|
|
|
|
#line 7929 "Geos.xs.cc" |
|
7929
|
3
|
|
|
|
|
|
PUTBACK; |
|
7930
|
6
|
|
|
|
|
|
return; |
|
7931
|
|
|
|
|
|
|
} |
|
7932
|
3
|
50
|
|
|
|
|
}); } |
|
7933
|
|
|
|
|
|
|
|
|
7934
|
|
|
|
|
|
|
|
|
7935
|
|
|
|
|
|
|
|
|
7936
|
10
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_computeIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
7937
|
|
|
|
|
|
|
{ |
|
7938
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7939
|
5
|
50
|
|
|
|
|
if (items < 4 || items > 5) |
|
|
|
50
|
|
|
|
|
|
|
7940
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, p1, p2, p3, p4arg= NULL"); |
|
7941
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
7942
|
5
|
|
|
|
|
|
SP -= items; |
|
7943
|
|
|
|
|
|
|
{ |
|
7944
|
5
|
50
|
|
|
|
|
LineIntersector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7945
|
|
|
|
|
|
|
; |
|
7946
|
5
|
|
|
|
|
|
Coordinate& p1 = xs::in(aTHX_ ST(1)); |
|
7947
|
|
|
|
|
|
|
; |
|
7948
|
5
|
|
|
|
|
|
Coordinate& p2 = xs::in(aTHX_ ST(2)); |
|
7949
|
|
|
|
|
|
|
; |
|
7950
|
5
|
|
|
|
|
|
Coordinate& p3 = xs::in(aTHX_ ST(3)); |
|
7951
|
|
|
|
|
|
|
; |
|
7952
|
|
|
|
|
|
|
SV* p4arg; |
|
7953
|
|
|
|
|
|
|
|
|
7954
|
5
|
100
|
|
|
|
|
if (items < 5) |
|
7955
|
1
|
|
|
|
|
|
p4arg = NULL; |
|
7956
|
|
|
|
|
|
|
else { |
|
7957
|
4
|
|
|
|
|
|
p4arg = ST(4) |
|
7958
|
4
|
|
|
|
|
|
; |
|
7959
|
|
|
|
|
|
|
} |
|
7960
|
|
|
|
|
|
|
#line 47 "./xsi/algorithm/LineIntersector.xsi" |
|
7961
|
|
|
|
|
|
|
if (!p4arg) THIS->computeIntersection(p1, p2, p3); |
|
7962
|
|
|
|
|
|
|
else { |
|
7963
|
|
|
|
|
|
|
auto& p4 = xs::in(p4arg); |
|
7964
|
|
|
|
|
|
|
THIS->computeIntersection(p1, p2, p3, p4); |
|
7965
|
|
|
|
|
|
|
} |
|
7966
|
|
|
|
|
|
|
#line 7967 "Geos.xs.cc" |
|
7967
|
5
|
|
|
|
|
|
PUTBACK; |
|
7968
|
5
|
|
|
|
|
|
return; |
|
7969
|
|
|
|
|
|
|
} |
|
7970
|
5
|
50
|
|
|
|
|
}); } |
|
7971
|
|
|
|
|
|
|
|
|
7972
|
|
|
|
|
|
|
|
|
7973
|
|
|
|
|
|
|
|
|
7974
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_toString) { xs::throw_guard(aTHX_ cv, [=]() |
|
7975
|
|
|
|
|
|
|
{ |
|
7976
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7977
|
1
|
50
|
|
|
|
|
if (items < 1) |
|
7978
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
7979
|
|
|
|
|
|
|
{ |
|
7980
|
2
|
|
|
|
|
|
std::string RETVAL; |
|
7981
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
7982
|
1
|
50
|
|
|
|
|
LineIntersector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7983
|
|
|
|
|
|
|
; |
|
7984
|
|
|
|
|
|
|
#line 54 "./xsi/algorithm/LineIntersector.xsi" |
|
7985
|
|
|
|
|
|
|
RETVAL = THIS->toString(); |
|
7986
|
|
|
|
|
|
|
#line 7987 "Geos.xs.cc" |
|
7987
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7988
|
|
|
|
|
|
|
} |
|
7989
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
7990
|
1
|
50
|
|
|
|
|
}); } |
|
7991
|
|
|
|
|
|
|
|
|
7992
|
|
|
|
|
|
|
|
|
7993
|
|
|
|
|
|
|
|
|
7994
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_getIntersectionNum) { xs::throw_guard(aTHX_ cv, [=]() |
|
7995
|
|
|
|
|
|
|
{ |
|
7996
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
7997
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
7998
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
7999
|
|
|
|
|
|
|
{ |
|
8000
|
|
|
|
|
|
|
int RETVAL; |
|
8001
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8002
|
1
|
50
|
|
|
|
|
LineIntersector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8003
|
|
|
|
|
|
|
; |
|
8004
|
|
|
|
|
|
|
#line 56 "./xsi/algorithm/LineIntersector.xsi" |
|
8005
|
|
|
|
|
|
|
RETVAL = THIS->getIntersectionNum(); |
|
8006
|
|
|
|
|
|
|
#line 8007 "Geos.xs.cc" |
|
8007
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
8008
|
|
|
|
|
|
|
} |
|
8009
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
8010
|
1
|
50
|
|
|
|
|
}); } |
|
8011
|
|
|
|
|
|
|
|
|
8012
|
|
|
|
|
|
|
|
|
8013
|
|
|
|
|
|
|
|
|
8014
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_isProper) { xs::throw_guard(aTHX_ cv, [=]() |
|
8015
|
|
|
|
|
|
|
{ |
|
8016
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8017
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
8018
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
8019
|
|
|
|
|
|
|
{ |
|
8020
|
|
|
|
|
|
|
bool RETVAL; |
|
8021
|
1
|
50
|
|
|
|
|
LineIntersector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8022
|
|
|
|
|
|
|
; |
|
8023
|
|
|
|
|
|
|
#line 58 "./xsi/algorithm/LineIntersector.xsi" |
|
8024
|
|
|
|
|
|
|
RETVAL = THIS->isProper(); |
|
8025
|
|
|
|
|
|
|
#line 8026 "Geos.xs.cc" |
|
8026
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
8027
|
|
|
|
|
|
|
} |
|
8028
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
8029
|
1
|
50
|
|
|
|
|
}); } |
|
8030
|
|
|
|
|
|
|
|
|
8031
|
|
|
|
|
|
|
|
|
8032
|
|
|
|
|
|
|
|
|
8033
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_getIndexAlongSegment) { xs::throw_guard(aTHX_ cv, [=]() |
|
8034
|
|
|
|
|
|
|
{ |
|
8035
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8036
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
8037
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, segmentIndex, intIndex"); |
|
8038
|
|
|
|
|
|
|
{ |
|
8039
|
|
|
|
|
|
|
int RETVAL; |
|
8040
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8041
|
1
|
50
|
|
|
|
|
LineIntersector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8042
|
|
|
|
|
|
|
; |
|
8043
|
1
|
50
|
|
|
|
|
int segmentIndex = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
8044
|
|
|
|
|
|
|
; |
|
8045
|
1
|
50
|
|
|
|
|
int intIndex = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
8046
|
|
|
|
|
|
|
; |
|
8047
|
|
|
|
|
|
|
#line 60 "./xsi/algorithm/LineIntersector.xsi" |
|
8048
|
|
|
|
|
|
|
RETVAL = THIS->getIndexAlongSegment(segmentIndex, intIndex); |
|
8049
|
|
|
|
|
|
|
#line 8050 "Geos.xs.cc" |
|
8050
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
8051
|
|
|
|
|
|
|
} |
|
8052
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
8053
|
1
|
50
|
|
|
|
|
}); } |
|
8054
|
|
|
|
|
|
|
|
|
8055
|
|
|
|
|
|
|
|
|
8056
|
|
|
|
|
|
|
|
|
8057
|
8
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_getEdgeDistance) { xs::throw_guard(aTHX_ cv, [=]() |
|
8058
|
|
|
|
|
|
|
{ |
|
8059
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8060
|
4
|
50
|
|
|
|
|
if (items != 3) |
|
8061
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, geomIndex, intIndex"); |
|
8062
|
|
|
|
|
|
|
{ |
|
8063
|
|
|
|
|
|
|
double RETVAL; |
|
8064
|
4
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8065
|
4
|
50
|
|
|
|
|
LineIntersector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8066
|
|
|
|
|
|
|
; |
|
8067
|
4
|
50
|
|
|
|
|
int geomIndex = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
8068
|
|
|
|
|
|
|
; |
|
8069
|
4
|
50
|
|
|
|
|
int intIndex = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
8070
|
|
|
|
|
|
|
; |
|
8071
|
|
|
|
|
|
|
#line 62 "./xsi/algorithm/LineIntersector.xsi" |
|
8072
|
|
|
|
|
|
|
RETVAL = THIS->getEdgeDistance(geomIndex, intIndex); |
|
8073
|
|
|
|
|
|
|
#line 8074 "Geos.xs.cc" |
|
8074
|
4
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
8075
|
|
|
|
|
|
|
} |
|
8076
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
8077
|
4
|
50
|
|
|
|
|
}); } |
|
8078
|
|
|
|
|
|
|
|
|
8079
|
|
|
|
|
|
|
|
|
8080
|
|
|
|
|
|
|
|
|
8081
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_getIntersectionAlongSegment) { xs::throw_guard(aTHX_ cv, [=]() |
|
8082
|
|
|
|
|
|
|
{ |
|
8083
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8084
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
8085
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, segmentIndex, intIndex"); |
|
8086
|
|
|
|
|
|
|
{ |
|
8087
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
8088
|
1
|
50
|
|
|
|
|
LineIntersector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8089
|
|
|
|
|
|
|
; |
|
8090
|
1
|
50
|
|
|
|
|
int segmentIndex = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
8091
|
|
|
|
|
|
|
; |
|
8092
|
1
|
50
|
|
|
|
|
int intIndex = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
8093
|
|
|
|
|
|
|
; |
|
8094
|
|
|
|
|
|
|
#line 65 "./xsi/algorithm/LineIntersector.xsi" |
|
8095
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
8096
|
|
|
|
|
|
|
RETVAL = new Coordinate(THIS->getIntersectionAlongSegment(segmentIndex, intIndex)); |
|
8097
|
|
|
|
|
|
|
#line 8098 "Geos.xs.cc" |
|
8098
|
|
|
|
|
|
|
{ |
|
8099
|
|
|
|
|
|
|
SV * RETVALSV; |
|
8100
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
8101
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
8102
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
8103
|
|
|
|
|
|
|
} |
|
8104
|
|
|
|
|
|
|
} |
|
8105
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
8106
|
1
|
50
|
|
|
|
|
}); } |
|
8107
|
|
|
|
|
|
|
|
|
8108
|
|
|
|
|
|
|
|
|
8109
|
|
|
|
|
|
|
|
|
8110
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Algorithm__LineIntersector_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
8111
|
|
|
|
|
|
|
{ |
|
8112
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8113
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
8114
|
|
|
|
|
|
|
{ |
|
8115
|
|
|
|
|
|
|
int RETVAL; |
|
8116
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8117
|
|
|
|
|
|
|
#line 68 "./xsi/algorithm/LineIntersector.xsi" |
|
8118
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
8119
|
|
|
|
|
|
|
#line 8120 "Geos.xs.cc" |
|
8120
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
8121
|
|
|
|
|
|
|
} |
|
8122
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
8123
|
0
|
0
|
|
|
|
|
}); } |
|
8124
|
|
|
|
|
|
|
|
|
8125
|
|
|
|
|
|
|
|
|
8126
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/algorithm/LineIntersector.xsi' */ |
|
8127
|
|
|
|
|
|
|
|
|
8128
|
|
|
|
|
|
|
|
|
8129
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding.xsi' from 'Geos.xs' */ |
|
8130
|
|
|
|
|
|
|
|
|
8131
|
|
|
|
|
|
|
|
|
8132
|
|
|
|
|
|
|
|
|
8133
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding_compareOrientedCoordinateArray) { xs::throw_guard(aTHX_ cv, [=]() |
|
8134
|
|
|
|
|
|
|
{ |
|
8135
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8136
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
8137
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "pts1, pts2"); |
|
8138
|
|
|
|
|
|
|
{ |
|
8139
|
|
|
|
|
|
|
int RETVAL; |
|
8140
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8141
|
2
|
50
|
|
|
|
|
Array pts1 = ST(0); |
|
8142
|
1
|
50
|
|
|
|
|
if (!pts1 && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
8143
|
0
|
|
|
|
|
|
; |
|
8144
|
2
|
50
|
|
|
|
|
Array pts2 = ST(1); |
|
8145
|
1
|
50
|
|
|
|
|
if (!pts2 && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
8146
|
0
|
|
|
|
|
|
; |
|
8147
|
|
|
|
|
|
|
#line 5 "./xsi/noding.xsi" |
|
8148
|
|
|
|
|
|
|
auto seq1 = Helper::convert_coords(pts1); |
|
8149
|
|
|
|
|
|
|
auto seq2 = Helper::convert_coords(pts2); |
|
8150
|
|
|
|
|
|
|
geos::noding::OrientedCoordinateArray oca{seq1}; |
|
8151
|
|
|
|
|
|
|
RETVAL = oca.compareTo(seq2); |
|
8152
|
|
|
|
|
|
|
#line 8153 "Geos.xs.cc" |
|
8153
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
8154
|
|
|
|
|
|
|
} |
|
8155
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
8156
|
1
|
50
|
|
|
|
|
}); } |
|
8157
|
|
|
|
|
|
|
|
|
8158
|
|
|
|
|
|
|
|
|
8159
|
|
|
|
|
|
|
|
|
8160
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding_octant) { xs::throw_guard(aTHX_ cv, [=]() |
|
8161
|
|
|
|
|
|
|
{ |
|
8162
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8163
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
8164
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "arg1, arg2"); |
|
8165
|
|
|
|
|
|
|
{ |
|
8166
|
|
|
|
|
|
|
int RETVAL; |
|
8167
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8168
|
4
|
|
|
|
|
|
Sv arg1 = ST(0) |
|
8169
|
|
|
|
|
|
|
; |
|
8170
|
2
|
|
|
|
|
|
SV* arg2 = ST(1) |
|
8171
|
|
|
|
|
|
|
; |
|
8172
|
|
|
|
|
|
|
#line 12 "./xsi/noding.xsi" |
|
8173
|
|
|
|
|
|
|
if (arg1.is_object_ref() && Object(arg1).stash().name() == "Geo::Geos::Coordinate") { |
|
8174
|
|
|
|
|
|
|
auto& c1 = xs::in(arg1); |
|
8175
|
|
|
|
|
|
|
auto& c2 = xs::in(arg2); |
|
8176
|
|
|
|
|
|
|
RETVAL = Octant::octant(&c1, &c2); |
|
8177
|
|
|
|
|
|
|
} else { |
|
8178
|
|
|
|
|
|
|
if(!arg1) throw("undef not allowed"); |
|
8179
|
|
|
|
|
|
|
if(!arg2) throw("undef not allowed"); |
|
8180
|
|
|
|
|
|
|
double dx = SvNV(arg1); |
|
8181
|
|
|
|
|
|
|
double dy = SvNV(arg2); |
|
8182
|
|
|
|
|
|
|
RETVAL = Octant::octant(dx, dy); |
|
8183
|
|
|
|
|
|
|
} |
|
8184
|
|
|
|
|
|
|
#line 8185 "Geos.xs.cc" |
|
8185
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
8186
|
|
|
|
|
|
|
} |
|
8187
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
8188
|
2
|
50
|
|
|
|
|
}); } |
|
8189
|
|
|
|
|
|
|
|
|
8190
|
|
|
|
|
|
|
|
|
8191
|
|
|
|
|
|
|
|
|
8192
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding_checkNodingValid) { xs::throw_guard(aTHX_ cv, [=]() |
|
8193
|
|
|
|
|
|
|
{ |
|
8194
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8195
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
8196
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "segmentStrigns"); |
|
8197
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
8198
|
1
|
|
|
|
|
|
SP -= items; |
|
8199
|
|
|
|
|
|
|
{ |
|
8200
|
2
|
50
|
|
|
|
|
Array segmentStrigns = ST(0); |
|
8201
|
1
|
50
|
|
|
|
|
if (!segmentStrigns && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
8202
|
0
|
|
|
|
|
|
; |
|
8203
|
|
|
|
|
|
|
#line 26 "./xsi/noding.xsi" |
|
8204
|
|
|
|
|
|
|
std::vector v; |
|
8205
|
|
|
|
|
|
|
v.reserve(segmentStrigns.size()); |
|
8206
|
|
|
|
|
|
|
|
|
8207
|
|
|
|
|
|
|
for (auto it: segmentStrigns) { |
|
8208
|
|
|
|
|
|
|
SegmentString& ss = xs::in(it); |
|
8209
|
|
|
|
|
|
|
v.push_back(&ss); |
|
8210
|
|
|
|
|
|
|
} |
|
8211
|
|
|
|
|
|
|
NodingValidator nv(v); |
|
8212
|
|
|
|
|
|
|
nv.checkValid(); |
|
8213
|
|
|
|
|
|
|
#line 8214 "Geos.xs.cc" |
|
8214
|
0
|
|
|
|
|
|
PUTBACK; |
|
8215
|
0
|
|
|
|
|
|
return; |
|
8216
|
|
|
|
|
|
|
} |
|
8217
|
1
|
0
|
|
|
|
|
}); } |
|
8218
|
|
|
|
|
|
|
|
|
8219
|
|
|
|
|
|
|
|
|
8220
|
|
|
|
|
|
|
|
|
8221
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding_fastCheckNodingValid) { xs::throw_guard(aTHX_ cv, [=]() |
|
8222
|
|
|
|
|
|
|
{ |
|
8223
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8224
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
8225
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "segmentStrigns"); |
|
8226
|
|
|
|
|
|
|
{ |
|
8227
|
5
|
|
|
|
|
|
std::string RETVAL; |
|
8228
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8229
|
6
|
50
|
|
|
|
|
Array segmentStrigns = ST(0); |
|
|
|
100
|
|
|
|
|
|
|
8230
|
3
|
50
|
|
|
|
|
if (!segmentStrigns && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
8231
|
0
|
|
|
|
|
|
; |
|
8232
|
|
|
|
|
|
|
#line 38 "./xsi/noding.xsi" |
|
8233
|
|
|
|
|
|
|
std::vector v; |
|
8234
|
|
|
|
|
|
|
v.reserve(segmentStrigns.size()); |
|
8235
|
|
|
|
|
|
|
|
|
8236
|
|
|
|
|
|
|
for (auto it: segmentStrigns) { |
|
8237
|
|
|
|
|
|
|
SegmentString& ss = xs::in(it); |
|
8238
|
|
|
|
|
|
|
v.push_back(&ss); |
|
8239
|
|
|
|
|
|
|
} |
|
8240
|
|
|
|
|
|
|
FastNodingValidator fnv{v}; |
|
8241
|
|
|
|
|
|
|
|
|
8242
|
|
|
|
|
|
|
if (GIMME_V == G_VOID) { |
|
8243
|
|
|
|
|
|
|
fnv.checkValid(); |
|
8244
|
|
|
|
|
|
|
XSRETURN_UNDEF; |
|
8245
|
|
|
|
|
|
|
} |
|
8246
|
|
|
|
|
|
|
else { |
|
8247
|
|
|
|
|
|
|
if (fnv.isValid()) XSRETURN_UNDEF; |
|
8248
|
|
|
|
|
|
|
else RETVAL = fnv.getErrorMessage(); |
|
8249
|
|
|
|
|
|
|
} |
|
8250
|
|
|
|
|
|
|
#line 8251 "Geos.xs.cc" |
|
8251
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
8252
|
|
|
|
|
|
|
} |
|
8253
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
8254
|
3
|
50
|
|
|
|
|
}); } |
|
8255
|
|
|
|
|
|
|
|
|
8256
|
|
|
|
|
|
|
|
|
8257
|
|
|
|
|
|
|
|
|
8258
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding_compareSegmentPoints) { xs::throw_guard(aTHX_ cv, [=]() |
|
8259
|
|
|
|
|
|
|
{ |
|
8260
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8261
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
8262
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "octant, p1, p2"); |
|
8263
|
|
|
|
|
|
|
{ |
|
8264
|
|
|
|
|
|
|
int RETVAL; |
|
8265
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8266
|
1
|
50
|
|
|
|
|
int octant = (int)SvIV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
8267
|
|
|
|
|
|
|
; |
|
8268
|
1
|
50
|
|
|
|
|
Coordinate& p1 = xs::in(aTHX_ ST(1)); |
|
8269
|
|
|
|
|
|
|
; |
|
8270
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(aTHX_ ST(2)); |
|
8271
|
|
|
|
|
|
|
; |
|
8272
|
|
|
|
|
|
|
#line 58 "./xsi/noding.xsi" |
|
8273
|
|
|
|
|
|
|
RETVAL = SegmentPointComparator::compare(octant, p1, p2); |
|
8274
|
|
|
|
|
|
|
#line 8275 "Geos.xs.cc" |
|
8275
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
8276
|
|
|
|
|
|
|
} |
|
8277
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
8278
|
1
|
50
|
|
|
|
|
}); } |
|
8279
|
|
|
|
|
|
|
|
|
8280
|
|
|
|
|
|
|
|
|
8281
|
|
|
|
|
|
|
|
|
8282
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding_extractSegmentStrings) { xs::throw_guard(aTHX_ cv, [=]() |
|
8283
|
|
|
|
|
|
|
{ |
|
8284
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8285
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
8286
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g"); |
|
8287
|
|
|
|
|
|
|
{ |
|
8288
|
2
|
|
|
|
|
|
Array RETVAL; |
|
8289
|
1
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(0)); |
|
8290
|
|
|
|
|
|
|
; |
|
8291
|
|
|
|
|
|
|
#line 62 "./xsi/noding.xsi" |
|
8292
|
|
|
|
|
|
|
SegmentString::ConstVect v; |
|
8293
|
|
|
|
|
|
|
geos::noding::SegmentStringUtil::extractSegmentStrings(&g, v); |
|
8294
|
|
|
|
|
|
|
|
|
8295
|
|
|
|
|
|
|
Array result = xs::Array::create(v.size()); |
|
8296
|
|
|
|
|
|
|
for(auto ss: v) { |
|
8297
|
|
|
|
|
|
|
auto it = xs::out(const_cast(ss)); |
|
8298
|
|
|
|
|
|
|
result.push(it); |
|
8299
|
|
|
|
|
|
|
}; |
|
8300
|
|
|
|
|
|
|
RETVAL = result; |
|
8301
|
|
|
|
|
|
|
#line 8302 "Geos.xs.cc" |
|
8302
|
|
|
|
|
|
|
{ |
|
8303
|
|
|
|
|
|
|
SV * RETVALSV; |
|
8304
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
8305
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
8306
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
8307
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
8308
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
8309
|
|
|
|
|
|
|
} |
|
8310
|
|
|
|
|
|
|
} |
|
8311
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
8312
|
1
|
50
|
|
|
|
|
}); } |
|
8313
|
|
|
|
|
|
|
|
|
8314
|
|
|
|
|
|
|
|
|
8315
|
|
|
|
|
|
|
|
|
8316
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding_intersects) { xs::throw_guard(aTHX_ cv, [=]() |
|
8317
|
|
|
|
|
|
|
{ |
|
8318
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8319
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
8320
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "baseSegmentStrings, segmentStrings, intDetector= NULL"); |
|
8321
|
|
|
|
|
|
|
{ |
|
8322
|
|
|
|
|
|
|
bool RETVAL; |
|
8323
|
4
|
50
|
|
|
|
|
Array baseSegmentStrings = ST(0); |
|
8324
|
2
|
50
|
|
|
|
|
if (!baseSegmentStrings && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
8325
|
0
|
|
|
|
|
|
; |
|
8326
|
4
|
50
|
|
|
|
|
Array segmentStrings = ST(1); |
|
8327
|
2
|
50
|
|
|
|
|
if (!segmentStrings && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
8328
|
0
|
|
|
|
|
|
; |
|
8329
|
|
|
|
|
|
|
SV* intDetector; |
|
8330
|
|
|
|
|
|
|
|
|
8331
|
2
|
100
|
|
|
|
|
if (items < 3) |
|
8332
|
1
|
|
|
|
|
|
intDetector = NULL; |
|
8333
|
|
|
|
|
|
|
else { |
|
8334
|
1
|
|
|
|
|
|
intDetector = ST(2) |
|
8335
|
1
|
|
|
|
|
|
; |
|
8336
|
|
|
|
|
|
|
} |
|
8337
|
|
|
|
|
|
|
#line 74 "./xsi/noding.xsi" |
|
8338
|
|
|
|
|
|
|
SegmentString::ConstVect vb; |
|
8339
|
|
|
|
|
|
|
for(auto it: baseSegmentStrings) vb.push_back(&xs::in(it)); |
|
8340
|
|
|
|
|
|
|
|
|
8341
|
|
|
|
|
|
|
SegmentString::ConstVect v; |
|
8342
|
|
|
|
|
|
|
for(auto it: segmentStrings) v.push_back(&xs::in(it)); |
|
8343
|
|
|
|
|
|
|
|
|
8344
|
|
|
|
|
|
|
FastSegmentSetIntersectionFinder finder{&vb}; |
|
8345
|
|
|
|
|
|
|
if (!intDetector) RETVAL = finder.intersects(&v); |
|
8346
|
|
|
|
|
|
|
else { |
|
8347
|
|
|
|
|
|
|
auto& id = xs::in(intDetector); |
|
8348
|
|
|
|
|
|
|
RETVAL = finder.intersects(&v, &id); |
|
8349
|
|
|
|
|
|
|
} |
|
8350
|
|
|
|
|
|
|
#line 8351 "Geos.xs.cc" |
|
8351
|
2
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
8352
|
|
|
|
|
|
|
} |
|
8353
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
8354
|
2
|
50
|
|
|
|
|
}); } |
|
8355
|
|
|
|
|
|
|
|
|
8356
|
|
|
|
|
|
|
|
|
8357
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding.xsi' */ |
|
8358
|
|
|
|
|
|
|
|
|
8359
|
|
|
|
|
|
|
|
|
8360
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/SegmentString.xsi' from 'Geos.xs' */ |
|
8361
|
|
|
|
|
|
|
|
|
8362
|
|
|
|
|
|
|
|
|
8363
|
|
|
|
|
|
|
|
|
8364
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentString_size) { xs::throw_guard(aTHX_ cv, [=]() |
|
8365
|
|
|
|
|
|
|
{ |
|
8366
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8367
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
8368
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
8369
|
|
|
|
|
|
|
{ |
|
8370
|
|
|
|
|
|
|
unsigned int RETVAL; |
|
8371
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8372
|
2
|
50
|
|
|
|
|
SegmentString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8373
|
|
|
|
|
|
|
; |
|
8374
|
|
|
|
|
|
|
#line 4 "./xsi/noding/SegmentString.xsi" |
|
8375
|
|
|
|
|
|
|
RETVAL = THIS->size(); |
|
8376
|
|
|
|
|
|
|
#line 8377 "Geos.xs.cc" |
|
8377
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
8378
|
|
|
|
|
|
|
} |
|
8379
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
8380
|
2
|
50
|
|
|
|
|
}); } |
|
8381
|
|
|
|
|
|
|
|
|
8382
|
|
|
|
|
|
|
|
|
8383
|
|
|
|
|
|
|
|
|
8384
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentString_getCoordinate) { xs::throw_guard(aTHX_ cv, [=]() |
|
8385
|
|
|
|
|
|
|
{ |
|
8386
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8387
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
8388
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, i"); |
|
8389
|
|
|
|
|
|
|
{ |
|
8390
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
8391
|
2
|
50
|
|
|
|
|
SegmentString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8392
|
|
|
|
|
|
|
; |
|
8393
|
2
|
50
|
|
|
|
|
unsigned int i = (unsigned int)SvUV(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
8394
|
|
|
|
|
|
|
; |
|
8395
|
|
|
|
|
|
|
#line 7 "./xsi/noding/SegmentString.xsi" |
|
8396
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
8397
|
|
|
|
|
|
|
RETVAL = new Coordinate(THIS->getCoordinate(i)); |
|
8398
|
|
|
|
|
|
|
#line 8399 "Geos.xs.cc" |
|
8399
|
|
|
|
|
|
|
{ |
|
8400
|
|
|
|
|
|
|
SV * RETVALSV; |
|
8401
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
8402
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
8403
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
8404
|
|
|
|
|
|
|
} |
|
8405
|
|
|
|
|
|
|
} |
|
8406
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
8407
|
2
|
50
|
|
|
|
|
}); } |
|
8408
|
|
|
|
|
|
|
|
|
8409
|
|
|
|
|
|
|
|
|
8410
|
|
|
|
|
|
|
|
|
8411
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentString_getCoordinates) { xs::throw_guard(aTHX_ cv, [=]() |
|
8412
|
|
|
|
|
|
|
{ |
|
8413
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8414
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
8415
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
8416
|
|
|
|
|
|
|
{ |
|
8417
|
6
|
|
|
|
|
|
Array RETVAL; |
|
8418
|
3
|
50
|
|
|
|
|
SegmentString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8419
|
|
|
|
|
|
|
; |
|
8420
|
|
|
|
|
|
|
#line 11 "./xsi/noding/SegmentString.xsi" |
|
8421
|
|
|
|
|
|
|
auto seq = THIS->getCoordinates(); |
|
8422
|
|
|
|
|
|
|
RETVAL = Helper::convert_copy(seq); |
|
8423
|
|
|
|
|
|
|
#line 8424 "Geos.xs.cc" |
|
8424
|
|
|
|
|
|
|
{ |
|
8425
|
|
|
|
|
|
|
SV * RETVALSV; |
|
8426
|
3
|
|
|
|
|
|
RETVALSV = NULL; |
|
8427
|
3
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
8428
|
3
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
8429
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
8430
|
3
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
8431
|
|
|
|
|
|
|
} |
|
8432
|
|
|
|
|
|
|
} |
|
8433
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
8434
|
3
|
50
|
|
|
|
|
}); } |
|
8435
|
|
|
|
|
|
|
|
|
8436
|
|
|
|
|
|
|
|
|
8437
|
|
|
|
|
|
|
|
|
8438
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentString_isClosed) { xs::throw_guard(aTHX_ cv, [=]() |
|
8439
|
|
|
|
|
|
|
{ |
|
8440
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8441
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
8442
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
8443
|
|
|
|
|
|
|
{ |
|
8444
|
|
|
|
|
|
|
bool RETVAL; |
|
8445
|
2
|
50
|
|
|
|
|
SegmentString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8446
|
|
|
|
|
|
|
; |
|
8447
|
|
|
|
|
|
|
#line 15 "./xsi/noding/SegmentString.xsi" |
|
8448
|
|
|
|
|
|
|
RETVAL = THIS->isClosed(); |
|
8449
|
|
|
|
|
|
|
#line 8450 "Geos.xs.cc" |
|
8450
|
2
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
8451
|
|
|
|
|
|
|
} |
|
8452
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
8453
|
2
|
50
|
|
|
|
|
}); } |
|
8454
|
|
|
|
|
|
|
|
|
8455
|
|
|
|
|
|
|
|
|
8456
|
|
|
|
|
|
|
|
|
8457
|
24
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentString_toString) { xs::throw_guard(aTHX_ cv, [=]() |
|
8458
|
|
|
|
|
|
|
{ |
|
8459
|
12
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8460
|
12
|
50
|
|
|
|
|
if (items < 1) |
|
8461
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
8462
|
|
|
|
|
|
|
{ |
|
8463
|
24
|
|
|
|
|
|
std::string RETVAL; |
|
8464
|
12
|
100
|
|
|
|
|
dXSTARG; |
|
|
|
50
|
|
|
|
|
|
|
8465
|
12
|
50
|
|
|
|
|
SegmentString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8466
|
|
|
|
|
|
|
; |
|
8467
|
|
|
|
|
|
|
#line 18 "./xsi/noding/SegmentString.xsi" |
|
8468
|
|
|
|
|
|
|
std::ostringstream out; |
|
8469
|
|
|
|
|
|
|
out << *THIS; |
|
8470
|
|
|
|
|
|
|
RETVAL = out.str(); |
|
8471
|
|
|
|
|
|
|
#line 8472 "Geos.xs.cc" |
|
8472
|
12
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8473
|
|
|
|
|
|
|
} |
|
8474
|
12
|
|
|
|
|
|
XSRETURN(1); |
|
8475
|
12
|
50
|
|
|
|
|
}); } |
|
8476
|
|
|
|
|
|
|
|
|
8477
|
|
|
|
|
|
|
|
|
8478
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/SegmentString.xsi' */ |
|
8479
|
|
|
|
|
|
|
|
|
8480
|
|
|
|
|
|
|
|
|
8481
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/SegmentNode.xsi' from 'Geos.xs' */ |
|
8482
|
|
|
|
|
|
|
|
|
8483
|
|
|
|
|
|
|
|
|
8484
|
|
|
|
|
|
|
|
|
8485
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentNode_isInterior) { xs::throw_guard(aTHX_ cv, [=]() |
|
8486
|
|
|
|
|
|
|
{ |
|
8487
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8488
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
8489
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
8490
|
|
|
|
|
|
|
{ |
|
8491
|
|
|
|
|
|
|
bool RETVAL; |
|
8492
|
2
|
50
|
|
|
|
|
SegmentNode* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8493
|
|
|
|
|
|
|
; |
|
8494
|
|
|
|
|
|
|
#line 4 "./xsi/noding/SegmentNode.xsi" |
|
8495
|
|
|
|
|
|
|
RETVAL = THIS->isInterior(); |
|
8496
|
|
|
|
|
|
|
#line 8497 "Geos.xs.cc" |
|
8497
|
2
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
8498
|
|
|
|
|
|
|
} |
|
8499
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
8500
|
2
|
50
|
|
|
|
|
}); } |
|
8501
|
|
|
|
|
|
|
|
|
8502
|
|
|
|
|
|
|
|
|
8503
|
|
|
|
|
|
|
|
|
8504
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentNode_isEndPoint) { xs::throw_guard(aTHX_ cv, [=]() |
|
8505
|
|
|
|
|
|
|
{ |
|
8506
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8507
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
8508
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, maxSegmentIndex"); |
|
8509
|
|
|
|
|
|
|
{ |
|
8510
|
|
|
|
|
|
|
bool RETVAL; |
|
8511
|
1
|
50
|
|
|
|
|
SegmentNode* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8512
|
|
|
|
|
|
|
; |
|
8513
|
1
|
50
|
|
|
|
|
unsigned int maxSegmentIndex = (unsigned int)SvUV(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
8514
|
|
|
|
|
|
|
; |
|
8515
|
|
|
|
|
|
|
#line 6 "./xsi/noding/SegmentNode.xsi" |
|
8516
|
|
|
|
|
|
|
RETVAL = THIS->isEndPoint(maxSegmentIndex); |
|
8517
|
|
|
|
|
|
|
#line 8518 "Geos.xs.cc" |
|
8518
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
8519
|
|
|
|
|
|
|
} |
|
8520
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
8521
|
1
|
50
|
|
|
|
|
}); } |
|
8522
|
|
|
|
|
|
|
|
|
8523
|
|
|
|
|
|
|
|
|
8524
|
|
|
|
|
|
|
|
|
8525
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentNode_compareTo) { xs::throw_guard(aTHX_ cv, [=]() |
|
8526
|
|
|
|
|
|
|
{ |
|
8527
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8528
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
8529
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
8530
|
|
|
|
|
|
|
{ |
|
8531
|
|
|
|
|
|
|
int RETVAL; |
|
8532
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8533
|
1
|
50
|
|
|
|
|
SegmentNode* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8534
|
|
|
|
|
|
|
; |
|
8535
|
1
|
50
|
|
|
|
|
SegmentNode& other = xs::in(aTHX_ ST(1)); |
|
8536
|
|
|
|
|
|
|
; |
|
8537
|
|
|
|
|
|
|
#line 8 "./xsi/noding/SegmentNode.xsi" |
|
8538
|
|
|
|
|
|
|
RETVAL = THIS->compareTo(other); |
|
8539
|
|
|
|
|
|
|
#line 8540 "Geos.xs.cc" |
|
8540
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
8541
|
|
|
|
|
|
|
} |
|
8542
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
8543
|
1
|
50
|
|
|
|
|
}); } |
|
8544
|
|
|
|
|
|
|
|
|
8545
|
|
|
|
|
|
|
|
|
8546
|
|
|
|
|
|
|
|
|
8547
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentNode_toString) { xs::throw_guard(aTHX_ cv, [=]() |
|
8548
|
|
|
|
|
|
|
{ |
|
8549
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8550
|
3
|
50
|
|
|
|
|
if (items < 1) |
|
8551
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
8552
|
|
|
|
|
|
|
{ |
|
8553
|
6
|
|
|
|
|
|
std::string RETVAL; |
|
8554
|
3
|
100
|
|
|
|
|
dXSTARG; |
|
|
|
50
|
|
|
|
|
|
|
8555
|
3
|
50
|
|
|
|
|
SegmentNode* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8556
|
|
|
|
|
|
|
; |
|
8557
|
|
|
|
|
|
|
#line 11 "./xsi/noding/SegmentNode.xsi" |
|
8558
|
|
|
|
|
|
|
std::ostringstream out; |
|
8559
|
|
|
|
|
|
|
out << *THIS; |
|
8560
|
|
|
|
|
|
|
RETVAL = out.str(); |
|
8561
|
|
|
|
|
|
|
#line 8562 "Geos.xs.cc" |
|
8562
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8563
|
|
|
|
|
|
|
} |
|
8564
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
8565
|
3
|
50
|
|
|
|
|
}); } |
|
8566
|
|
|
|
|
|
|
|
|
8567
|
|
|
|
|
|
|
|
|
8568
|
|
|
|
|
|
|
|
|
8569
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentNode_coord) { xs::throw_guard(aTHX_ cv, [=]() |
|
8570
|
|
|
|
|
|
|
{ |
|
8571
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8572
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
8573
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
8574
|
|
|
|
|
|
|
{ |
|
8575
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
8576
|
2
|
50
|
|
|
|
|
SegmentNode* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8577
|
|
|
|
|
|
|
; |
|
8578
|
|
|
|
|
|
|
#line 17 "./xsi/noding/SegmentNode.xsi" |
|
8579
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
8580
|
|
|
|
|
|
|
RETVAL = new Coordinate(THIS->coord); |
|
8581
|
|
|
|
|
|
|
#line 8582 "Geos.xs.cc" |
|
8582
|
|
|
|
|
|
|
{ |
|
8583
|
|
|
|
|
|
|
SV * RETVALSV; |
|
8584
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
8585
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
8586
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
8587
|
|
|
|
|
|
|
} |
|
8588
|
|
|
|
|
|
|
} |
|
8589
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
8590
|
2
|
50
|
|
|
|
|
}); } |
|
8591
|
|
|
|
|
|
|
|
|
8592
|
|
|
|
|
|
|
|
|
8593
|
|
|
|
|
|
|
|
|
8594
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentNode_segmentIndex) { xs::throw_guard(aTHX_ cv, [=]() |
|
8595
|
|
|
|
|
|
|
{ |
|
8596
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8597
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
8598
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
8599
|
|
|
|
|
|
|
{ |
|
8600
|
|
|
|
|
|
|
unsigned int RETVAL; |
|
8601
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8602
|
3
|
50
|
|
|
|
|
SegmentNode* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8603
|
|
|
|
|
|
|
; |
|
8604
|
|
|
|
|
|
|
#line 20 "./xsi/noding/SegmentNode.xsi" |
|
8605
|
|
|
|
|
|
|
RETVAL = THIS->segmentIndex; |
|
8606
|
|
|
|
|
|
|
#line 8607 "Geos.xs.cc" |
|
8607
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
8608
|
|
|
|
|
|
|
} |
|
8609
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
8610
|
3
|
50
|
|
|
|
|
}); } |
|
8611
|
|
|
|
|
|
|
|
|
8612
|
|
|
|
|
|
|
|
|
8613
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/SegmentNode.xsi' */ |
|
8614
|
|
|
|
|
|
|
|
|
8615
|
|
|
|
|
|
|
|
|
8616
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/NodedSegmentString.xsi' from 'Geos.xs' */ |
|
8617
|
|
|
|
|
|
|
|
|
8618
|
|
|
|
|
|
|
|
|
8619
|
|
|
|
|
|
|
|
|
8620
|
30
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__NodedSegmentString_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
8621
|
|
|
|
|
|
|
{ |
|
8622
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8623
|
15
|
50
|
|
|
|
|
if (items != 2) |
|
8624
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, coords"); |
|
8625
|
|
|
|
|
|
|
{ |
|
8626
|
|
|
|
|
|
|
NodedSegmentString * RETVAL; |
|
8627
|
30
|
50
|
|
|
|
|
Array coords = ST(1); |
|
8628
|
15
|
50
|
|
|
|
|
if (!coords && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
8629
|
0
|
|
|
|
|
|
; |
|
8630
|
|
|
|
|
|
|
#line 5 "./xsi/noding/NodedSegmentString.xsi" |
|
8631
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
8632
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(coords); |
|
8633
|
|
|
|
|
|
|
auto v = new NodedSegmentString(seq.clone(), NULL); |
|
8634
|
|
|
|
|
|
|
RETVAL = v; |
|
8635
|
|
|
|
|
|
|
#line 8636 "Geos.xs.cc" |
|
8636
|
|
|
|
|
|
|
{ |
|
8637
|
|
|
|
|
|
|
SV * RETVALSV; |
|
8638
|
15
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
8639
|
15
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
8640
|
15
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
8641
|
|
|
|
|
|
|
} |
|
8642
|
|
|
|
|
|
|
} |
|
8643
|
15
|
|
|
|
|
|
XSRETURN(1); |
|
8644
|
15
|
50
|
|
|
|
|
}); } |
|
8645
|
|
|
|
|
|
|
|
|
8646
|
|
|
|
|
|
|
|
|
8647
|
|
|
|
|
|
|
|
|
8648
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__NodedSegmentString_addIntersectionNode) { xs::throw_guard(aTHX_ cv, [=]() |
|
8649
|
|
|
|
|
|
|
{ |
|
8650
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8651
|
3
|
50
|
|
|
|
|
if (items != 3) |
|
8652
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, c, segmentIndex"); |
|
8653
|
|
|
|
|
|
|
{ |
|
8654
|
6
|
|
|
|
|
|
Sv RETVAL; |
|
8655
|
3
|
50
|
|
|
|
|
NodedSegmentString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8656
|
|
|
|
|
|
|
; |
|
8657
|
3
|
50
|
|
|
|
|
Coordinate& c = xs::in(aTHX_ ST(1)); |
|
8658
|
|
|
|
|
|
|
; |
|
8659
|
3
|
50
|
|
|
|
|
std::size_t segmentIndex = xs::in(aTHX_ ST(2)); |
|
8660
|
|
|
|
|
|
|
; |
|
8661
|
|
|
|
|
|
|
#line 11 "./xsi/noding/NodedSegmentString.xsi" |
|
8662
|
|
|
|
|
|
|
auto* node = THIS->addIntersectionNode(&c, segmentIndex); |
|
8663
|
|
|
|
|
|
|
Sv wrapped = xs::out(node); |
|
8664
|
|
|
|
|
|
|
Object obj{ST(0)}; |
|
8665
|
|
|
|
|
|
|
wrapped.payload_attach(obj.detach(), &payload_marker); |
|
8666
|
|
|
|
|
|
|
RETVAL = wrapped; |
|
8667
|
|
|
|
|
|
|
#line 8668 "Geos.xs.cc" |
|
8668
|
|
|
|
|
|
|
{ |
|
8669
|
|
|
|
|
|
|
SV * RETVALSV; |
|
8670
|
3
|
|
|
|
|
|
RETVALSV = NULL; |
|
8671
|
3
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
8672
|
3
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
8673
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
8674
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
8675
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
8676
|
|
|
|
|
|
|
case SVt_PVCV: |
|
8677
|
|
|
|
|
|
|
case SVt_PVIO: |
|
8678
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
8679
|
0
|
|
|
|
|
|
break; |
|
8680
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
8681
|
|
|
|
|
|
|
} |
|
8682
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
8683
|
3
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
8684
|
|
|
|
|
|
|
} |
|
8685
|
|
|
|
|
|
|
} |
|
8686
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
8687
|
3
|
50
|
|
|
|
|
}); } |
|
8688
|
|
|
|
|
|
|
|
|
8689
|
|
|
|
|
|
|
|
|
8690
|
|
|
|
|
|
|
|
|
8691
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__NodedSegmentString_getSegmentOctant) { xs::throw_guard(aTHX_ cv, [=]() |
|
8692
|
|
|
|
|
|
|
{ |
|
8693
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8694
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
8695
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, index"); |
|
8696
|
|
|
|
|
|
|
{ |
|
8697
|
|
|
|
|
|
|
int RETVAL; |
|
8698
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8699
|
0
|
0
|
|
|
|
|
NodedSegmentString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8700
|
|
|
|
|
|
|
; |
|
8701
|
0
|
0
|
|
|
|
|
unsigned int index = (unsigned int)SvUV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
8702
|
|
|
|
|
|
|
; |
|
8703
|
|
|
|
|
|
|
#line 18 "./xsi/noding/NodedSegmentString.xsi" |
|
8704
|
|
|
|
|
|
|
RETVAL = THIS->getSegmentOctant(index); |
|
8705
|
|
|
|
|
|
|
#line 8706 "Geos.xs.cc" |
|
8706
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
8707
|
|
|
|
|
|
|
} |
|
8708
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
8709
|
0
|
0
|
|
|
|
|
}); } |
|
8710
|
|
|
|
|
|
|
|
|
8711
|
|
|
|
|
|
|
|
|
8712
|
|
|
|
|
|
|
|
|
8713
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__NodedSegmentString_addIntersections) { xs::throw_guard(aTHX_ cv, [=]() |
|
8714
|
|
|
|
|
|
|
{ |
|
8715
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8716
|
1
|
50
|
|
|
|
|
if (items != 4) |
|
8717
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, li, segmentIndex, geomIndex"); |
|
8718
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
8719
|
1
|
|
|
|
|
|
SP -= items; |
|
8720
|
|
|
|
|
|
|
{ |
|
8721
|
1
|
50
|
|
|
|
|
NodedSegmentString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8722
|
|
|
|
|
|
|
; |
|
8723
|
1
|
|
|
|
|
|
LineIntersector& li = xs::in(aTHX_ ST(1)); |
|
8724
|
|
|
|
|
|
|
; |
|
8725
|
1
|
50
|
|
|
|
|
unsigned int segmentIndex = (unsigned int)SvUV(ST(2)) |
|
8726
|
|
|
|
|
|
|
; |
|
8727
|
1
|
50
|
|
|
|
|
int geomIndex = (int)SvIV(ST(3)) |
|
8728
|
|
|
|
|
|
|
; |
|
8729
|
|
|
|
|
|
|
#line 21 "./xsi/noding/NodedSegmentString.xsi" |
|
8730
|
|
|
|
|
|
|
THIS->addIntersections(&li, segmentIndex, geomIndex); |
|
8731
|
|
|
|
|
|
|
#line 8732 "Geos.xs.cc" |
|
8732
|
1
|
|
|
|
|
|
PUTBACK; |
|
8733
|
1
|
|
|
|
|
|
return; |
|
8734
|
|
|
|
|
|
|
} |
|
8735
|
1
|
50
|
|
|
|
|
}); } |
|
8736
|
|
|
|
|
|
|
|
|
8737
|
|
|
|
|
|
|
|
|
8738
|
|
|
|
|
|
|
|
|
8739
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__NodedSegmentString_addIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
8740
|
|
|
|
|
|
|
{ |
|
8741
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8742
|
2
|
50
|
|
|
|
|
if (items < 3 || items > 5) |
|
|
|
50
|
|
|
|
|
|
|
8743
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1, segmentIndex, arg3= NULL, arg4= NULL"); |
|
8744
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
8745
|
2
|
|
|
|
|
|
SP -= items; |
|
8746
|
|
|
|
|
|
|
{ |
|
8747
|
2
|
50
|
|
|
|
|
NodedSegmentString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8748
|
|
|
|
|
|
|
; |
|
8749
|
4
|
50
|
|
|
|
|
Object arg1 = ST(1); |
|
8750
|
2
|
50
|
|
|
|
|
if (!arg1 && SvOK(ST(1))) throw "arg is not a blessed reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
8751
|
0
|
|
|
|
|
|
; |
|
8752
|
2
|
50
|
|
|
|
|
unsigned int segmentIndex = (unsigned int)SvUV(ST(2)) |
|
|
|
50
|
|
|
|
|
|
|
8753
|
|
|
|
|
|
|
; |
|
8754
|
|
|
|
|
|
|
SV* arg3; |
|
8755
|
|
|
|
|
|
|
SV* arg4; |
|
8756
|
|
|
|
|
|
|
|
|
8757
|
2
|
100
|
|
|
|
|
if (items < 4) |
|
8758
|
1
|
|
|
|
|
|
arg3 = NULL; |
|
8759
|
|
|
|
|
|
|
else { |
|
8760
|
1
|
|
|
|
|
|
arg3 = ST(3) |
|
8761
|
1
|
|
|
|
|
|
; |
|
8762
|
|
|
|
|
|
|
} |
|
8763
|
|
|
|
|
|
|
|
|
8764
|
2
|
100
|
|
|
|
|
if (items < 5) |
|
8765
|
1
|
|
|
|
|
|
arg4 = NULL; |
|
8766
|
|
|
|
|
|
|
else { |
|
8767
|
1
|
|
|
|
|
|
arg4 = ST(4) |
|
8768
|
1
|
|
|
|
|
|
; |
|
8769
|
|
|
|
|
|
|
} |
|
8770
|
|
|
|
|
|
|
#line 25 "./xsi/noding/NodedSegmentString.xsi" |
|
8771
|
|
|
|
|
|
|
if (!arg3) { |
|
8772
|
|
|
|
|
|
|
auto& c = xs::in(arg1); |
|
8773
|
|
|
|
|
|
|
THIS->addIntersection(c, segmentIndex); |
|
8774
|
|
|
|
|
|
|
} |
|
8775
|
|
|
|
|
|
|
else { |
|
8776
|
|
|
|
|
|
|
auto& li = xs::in(arg1); |
|
8777
|
|
|
|
|
|
|
if (!arg3) throw("missing mandatory argument"); |
|
8778
|
|
|
|
|
|
|
if (!arg4) throw("missing mandatory argument"); |
|
8779
|
|
|
|
|
|
|
THIS->addIntersection(&li, segmentIndex, SvIV(arg3), SvIV(arg4)); |
|
8780
|
|
|
|
|
|
|
} |
|
8781
|
|
|
|
|
|
|
#line 8782 "Geos.xs.cc" |
|
8782
|
2
|
|
|
|
|
|
PUTBACK; |
|
8783
|
4
|
|
|
|
|
|
return; |
|
8784
|
|
|
|
|
|
|
} |
|
8785
|
2
|
50
|
|
|
|
|
}); } |
|
8786
|
|
|
|
|
|
|
|
|
8787
|
|
|
|
|
|
|
|
|
8788
|
|
|
|
|
|
|
|
|
8789
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__NodedSegmentString_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
8790
|
|
|
|
|
|
|
{ |
|
8791
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8792
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
8793
|
|
|
|
|
|
|
{ |
|
8794
|
|
|
|
|
|
|
int RETVAL; |
|
8795
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8796
|
|
|
|
|
|
|
#line 37 "./xsi/noding/NodedSegmentString.xsi" |
|
8797
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
8798
|
|
|
|
|
|
|
#line 8799 "Geos.xs.cc" |
|
8799
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
8800
|
|
|
|
|
|
|
} |
|
8801
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
8802
|
0
|
0
|
|
|
|
|
}); } |
|
8803
|
|
|
|
|
|
|
|
|
8804
|
|
|
|
|
|
|
|
|
8805
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/NodedSegmentString.xsi' */ |
|
8806
|
|
|
|
|
|
|
|
|
8807
|
|
|
|
|
|
|
|
|
8808
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/BasicSegmentString.xsi' from 'Geos.xs' */ |
|
8809
|
|
|
|
|
|
|
|
|
8810
|
|
|
|
|
|
|
|
|
8811
|
|
|
|
|
|
|
|
|
8812
|
10
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__BasicSegmentString_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
8813
|
|
|
|
|
|
|
{ |
|
8814
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8815
|
5
|
50
|
|
|
|
|
if (items != 2) |
|
8816
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, coords"); |
|
8817
|
|
|
|
|
|
|
{ |
|
8818
|
|
|
|
|
|
|
BasicSegmentString * RETVAL; |
|
8819
|
10
|
50
|
|
|
|
|
Array coords = ST(1); |
|
8820
|
5
|
50
|
|
|
|
|
if (!coords && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
8821
|
0
|
|
|
|
|
|
; |
|
8822
|
|
|
|
|
|
|
#line 6 "./xsi/noding/BasicSegmentString.xsi" |
|
8823
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
8824
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(coords); |
|
8825
|
|
|
|
|
|
|
auto deep_clone = seq.clone(); |
|
8826
|
|
|
|
|
|
|
RETVAL = new BasicSegmentString(deep_clone, NULL); |
|
8827
|
|
|
|
|
|
|
#line 8828 "Geos.xs.cc" |
|
8828
|
|
|
|
|
|
|
{ |
|
8829
|
|
|
|
|
|
|
SV * RETVALSV; |
|
8830
|
5
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
8831
|
5
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
8832
|
5
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
8833
|
|
|
|
|
|
|
} |
|
8834
|
|
|
|
|
|
|
} |
|
8835
|
5
|
|
|
|
|
|
XSRETURN(1); |
|
8836
|
5
|
50
|
|
|
|
|
}); } |
|
8837
|
|
|
|
|
|
|
|
|
8838
|
|
|
|
|
|
|
|
|
8839
|
|
|
|
|
|
|
|
|
8840
|
10
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__BasicSegmentString_DESTROY) { xs::throw_guard(aTHX_ cv, [=]() |
|
8841
|
|
|
|
|
|
|
{ |
|
8842
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8843
|
5
|
50
|
|
|
|
|
if (items != 1) |
|
8844
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
8845
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
8846
|
5
|
|
|
|
|
|
SP -= items; |
|
8847
|
|
|
|
|
|
|
{ |
|
8848
|
5
|
50
|
|
|
|
|
BasicSegmentString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8849
|
|
|
|
|
|
|
; |
|
8850
|
|
|
|
|
|
|
#line 12 "./xsi/noding/BasicSegmentString.xsi" |
|
8851
|
|
|
|
|
|
|
delete THIS->getCoordinates(); |
|
8852
|
|
|
|
|
|
|
xs::Typemap().destroy(aTHX_ THIS, SvRV(ST(0))); |
|
8853
|
|
|
|
|
|
|
#line 8854 "Geos.xs.cc" |
|
8854
|
5
|
|
|
|
|
|
PUTBACK; |
|
8855
|
5
|
|
|
|
|
|
return; |
|
8856
|
|
|
|
|
|
|
} |
|
8857
|
5
|
50
|
|
|
|
|
}); } |
|
8858
|
|
|
|
|
|
|
|
|
8859
|
|
|
|
|
|
|
|
|
8860
|
|
|
|
|
|
|
|
|
8861
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__BasicSegmentString_getSegmentOctant) { xs::throw_guard(aTHX_ cv, [=]() |
|
8862
|
|
|
|
|
|
|
{ |
|
8863
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8864
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
8865
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, index"); |
|
8866
|
|
|
|
|
|
|
{ |
|
8867
|
|
|
|
|
|
|
int RETVAL; |
|
8868
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8869
|
1
|
50
|
|
|
|
|
BasicSegmentString* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8870
|
|
|
|
|
|
|
; |
|
8871
|
1
|
50
|
|
|
|
|
unsigned int index = (unsigned int)SvUV(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
8872
|
|
|
|
|
|
|
; |
|
8873
|
|
|
|
|
|
|
#line 15 "./xsi/noding/BasicSegmentString.xsi" |
|
8874
|
|
|
|
|
|
|
RETVAL = THIS->getSegmentOctant(index); |
|
8875
|
|
|
|
|
|
|
#line 8876 "Geos.xs.cc" |
|
8876
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
8877
|
|
|
|
|
|
|
} |
|
8878
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
8879
|
1
|
50
|
|
|
|
|
}); } |
|
8880
|
|
|
|
|
|
|
|
|
8881
|
|
|
|
|
|
|
|
|
8882
|
|
|
|
|
|
|
|
|
8883
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__BasicSegmentString_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
8884
|
|
|
|
|
|
|
{ |
|
8885
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8886
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
8887
|
|
|
|
|
|
|
{ |
|
8888
|
|
|
|
|
|
|
int RETVAL; |
|
8889
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
8890
|
|
|
|
|
|
|
#line 17 "./xsi/noding/BasicSegmentString.xsi" |
|
8891
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
8892
|
|
|
|
|
|
|
#line 8893 "Geos.xs.cc" |
|
8893
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
8894
|
|
|
|
|
|
|
} |
|
8895
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
8896
|
0
|
0
|
|
|
|
|
}); } |
|
8897
|
|
|
|
|
|
|
|
|
8898
|
|
|
|
|
|
|
|
|
8899
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/BasicSegmentString.xsi' */ |
|
8900
|
|
|
|
|
|
|
|
|
8901
|
|
|
|
|
|
|
|
|
8902
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/SegmentIntersector.xsi' from 'Geos.xs' */ |
|
8903
|
|
|
|
|
|
|
|
|
8904
|
|
|
|
|
|
|
|
|
8905
|
|
|
|
|
|
|
|
|
8906
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentIntersector_processIntersections) { xs::throw_guard(aTHX_ cv, [=]() |
|
8907
|
|
|
|
|
|
|
{ |
|
8908
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8909
|
3
|
50
|
|
|
|
|
if (items != 5) |
|
8910
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, e0, segIndex0, e1, segIndex1"); |
|
8911
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
8912
|
3
|
|
|
|
|
|
SP -= items; |
|
8913
|
|
|
|
|
|
|
{ |
|
8914
|
3
|
50
|
|
|
|
|
SegmentIntersector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8915
|
|
|
|
|
|
|
; |
|
8916
|
3
|
|
|
|
|
|
SegmentString& e0 = xs::in(aTHX_ ST(1)); |
|
8917
|
|
|
|
|
|
|
; |
|
8918
|
3
|
50
|
|
|
|
|
int segIndex0 = (int)SvIV(ST(2)) |
|
8919
|
|
|
|
|
|
|
; |
|
8920
|
3
|
|
|
|
|
|
SegmentString& e1 = xs::in(aTHX_ ST(3)); |
|
8921
|
|
|
|
|
|
|
; |
|
8922
|
3
|
50
|
|
|
|
|
int segIndex1 = (int)SvIV(ST(4)) |
|
8923
|
|
|
|
|
|
|
; |
|
8924
|
|
|
|
|
|
|
#line 6 "./xsi/noding/SegmentIntersector.xsi" |
|
8925
|
|
|
|
|
|
|
THIS->processIntersections(&e0, segIndex0, &e1, segIndex1); |
|
8926
|
|
|
|
|
|
|
#line 8927 "Geos.xs.cc" |
|
8927
|
3
|
|
|
|
|
|
PUTBACK; |
|
8928
|
3
|
|
|
|
|
|
return; |
|
8929
|
|
|
|
|
|
|
} |
|
8930
|
3
|
50
|
|
|
|
|
}); } |
|
8931
|
|
|
|
|
|
|
|
|
8932
|
|
|
|
|
|
|
|
|
8933
|
|
|
|
|
|
|
|
|
8934
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentIntersector_isDone) { xs::throw_guard(aTHX_ cv, [=]() |
|
8935
|
|
|
|
|
|
|
{ |
|
8936
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8937
|
7
|
50
|
|
|
|
|
if (items != 1) |
|
8938
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
8939
|
|
|
|
|
|
|
{ |
|
8940
|
|
|
|
|
|
|
bool RETVAL; |
|
8941
|
7
|
50
|
|
|
|
|
SegmentIntersector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8942
|
|
|
|
|
|
|
; |
|
8943
|
|
|
|
|
|
|
#line 9 "./xsi/noding/SegmentIntersector.xsi" |
|
8944
|
|
|
|
|
|
|
RETVAL = THIS->isDone(); |
|
8945
|
|
|
|
|
|
|
#line 8946 "Geos.xs.cc" |
|
8946
|
7
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
8947
|
|
|
|
|
|
|
} |
|
8948
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
8949
|
7
|
50
|
|
|
|
|
}); } |
|
8950
|
|
|
|
|
|
|
|
|
8951
|
|
|
|
|
|
|
|
|
8952
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/SegmentIntersector.xsi' */ |
|
8953
|
|
|
|
|
|
|
|
|
8954
|
|
|
|
|
|
|
|
|
8955
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/SegmentIntersectionDetector.xsi' from 'Geos.xs' */ |
|
8956
|
|
|
|
|
|
|
|
|
8957
|
|
|
|
|
|
|
|
|
8958
|
|
|
|
|
|
|
|
|
8959
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentIntersectionDetector_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
8960
|
|
|
|
|
|
|
{ |
|
8961
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
8962
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
8963
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, liObj"); |
|
8964
|
|
|
|
|
|
|
{ |
|
8965
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
8966
|
2
|
|
|
|
|
|
SV* liObj = ST(1) |
|
8967
|
|
|
|
|
|
|
; |
|
8968
|
|
|
|
|
|
|
#line 5 "./xsi/noding/SegmentIntersectionDetector.xsi" |
|
8969
|
|
|
|
|
|
|
LineIntersector& li = xs::in(liObj); |
|
8970
|
|
|
|
|
|
|
Sv wrapped = xs::out<>(new SegmentIntersectionDetector(&li)); |
|
8971
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(liObj), &payload_marker); |
|
8972
|
|
|
|
|
|
|
RETVAL = wrapped; |
|
8973
|
|
|
|
|
|
|
#line 8974 "Geos.xs.cc" |
|
8974
|
|
|
|
|
|
|
{ |
|
8975
|
|
|
|
|
|
|
SV * RETVALSV; |
|
8976
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
8977
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
8978
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
8979
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
8980
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
8981
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
8982
|
|
|
|
|
|
|
case SVt_PVCV: |
|
8983
|
|
|
|
|
|
|
case SVt_PVIO: |
|
8984
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
8985
|
0
|
|
|
|
|
|
break; |
|
8986
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
8987
|
|
|
|
|
|
|
} |
|
8988
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
8989
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
8990
|
|
|
|
|
|
|
} |
|
8991
|
|
|
|
|
|
|
} |
|
8992
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
8993
|
2
|
50
|
|
|
|
|
}); } |
|
8994
|
|
|
|
|
|
|
|
|
8995
|
|
|
|
|
|
|
|
|
8996
|
|
|
|
|
|
|
|
|
8997
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentIntersectionDetector_hasIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
8998
|
|
|
|
|
|
|
{ |
|
8999
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9000
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
9001
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9002
|
|
|
|
|
|
|
{ |
|
9003
|
|
|
|
|
|
|
bool RETVAL; |
|
9004
|
0
|
0
|
|
|
|
|
SegmentIntersectionDetector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9005
|
|
|
|
|
|
|
; |
|
9006
|
|
|
|
|
|
|
#line 12 "./xsi/noding/SegmentIntersectionDetector.xsi" |
|
9007
|
|
|
|
|
|
|
RETVAL = THIS->hasIntersection(); |
|
9008
|
|
|
|
|
|
|
#line 9009 "Geos.xs.cc" |
|
9009
|
0
|
0
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
9010
|
|
|
|
|
|
|
} |
|
9011
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
9012
|
0
|
0
|
|
|
|
|
}); } |
|
9013
|
|
|
|
|
|
|
|
|
9014
|
|
|
|
|
|
|
|
|
9015
|
|
|
|
|
|
|
|
|
9016
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentIntersectionDetector_hasProperIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
9017
|
|
|
|
|
|
|
{ |
|
9018
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9019
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9020
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9021
|
|
|
|
|
|
|
{ |
|
9022
|
|
|
|
|
|
|
bool RETVAL; |
|
9023
|
1
|
50
|
|
|
|
|
SegmentIntersectionDetector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9024
|
|
|
|
|
|
|
; |
|
9025
|
|
|
|
|
|
|
#line 14 "./xsi/noding/SegmentIntersectionDetector.xsi" |
|
9026
|
|
|
|
|
|
|
RETVAL = THIS->hasProperIntersection(); |
|
9027
|
|
|
|
|
|
|
#line 9028 "Geos.xs.cc" |
|
9028
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
9029
|
|
|
|
|
|
|
} |
|
9030
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9031
|
1
|
50
|
|
|
|
|
}); } |
|
9032
|
|
|
|
|
|
|
|
|
9033
|
|
|
|
|
|
|
|
|
9034
|
|
|
|
|
|
|
|
|
9035
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentIntersectionDetector_hasNonProperIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
9036
|
|
|
|
|
|
|
{ |
|
9037
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9038
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9039
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9040
|
|
|
|
|
|
|
{ |
|
9041
|
|
|
|
|
|
|
bool RETVAL; |
|
9042
|
1
|
50
|
|
|
|
|
SegmentIntersectionDetector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9043
|
|
|
|
|
|
|
; |
|
9044
|
|
|
|
|
|
|
#line 16 "./xsi/noding/SegmentIntersectionDetector.xsi" |
|
9045
|
|
|
|
|
|
|
RETVAL = THIS->hasNonProperIntersection(); |
|
9046
|
|
|
|
|
|
|
#line 9047 "Geos.xs.cc" |
|
9047
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
9048
|
|
|
|
|
|
|
} |
|
9049
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9050
|
1
|
50
|
|
|
|
|
}); } |
|
9051
|
|
|
|
|
|
|
|
|
9052
|
|
|
|
|
|
|
|
|
9053
|
|
|
|
|
|
|
|
|
9054
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentIntersectionDetector_setFindProper) { xs::throw_guard(aTHX_ cv, [=]() |
|
9055
|
|
|
|
|
|
|
{ |
|
9056
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9057
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
9058
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, findProper"); |
|
9059
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
9060
|
0
|
|
|
|
|
|
SP -= items; |
|
9061
|
|
|
|
|
|
|
{ |
|
9062
|
0
|
0
|
|
|
|
|
SegmentIntersectionDetector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9063
|
|
|
|
|
|
|
; |
|
9064
|
0
|
0
|
|
|
|
|
bool findProper = (bool)SvTRUE(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9065
|
|
|
|
|
|
|
; |
|
9066
|
|
|
|
|
|
|
#line 18 "./xsi/noding/SegmentIntersectionDetector.xsi" |
|
9067
|
|
|
|
|
|
|
THIS->setFindProper(findProper); |
|
9068
|
|
|
|
|
|
|
#line 9069 "Geos.xs.cc" |
|
9069
|
0
|
|
|
|
|
|
PUTBACK; |
|
9070
|
0
|
|
|
|
|
|
return; |
|
9071
|
|
|
|
|
|
|
} |
|
9072
|
0
|
0
|
|
|
|
|
}); } |
|
9073
|
|
|
|
|
|
|
|
|
9074
|
|
|
|
|
|
|
|
|
9075
|
|
|
|
|
|
|
|
|
9076
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentIntersectionDetector_setFindAllIntersectionTypes) { xs::throw_guard(aTHX_ cv, [=]() |
|
9077
|
|
|
|
|
|
|
{ |
|
9078
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9079
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
9080
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, findAllTypes"); |
|
9081
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
9082
|
0
|
|
|
|
|
|
SP -= items; |
|
9083
|
|
|
|
|
|
|
{ |
|
9084
|
0
|
0
|
|
|
|
|
SegmentIntersectionDetector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9085
|
|
|
|
|
|
|
; |
|
9086
|
0
|
0
|
|
|
|
|
bool findAllTypes = (bool)SvTRUE(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9087
|
|
|
|
|
|
|
; |
|
9088
|
|
|
|
|
|
|
#line 20 "./xsi/noding/SegmentIntersectionDetector.xsi" |
|
9089
|
|
|
|
|
|
|
THIS->setFindAllIntersectionTypes(findAllTypes); |
|
9090
|
|
|
|
|
|
|
#line 9091 "Geos.xs.cc" |
|
9091
|
0
|
|
|
|
|
|
PUTBACK; |
|
9092
|
0
|
|
|
|
|
|
return; |
|
9093
|
|
|
|
|
|
|
} |
|
9094
|
0
|
0
|
|
|
|
|
}); } |
|
9095
|
|
|
|
|
|
|
|
|
9096
|
|
|
|
|
|
|
|
|
9097
|
|
|
|
|
|
|
|
|
9098
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentIntersectionDetector_getIntersectionSegments) { xs::throw_guard(aTHX_ cv, [=]() |
|
9099
|
|
|
|
|
|
|
{ |
|
9100
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9101
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9102
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9103
|
|
|
|
|
|
|
{ |
|
9104
|
2
|
|
|
|
|
|
xs::Array RETVAL; |
|
9105
|
1
|
50
|
|
|
|
|
SegmentIntersectionDetector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9106
|
|
|
|
|
|
|
; |
|
9107
|
|
|
|
|
|
|
#line 23 "./xsi/noding/SegmentIntersectionDetector.xsi" |
|
9108
|
|
|
|
|
|
|
RETVAL = Helper::convert_copy(THIS->getIntersectionSegments()); |
|
9109
|
|
|
|
|
|
|
#line 9110 "Geos.xs.cc" |
|
9110
|
|
|
|
|
|
|
{ |
|
9111
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9112
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
9113
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
9114
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
9115
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9116
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
9117
|
|
|
|
|
|
|
} |
|
9118
|
|
|
|
|
|
|
} |
|
9119
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9120
|
1
|
50
|
|
|
|
|
}); } |
|
9121
|
|
|
|
|
|
|
|
|
9122
|
|
|
|
|
|
|
|
|
9123
|
|
|
|
|
|
|
|
|
9124
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentIntersectionDetector_getIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
9125
|
|
|
|
|
|
|
{ |
|
9126
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9127
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9128
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9129
|
|
|
|
|
|
|
{ |
|
9130
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
9131
|
1
|
50
|
|
|
|
|
SegmentIntersectionDetector* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9132
|
|
|
|
|
|
|
; |
|
9133
|
|
|
|
|
|
|
#line 27 "./xsi/noding/SegmentIntersectionDetector.xsi" |
|
9134
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
9135
|
|
|
|
|
|
|
auto c = THIS->getIntersection(); |
|
9136
|
|
|
|
|
|
|
if (c) RETVAL = new Coordinate(*c); |
|
9137
|
|
|
|
|
|
|
else XSRETURN_UNDEF; |
|
9138
|
|
|
|
|
|
|
#line 9139 "Geos.xs.cc" |
|
9139
|
|
|
|
|
|
|
{ |
|
9140
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9141
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
9142
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9143
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
9144
|
|
|
|
|
|
|
} |
|
9145
|
|
|
|
|
|
|
} |
|
9146
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9147
|
1
|
50
|
|
|
|
|
}); } |
|
9148
|
|
|
|
|
|
|
|
|
9149
|
|
|
|
|
|
|
|
|
9150
|
|
|
|
|
|
|
|
|
9151
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SegmentIntersectionDetector_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
9152
|
|
|
|
|
|
|
{ |
|
9153
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9154
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
9155
|
|
|
|
|
|
|
{ |
|
9156
|
|
|
|
|
|
|
int RETVAL; |
|
9157
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
9158
|
|
|
|
|
|
|
#line 33 "./xsi/noding/SegmentIntersectionDetector.xsi" |
|
9159
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
9160
|
|
|
|
|
|
|
#line 9161 "Geos.xs.cc" |
|
9161
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
9162
|
|
|
|
|
|
|
} |
|
9163
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
9164
|
0
|
0
|
|
|
|
|
}); } |
|
9165
|
|
|
|
|
|
|
|
|
9166
|
|
|
|
|
|
|
|
|
9167
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/SegmentIntersectionDetector.xsi' */ |
|
9168
|
|
|
|
|
|
|
|
|
9169
|
|
|
|
|
|
|
|
|
9170
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/SingleInteriorIntersectionFinder.xsi' from 'Geos.xs' */ |
|
9171
|
|
|
|
|
|
|
|
|
9172
|
|
|
|
|
|
|
|
|
9173
|
|
|
|
|
|
|
|
|
9174
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
9175
|
|
|
|
|
|
|
{ |
|
9176
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9177
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
9178
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, liObj"); |
|
9179
|
|
|
|
|
|
|
{ |
|
9180
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
9181
|
1
|
|
|
|
|
|
SV* liObj = ST(1) |
|
9182
|
|
|
|
|
|
|
; |
|
9183
|
|
|
|
|
|
|
#line 5 "./xsi/noding/SingleInteriorIntersectionFinder.xsi" |
|
9184
|
|
|
|
|
|
|
auto& li = xs::in(liObj); |
|
9185
|
|
|
|
|
|
|
Sv wrapped = xs::out<>(new SingleInteriorIntersectionFinder(li)); |
|
9186
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(liObj), &payload_marker); |
|
9187
|
|
|
|
|
|
|
RETVAL = wrapped; |
|
9188
|
|
|
|
|
|
|
#line 9189 "Geos.xs.cc" |
|
9189
|
|
|
|
|
|
|
{ |
|
9190
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9191
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
9192
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
9193
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
9194
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
9195
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9196
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9197
|
|
|
|
|
|
|
case SVt_PVCV: |
|
9198
|
|
|
|
|
|
|
case SVt_PVIO: |
|
9199
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
9200
|
0
|
|
|
|
|
|
break; |
|
9201
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
9202
|
|
|
|
|
|
|
} |
|
9203
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9204
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
9205
|
|
|
|
|
|
|
} |
|
9206
|
|
|
|
|
|
|
} |
|
9207
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9208
|
1
|
50
|
|
|
|
|
}); } |
|
9209
|
|
|
|
|
|
|
|
|
9210
|
|
|
|
|
|
|
|
|
9211
|
|
|
|
|
|
|
|
|
9212
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_hasIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
9213
|
|
|
|
|
|
|
{ |
|
9214
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9215
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
9216
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9217
|
|
|
|
|
|
|
{ |
|
9218
|
|
|
|
|
|
|
bool RETVAL; |
|
9219
|
0
|
0
|
|
|
|
|
SingleInteriorIntersectionFinder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9220
|
|
|
|
|
|
|
; |
|
9221
|
|
|
|
|
|
|
#line 12 "./xsi/noding/SingleInteriorIntersectionFinder.xsi" |
|
9222
|
|
|
|
|
|
|
RETVAL = THIS->hasIntersection(); |
|
9223
|
|
|
|
|
|
|
#line 9224 "Geos.xs.cc" |
|
9224
|
0
|
0
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
9225
|
|
|
|
|
|
|
} |
|
9226
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
9227
|
0
|
0
|
|
|
|
|
}); } |
|
9228
|
|
|
|
|
|
|
|
|
9229
|
|
|
|
|
|
|
|
|
9230
|
|
|
|
|
|
|
|
|
9231
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_getInteriorIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
9232
|
|
|
|
|
|
|
{ |
|
9233
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9234
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9235
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9236
|
|
|
|
|
|
|
{ |
|
9237
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
9238
|
1
|
50
|
|
|
|
|
SingleInteriorIntersectionFinder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9239
|
|
|
|
|
|
|
; |
|
9240
|
|
|
|
|
|
|
#line 15 "./xsi/noding/SingleInteriorIntersectionFinder.xsi" |
|
9241
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
9242
|
|
|
|
|
|
|
RETVAL = new Coordinate(THIS->getInteriorIntersection()); |
|
9243
|
|
|
|
|
|
|
#line 9244 "Geos.xs.cc" |
|
9244
|
|
|
|
|
|
|
{ |
|
9245
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9246
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
9247
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9248
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
9249
|
|
|
|
|
|
|
} |
|
9250
|
|
|
|
|
|
|
} |
|
9251
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9252
|
1
|
50
|
|
|
|
|
}); } |
|
9253
|
|
|
|
|
|
|
|
|
9254
|
|
|
|
|
|
|
|
|
9255
|
|
|
|
|
|
|
|
|
9256
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_getIntersectionSegments) { xs::throw_guard(aTHX_ cv, [=]() |
|
9257
|
|
|
|
|
|
|
{ |
|
9258
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9259
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9260
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9261
|
|
|
|
|
|
|
{ |
|
9262
|
2
|
|
|
|
|
|
xs::Array RETVAL; |
|
9263
|
1
|
50
|
|
|
|
|
SingleInteriorIntersectionFinder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9264
|
|
|
|
|
|
|
; |
|
9265
|
|
|
|
|
|
|
#line 19 "./xsi/noding/SingleInteriorIntersectionFinder.xsi" |
|
9266
|
|
|
|
|
|
|
auto& vector = THIS->getIntersectionSegments(); |
|
9267
|
|
|
|
|
|
|
auto r = xs::Array::create(vector.size()); |
|
9268
|
|
|
|
|
|
|
for(auto& c: vector) { |
|
9269
|
|
|
|
|
|
|
auto copy = xs::out(new Coordinate(c)); |
|
9270
|
|
|
|
|
|
|
r.push(copy); |
|
9271
|
|
|
|
|
|
|
} |
|
9272
|
|
|
|
|
|
|
RETVAL = r; |
|
9273
|
|
|
|
|
|
|
#line 9274 "Geos.xs.cc" |
|
9274
|
|
|
|
|
|
|
{ |
|
9275
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9276
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
9277
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
9278
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
9279
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9280
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
9281
|
|
|
|
|
|
|
} |
|
9282
|
|
|
|
|
|
|
} |
|
9283
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9284
|
1
|
50
|
|
|
|
|
}); } |
|
9285
|
|
|
|
|
|
|
|
|
9286
|
|
|
|
|
|
|
|
|
9287
|
|
|
|
|
|
|
|
|
9288
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
9289
|
|
|
|
|
|
|
{ |
|
9290
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9291
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
9292
|
|
|
|
|
|
|
{ |
|
9293
|
|
|
|
|
|
|
int RETVAL; |
|
9294
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
9295
|
|
|
|
|
|
|
#line 29 "./xsi/noding/SingleInteriorIntersectionFinder.xsi" |
|
9296
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
9297
|
|
|
|
|
|
|
#line 9298 "Geos.xs.cc" |
|
9298
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
9299
|
|
|
|
|
|
|
} |
|
9300
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
9301
|
0
|
0
|
|
|
|
|
}); } |
|
9302
|
|
|
|
|
|
|
|
|
9303
|
|
|
|
|
|
|
|
|
9304
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/SingleInteriorIntersectionFinder.xsi' */ |
|
9305
|
|
|
|
|
|
|
|
|
9306
|
|
|
|
|
|
|
|
|
9307
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/IntersectionAdder.xsi' from 'Geos.xs' */ |
|
9308
|
|
|
|
|
|
|
|
|
9309
|
|
|
|
|
|
|
|
|
9310
|
|
|
|
|
|
|
|
|
9311
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionAdder_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
9312
|
|
|
|
|
|
|
{ |
|
9313
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9314
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
9315
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, liObj"); |
|
9316
|
|
|
|
|
|
|
{ |
|
9317
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
9318
|
2
|
|
|
|
|
|
SV* liObj = ST(1) |
|
9319
|
|
|
|
|
|
|
; |
|
9320
|
|
|
|
|
|
|
#line 5 "./xsi/noding/IntersectionAdder.xsi" |
|
9321
|
|
|
|
|
|
|
LineIntersector& li = xs::in(liObj); |
|
9322
|
|
|
|
|
|
|
Object wrapped = xs::out<>(new IntersectionAdder(li)); |
|
9323
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(liObj), &payload_marker); |
|
9324
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
9325
|
|
|
|
|
|
|
#line 9326 "Geos.xs.cc" |
|
9326
|
|
|
|
|
|
|
{ |
|
9327
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9328
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
9329
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
9330
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
9331
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
9332
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9333
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9334
|
|
|
|
|
|
|
case SVt_PVCV: |
|
9335
|
|
|
|
|
|
|
case SVt_PVIO: |
|
9336
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
9337
|
0
|
|
|
|
|
|
break; |
|
9338
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
9339
|
|
|
|
|
|
|
} |
|
9340
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9341
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
9342
|
|
|
|
|
|
|
} |
|
9343
|
|
|
|
|
|
|
} |
|
9344
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
9345
|
2
|
50
|
|
|
|
|
}); } |
|
9346
|
|
|
|
|
|
|
|
|
9347
|
|
|
|
|
|
|
|
|
9348
|
|
|
|
|
|
|
|
|
9349
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionAdder_getLineIntersector) { xs::throw_guard(aTHX_ cv, [=]() |
|
9350
|
|
|
|
|
|
|
{ |
|
9351
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9352
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9353
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9354
|
|
|
|
|
|
|
{ |
|
9355
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
9356
|
1
|
50
|
|
|
|
|
IntersectionAdder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9357
|
|
|
|
|
|
|
; |
|
9358
|
|
|
|
|
|
|
#line 12 "./xsi/noding/IntersectionAdder.xsi" |
|
9359
|
|
|
|
|
|
|
Object me{ST(0)}; |
|
9360
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker); |
|
9361
|
|
|
|
|
|
|
Object li{payload.obj}; |
|
9362
|
|
|
|
|
|
|
RETVAL = li.ref(); |
|
9363
|
|
|
|
|
|
|
#line 9364 "Geos.xs.cc" |
|
9364
|
|
|
|
|
|
|
{ |
|
9365
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9366
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
9367
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
9368
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
9369
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
9370
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9371
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9372
|
|
|
|
|
|
|
case SVt_PVCV: |
|
9373
|
|
|
|
|
|
|
case SVt_PVIO: |
|
9374
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
9375
|
0
|
|
|
|
|
|
break; |
|
9376
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
9377
|
|
|
|
|
|
|
} |
|
9378
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9379
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
9380
|
|
|
|
|
|
|
} |
|
9381
|
|
|
|
|
|
|
} |
|
9382
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9383
|
1
|
50
|
|
|
|
|
}); } |
|
9384
|
|
|
|
|
|
|
|
|
9385
|
|
|
|
|
|
|
|
|
9386
|
|
|
|
|
|
|
|
|
9387
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionAdder_hasIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
9388
|
|
|
|
|
|
|
{ |
|
9389
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9390
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9391
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9392
|
|
|
|
|
|
|
{ |
|
9393
|
|
|
|
|
|
|
bool RETVAL; |
|
9394
|
1
|
50
|
|
|
|
|
IntersectionAdder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9395
|
|
|
|
|
|
|
; |
|
9396
|
|
|
|
|
|
|
#line 18 "./xsi/noding/IntersectionAdder.xsi" |
|
9397
|
|
|
|
|
|
|
RETVAL = THIS->hasIntersection(); |
|
9398
|
|
|
|
|
|
|
#line 9399 "Geos.xs.cc" |
|
9399
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
9400
|
|
|
|
|
|
|
} |
|
9401
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9402
|
1
|
50
|
|
|
|
|
}); } |
|
9403
|
|
|
|
|
|
|
|
|
9404
|
|
|
|
|
|
|
|
|
9405
|
|
|
|
|
|
|
|
|
9406
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionAdder_hasProperIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
9407
|
|
|
|
|
|
|
{ |
|
9408
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9409
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9410
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9411
|
|
|
|
|
|
|
{ |
|
9412
|
|
|
|
|
|
|
bool RETVAL; |
|
9413
|
1
|
50
|
|
|
|
|
IntersectionAdder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9414
|
|
|
|
|
|
|
; |
|
9415
|
|
|
|
|
|
|
#line 20 "./xsi/noding/IntersectionAdder.xsi" |
|
9416
|
|
|
|
|
|
|
RETVAL = THIS->hasProperIntersection(); |
|
9417
|
|
|
|
|
|
|
#line 9418 "Geos.xs.cc" |
|
9418
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
9419
|
|
|
|
|
|
|
} |
|
9420
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9421
|
1
|
50
|
|
|
|
|
}); } |
|
9422
|
|
|
|
|
|
|
|
|
9423
|
|
|
|
|
|
|
|
|
9424
|
|
|
|
|
|
|
|
|
9425
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionAdder_hasProperInteriorIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
9426
|
|
|
|
|
|
|
{ |
|
9427
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9428
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9429
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9430
|
|
|
|
|
|
|
{ |
|
9431
|
|
|
|
|
|
|
bool RETVAL; |
|
9432
|
1
|
50
|
|
|
|
|
IntersectionAdder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9433
|
|
|
|
|
|
|
; |
|
9434
|
|
|
|
|
|
|
#line 22 "./xsi/noding/IntersectionAdder.xsi" |
|
9435
|
|
|
|
|
|
|
RETVAL = THIS->hasProperInteriorIntersection(); |
|
9436
|
|
|
|
|
|
|
#line 9437 "Geos.xs.cc" |
|
9437
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
9438
|
|
|
|
|
|
|
} |
|
9439
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9440
|
1
|
50
|
|
|
|
|
}); } |
|
9441
|
|
|
|
|
|
|
|
|
9442
|
|
|
|
|
|
|
|
|
9443
|
|
|
|
|
|
|
|
|
9444
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionAdder_hasInteriorIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
9445
|
|
|
|
|
|
|
{ |
|
9446
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9447
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9448
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9449
|
|
|
|
|
|
|
{ |
|
9450
|
|
|
|
|
|
|
bool RETVAL; |
|
9451
|
1
|
50
|
|
|
|
|
IntersectionAdder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9452
|
|
|
|
|
|
|
; |
|
9453
|
|
|
|
|
|
|
#line 24 "./xsi/noding/IntersectionAdder.xsi" |
|
9454
|
|
|
|
|
|
|
RETVAL = THIS->hasInteriorIntersection(); |
|
9455
|
|
|
|
|
|
|
#line 9456 "Geos.xs.cc" |
|
9456
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
9457
|
|
|
|
|
|
|
} |
|
9458
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9459
|
1
|
50
|
|
|
|
|
}); } |
|
9460
|
|
|
|
|
|
|
|
|
9461
|
|
|
|
|
|
|
|
|
9462
|
|
|
|
|
|
|
|
|
9463
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionAdder_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
9464
|
|
|
|
|
|
|
{ |
|
9465
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9466
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
9467
|
|
|
|
|
|
|
{ |
|
9468
|
|
|
|
|
|
|
int RETVAL; |
|
9469
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
9470
|
|
|
|
|
|
|
#line 26 "./xsi/noding/IntersectionAdder.xsi" |
|
9471
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
9472
|
|
|
|
|
|
|
#line 9473 "Geos.xs.cc" |
|
9473
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
9474
|
|
|
|
|
|
|
} |
|
9475
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
9476
|
0
|
0
|
|
|
|
|
}); } |
|
9477
|
|
|
|
|
|
|
|
|
9478
|
|
|
|
|
|
|
|
|
9479
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/IntersectionAdder.xsi' */ |
|
9480
|
|
|
|
|
|
|
|
|
9481
|
|
|
|
|
|
|
|
|
9482
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/IntersectionFinderAdder.xsi' from 'Geos.xs' */ |
|
9483
|
|
|
|
|
|
|
|
|
9484
|
|
|
|
|
|
|
|
|
9485
|
|
|
|
|
|
|
|
|
9486
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionFinderAdder_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
9487
|
|
|
|
|
|
|
{ |
|
9488
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9489
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
9490
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, liObj, coords"); |
|
9491
|
|
|
|
|
|
|
{ |
|
9492
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
9493
|
1
|
|
|
|
|
|
SV* liObj = ST(1) |
|
9494
|
|
|
|
|
|
|
; |
|
9495
|
2
|
50
|
|
|
|
|
Array coords = ST(2); |
|
|
|
50
|
|
|
|
|
|
|
9496
|
1
|
50
|
|
|
|
|
if (!coords && SvOK(ST(2))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
9497
|
0
|
|
|
|
|
|
; |
|
9498
|
|
|
|
|
|
|
#line 5 "./xsi/noding/IntersectionFinderAdder.xsi" |
|
9499
|
|
|
|
|
|
|
LineIntersector& li = xs::in(liObj); |
|
9500
|
|
|
|
|
|
|
auto* payload = new IntersectionFinderAdder_payload{SvRV(liObj), {}}; |
|
9501
|
|
|
|
|
|
|
|
|
9502
|
|
|
|
|
|
|
auto* v = &payload->coords; |
|
9503
|
|
|
|
|
|
|
v->reserve(coords.size()); |
|
9504
|
|
|
|
|
|
|
for(auto it: coords) { |
|
9505
|
|
|
|
|
|
|
Coordinate& c = xs::in(it); |
|
9506
|
|
|
|
|
|
|
v->emplace_back(c); |
|
9507
|
|
|
|
|
|
|
} |
|
9508
|
|
|
|
|
|
|
|
|
9509
|
|
|
|
|
|
|
Object wrapped = xs::out<>(new IntersectionFinderAdder(li, *v)); |
|
9510
|
|
|
|
|
|
|
wrapped.payload_attach(payload, &payload_marker_IntersectionFinderAdder); |
|
9511
|
|
|
|
|
|
|
|
|
9512
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
9513
|
|
|
|
|
|
|
#line 9514 "Geos.xs.cc" |
|
9514
|
|
|
|
|
|
|
{ |
|
9515
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9516
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
9517
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
9518
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
9519
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
9520
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9521
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9522
|
|
|
|
|
|
|
case SVt_PVCV: |
|
9523
|
|
|
|
|
|
|
case SVt_PVIO: |
|
9524
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
9525
|
0
|
|
|
|
|
|
break; |
|
9526
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
9527
|
|
|
|
|
|
|
} |
|
9528
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9529
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
9530
|
|
|
|
|
|
|
} |
|
9531
|
|
|
|
|
|
|
} |
|
9532
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9533
|
1
|
50
|
|
|
|
|
}); } |
|
9534
|
|
|
|
|
|
|
|
|
9535
|
|
|
|
|
|
|
|
|
9536
|
|
|
|
|
|
|
|
|
9537
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionFinderAdder_getInteriorIntersections) { xs::throw_guard(aTHX_ cv, [=]() |
|
9538
|
|
|
|
|
|
|
{ |
|
9539
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9540
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9541
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9542
|
|
|
|
|
|
|
{ |
|
9543
|
2
|
|
|
|
|
|
xs::Array RETVAL; |
|
9544
|
1
|
50
|
|
|
|
|
IntersectionFinderAdder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9545
|
|
|
|
|
|
|
; |
|
9546
|
|
|
|
|
|
|
#line 22 "./xsi/noding/IntersectionFinderAdder.xsi" |
|
9547
|
|
|
|
|
|
|
Object me{ST(0)}; |
|
9548
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker_IntersectionFinderAdder); |
|
9549
|
|
|
|
|
|
|
auto* real_payload = static_cast(payload.ptr); |
|
9550
|
|
|
|
|
|
|
auto* v = &real_payload->coords; |
|
9551
|
|
|
|
|
|
|
|
|
9552
|
|
|
|
|
|
|
auto result = xs::Array::create(v->size()); |
|
9553
|
|
|
|
|
|
|
for(auto& c: *v) { |
|
9554
|
|
|
|
|
|
|
result.push(xs::out(new Coordinate(c))); |
|
9555
|
|
|
|
|
|
|
} |
|
9556
|
|
|
|
|
|
|
RETVAL = result; |
|
9557
|
|
|
|
|
|
|
#line 9558 "Geos.xs.cc" |
|
9558
|
|
|
|
|
|
|
{ |
|
9559
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9560
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
9561
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
9562
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
9563
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9564
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
9565
|
|
|
|
|
|
|
} |
|
9566
|
|
|
|
|
|
|
} |
|
9567
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9568
|
1
|
50
|
|
|
|
|
}); } |
|
9569
|
|
|
|
|
|
|
|
|
9570
|
|
|
|
|
|
|
|
|
9571
|
|
|
|
|
|
|
|
|
9572
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionFinderAdder_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
9573
|
|
|
|
|
|
|
{ |
|
9574
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9575
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
9576
|
|
|
|
|
|
|
{ |
|
9577
|
|
|
|
|
|
|
int RETVAL; |
|
9578
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
9579
|
|
|
|
|
|
|
#line 34 "./xsi/noding/IntersectionFinderAdder.xsi" |
|
9580
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
9581
|
|
|
|
|
|
|
#line 9582 "Geos.xs.cc" |
|
9582
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
9583
|
|
|
|
|
|
|
} |
|
9584
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
9585
|
0
|
0
|
|
|
|
|
}); } |
|
9586
|
|
|
|
|
|
|
|
|
9587
|
|
|
|
|
|
|
|
|
9588
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/IntersectionFinderAdder.xsi' */ |
|
9589
|
|
|
|
|
|
|
|
|
9590
|
|
|
|
|
|
|
|
|
9591
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/Noder.xsi' from 'Geos.xs' */ |
|
9592
|
|
|
|
|
|
|
|
|
9593
|
|
|
|
|
|
|
|
|
9594
|
|
|
|
|
|
|
|
|
9595
|
10
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__Noder_computeNodes) { xs::throw_guard(aTHX_ cv, [=]() |
|
9596
|
|
|
|
|
|
|
{ |
|
9597
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9598
|
5
|
50
|
|
|
|
|
if (items != 2) |
|
9599
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, segStrings"); |
|
9600
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
9601
|
5
|
|
|
|
|
|
SP -= items; |
|
9602
|
|
|
|
|
|
|
{ |
|
9603
|
5
|
50
|
|
|
|
|
Noder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9604
|
|
|
|
|
|
|
; |
|
9605
|
10
|
50
|
|
|
|
|
Array segStrings = ST(1); |
|
9606
|
5
|
50
|
|
|
|
|
if (!segStrings && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
9607
|
0
|
|
|
|
|
|
; |
|
9608
|
|
|
|
|
|
|
#line 5 "./xsi/noding/Noder.xsi" |
|
9609
|
|
|
|
|
|
|
auto segments = Noder_payload::vector_t(); |
|
9610
|
|
|
|
|
|
|
segments.reserve(segStrings.size()); |
|
9611
|
|
|
|
|
|
|
|
|
9612
|
|
|
|
|
|
|
for(auto it: segStrings) { |
|
9613
|
|
|
|
|
|
|
SegmentString& ss = xs::in(it); |
|
9614
|
|
|
|
|
|
|
segments.push_back(&ss); |
|
9615
|
|
|
|
|
|
|
} |
|
9616
|
|
|
|
|
|
|
|
|
9617
|
|
|
|
|
|
|
auto payload = new Noder_payload(); |
|
9618
|
|
|
|
|
|
|
payload->array_ref = xs::Ref::create(segStrings); |
|
9619
|
|
|
|
|
|
|
payload->segments = std::move(segments); |
|
9620
|
|
|
|
|
|
|
|
|
9621
|
|
|
|
|
|
|
|
|
9622
|
|
|
|
|
|
|
Object self{ST(0)}; |
|
9623
|
|
|
|
|
|
|
self.payload_attach(payload, &payload_marker_Noder); |
|
9624
|
|
|
|
|
|
|
|
|
9625
|
|
|
|
|
|
|
THIS->computeNodes(&payload->segments); |
|
9626
|
|
|
|
|
|
|
#line 9627 "Geos.xs.cc" |
|
9627
|
5
|
|
|
|
|
|
PUTBACK; |
|
9628
|
10
|
|
|
|
|
|
return; |
|
9629
|
|
|
|
|
|
|
} |
|
9630
|
5
|
50
|
|
|
|
|
}); } |
|
9631
|
|
|
|
|
|
|
|
|
9632
|
|
|
|
|
|
|
|
|
9633
|
|
|
|
|
|
|
|
|
9634
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__Noder_getNodedSubstrings) { xs::throw_guard(aTHX_ cv, [=]() |
|
9635
|
|
|
|
|
|
|
{ |
|
9636
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9637
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
9638
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9639
|
|
|
|
|
|
|
{ |
|
9640
|
12
|
|
|
|
|
|
Sv RETVAL; |
|
9641
|
6
|
50
|
|
|
|
|
Noder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9642
|
|
|
|
|
|
|
; |
|
9643
|
|
|
|
|
|
|
#line 25 "./xsi/noding/Noder.xsi" |
|
9644
|
|
|
|
|
|
|
auto items = THIS->getNodedSubstrings(); |
|
9645
|
|
|
|
|
|
|
if (!items) XSRETURN_UNDEF; |
|
9646
|
|
|
|
|
|
|
else { |
|
9647
|
|
|
|
|
|
|
xs::Array result = xs::Array::create(items->size()); |
|
9648
|
|
|
|
|
|
|
for(auto it: *items) { |
|
9649
|
|
|
|
|
|
|
result.push(xs::out(it)); |
|
9650
|
|
|
|
|
|
|
} |
|
9651
|
|
|
|
|
|
|
delete items; |
|
9652
|
|
|
|
|
|
|
RETVAL = xs::Ref::create(result); |
|
9653
|
|
|
|
|
|
|
} |
|
9654
|
|
|
|
|
|
|
#line 9655 "Geos.xs.cc" |
|
9655
|
|
|
|
|
|
|
{ |
|
9656
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9657
|
6
|
|
|
|
|
|
RETVALSV = NULL; |
|
9658
|
6
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
9659
|
6
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
9660
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
9661
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9662
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9663
|
|
|
|
|
|
|
case SVt_PVCV: |
|
9664
|
|
|
|
|
|
|
case SVt_PVIO: |
|
9665
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
9666
|
0
|
|
|
|
|
|
break; |
|
9667
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
9668
|
|
|
|
|
|
|
} |
|
9669
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9670
|
6
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
9671
|
|
|
|
|
|
|
} |
|
9672
|
|
|
|
|
|
|
} |
|
9673
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
9674
|
6
|
50
|
|
|
|
|
}); } |
|
9675
|
|
|
|
|
|
|
|
|
9676
|
|
|
|
|
|
|
|
|
9677
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/Noder.xsi' */ |
|
9678
|
|
|
|
|
|
|
|
|
9679
|
|
|
|
|
|
|
|
|
9680
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/IteratedNoder.xsi' from 'Geos.xs' */ |
|
9681
|
|
|
|
|
|
|
|
|
9682
|
|
|
|
|
|
|
|
|
9683
|
|
|
|
|
|
|
|
|
9684
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IteratedNoder_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
9685
|
|
|
|
|
|
|
{ |
|
9686
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9687
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
9688
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, precisionModel"); |
|
9689
|
|
|
|
|
|
|
{ |
|
9690
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
9691
|
2
|
|
|
|
|
|
SV* precisionModel = ST(1) |
|
9692
|
|
|
|
|
|
|
; |
|
9693
|
|
|
|
|
|
|
#line 5 "./xsi/noding/IteratedNoder.xsi" |
|
9694
|
|
|
|
|
|
|
PrecisionModel& pm = xs::in(precisionModel); |
|
9695
|
|
|
|
|
|
|
Object wrapped = xs::out(new IteratedNoder(&pm)); |
|
9696
|
|
|
|
|
|
|
wrapped.payload_attach(precisionModel, &payload_marker); |
|
9697
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
9698
|
|
|
|
|
|
|
#line 9699 "Geos.xs.cc" |
|
9699
|
|
|
|
|
|
|
{ |
|
9700
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9701
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
9702
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
9703
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
9704
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
9705
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9706
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9707
|
|
|
|
|
|
|
case SVt_PVCV: |
|
9708
|
|
|
|
|
|
|
case SVt_PVIO: |
|
9709
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
9710
|
0
|
|
|
|
|
|
break; |
|
9711
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
9712
|
|
|
|
|
|
|
} |
|
9713
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9714
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
9715
|
|
|
|
|
|
|
} |
|
9716
|
|
|
|
|
|
|
} |
|
9717
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
9718
|
2
|
50
|
|
|
|
|
}); } |
|
9719
|
|
|
|
|
|
|
|
|
9720
|
|
|
|
|
|
|
|
|
9721
|
|
|
|
|
|
|
|
|
9722
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IteratedNoder_setMaximumIterations) { xs::throw_guard(aTHX_ cv, [=]() |
|
9723
|
|
|
|
|
|
|
{ |
|
9724
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9725
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
9726
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, n"); |
|
9727
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
9728
|
1
|
|
|
|
|
|
SP -= items; |
|
9729
|
|
|
|
|
|
|
{ |
|
9730
|
1
|
50
|
|
|
|
|
IteratedNoder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9731
|
|
|
|
|
|
|
; |
|
9732
|
1
|
50
|
|
|
|
|
int n = (int)SvIV(ST(1)) |
|
9733
|
|
|
|
|
|
|
; |
|
9734
|
|
|
|
|
|
|
#line 11 "./xsi/noding/IteratedNoder.xsi" |
|
9735
|
|
|
|
|
|
|
THIS->setMaximumIterations(n); |
|
9736
|
|
|
|
|
|
|
#line 9737 "Geos.xs.cc" |
|
9737
|
1
|
|
|
|
|
|
PUTBACK; |
|
9738
|
1
|
|
|
|
|
|
return; |
|
9739
|
|
|
|
|
|
|
} |
|
9740
|
1
|
50
|
|
|
|
|
}); } |
|
9741
|
|
|
|
|
|
|
|
|
9742
|
|
|
|
|
|
|
|
|
9743
|
|
|
|
|
|
|
|
|
9744
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IteratedNoder_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
9745
|
|
|
|
|
|
|
{ |
|
9746
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9747
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
9748
|
|
|
|
|
|
|
{ |
|
9749
|
|
|
|
|
|
|
int RETVAL; |
|
9750
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
9751
|
|
|
|
|
|
|
#line 13 "./xsi/noding/IteratedNoder.xsi" |
|
9752
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
9753
|
|
|
|
|
|
|
#line 9754 "Geos.xs.cc" |
|
9754
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
9755
|
|
|
|
|
|
|
} |
|
9756
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
9757
|
0
|
0
|
|
|
|
|
}); } |
|
9758
|
|
|
|
|
|
|
|
|
9759
|
|
|
|
|
|
|
|
|
9760
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/IteratedNoder.xsi' */ |
|
9761
|
|
|
|
|
|
|
|
|
9762
|
|
|
|
|
|
|
|
|
9763
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/ScaledNoder.xsi' from 'Geos.xs' */ |
|
9764
|
|
|
|
|
|
|
|
|
9765
|
|
|
|
|
|
|
|
|
9766
|
|
|
|
|
|
|
|
|
9767
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__ScaledNoder_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
9768
|
|
|
|
|
|
|
{ |
|
9769
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9770
|
1
|
50
|
|
|
|
|
if (items < 3 || items > 5) |
|
|
|
50
|
|
|
|
|
|
|
9771
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, noder, nScaleFactor, nOffsetX= 0.0, nOffsetY= 0.0"); |
|
9772
|
|
|
|
|
|
|
{ |
|
9773
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
9774
|
1
|
|
|
|
|
|
SV* noder = ST(1) |
|
9775
|
|
|
|
|
|
|
; |
|
9776
|
1
|
50
|
|
|
|
|
double nScaleFactor = (double)SvNV(ST(2)) |
|
|
|
50
|
|
|
|
|
|
|
9777
|
|
|
|
|
|
|
; |
|
9778
|
|
|
|
|
|
|
double nOffsetX; |
|
9779
|
|
|
|
|
|
|
double nOffsetY; |
|
9780
|
|
|
|
|
|
|
|
|
9781
|
1
|
50
|
|
|
|
|
if (items < 4) |
|
9782
|
0
|
|
|
|
|
|
nOffsetX = 0.0; |
|
9783
|
|
|
|
|
|
|
else { |
|
9784
|
2
|
|
|
|
|
|
nOffsetX = (double)SvNV(ST(3)) |
|
9785
|
1
|
50
|
|
|
|
|
; |
|
|
|
50
|
|
|
|
|
|
|
9786
|
|
|
|
|
|
|
} |
|
9787
|
|
|
|
|
|
|
|
|
9788
|
1
|
50
|
|
|
|
|
if (items < 5) |
|
9789
|
0
|
|
|
|
|
|
nOffsetY = 0.0; |
|
9790
|
|
|
|
|
|
|
else { |
|
9791
|
2
|
|
|
|
|
|
nOffsetY = (double)SvNV(ST(4)) |
|
9792
|
1
|
50
|
|
|
|
|
; |
|
|
|
50
|
|
|
|
|
|
|
9793
|
|
|
|
|
|
|
} |
|
9794
|
|
|
|
|
|
|
#line 5 "./xsi/noding/ScaledNoder.xsi" |
|
9795
|
|
|
|
|
|
|
Noder& n = xs::in(noder); |
|
9796
|
|
|
|
|
|
|
Object wrapped = xs::out<>(new ScaledNoder(n, nScaleFactor, nOffsetX, nOffsetY)); |
|
9797
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(noder), &payload_marker); |
|
9798
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
9799
|
|
|
|
|
|
|
#line 9800 "Geos.xs.cc" |
|
9800
|
|
|
|
|
|
|
{ |
|
9801
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9802
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
9803
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
9804
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
9805
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
9806
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9807
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9808
|
|
|
|
|
|
|
case SVt_PVCV: |
|
9809
|
|
|
|
|
|
|
case SVt_PVIO: |
|
9810
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
9811
|
0
|
|
|
|
|
|
break; |
|
9812
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
9813
|
|
|
|
|
|
|
} |
|
9814
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9815
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
9816
|
|
|
|
|
|
|
} |
|
9817
|
|
|
|
|
|
|
} |
|
9818
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9819
|
1
|
50
|
|
|
|
|
}); } |
|
9820
|
|
|
|
|
|
|
|
|
9821
|
|
|
|
|
|
|
|
|
9822
|
|
|
|
|
|
|
|
|
9823
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__ScaledNoder_isIntegerPrecision) { xs::throw_guard(aTHX_ cv, [=]() |
|
9824
|
|
|
|
|
|
|
{ |
|
9825
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9826
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
9827
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
9828
|
|
|
|
|
|
|
{ |
|
9829
|
|
|
|
|
|
|
bool RETVAL; |
|
9830
|
1
|
50
|
|
|
|
|
ScaledNoder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9831
|
|
|
|
|
|
|
; |
|
9832
|
|
|
|
|
|
|
#line 11 "./xsi/noding/ScaledNoder.xsi" |
|
9833
|
|
|
|
|
|
|
RETVAL = THIS->isIntegerPrecision(); |
|
9834
|
|
|
|
|
|
|
#line 9835 "Geos.xs.cc" |
|
9835
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
9836
|
|
|
|
|
|
|
} |
|
9837
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9838
|
1
|
50
|
|
|
|
|
}); } |
|
9839
|
|
|
|
|
|
|
|
|
9840
|
|
|
|
|
|
|
|
|
9841
|
|
|
|
|
|
|
|
|
9842
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__ScaledNoder_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
9843
|
|
|
|
|
|
|
{ |
|
9844
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9845
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
9846
|
|
|
|
|
|
|
{ |
|
9847
|
|
|
|
|
|
|
int RETVAL; |
|
9848
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
9849
|
|
|
|
|
|
|
#line 13 "./xsi/noding/ScaledNoder.xsi" |
|
9850
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
9851
|
|
|
|
|
|
|
#line 9852 "Geos.xs.cc" |
|
9852
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
9853
|
|
|
|
|
|
|
} |
|
9854
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
9855
|
0
|
0
|
|
|
|
|
}); } |
|
9856
|
|
|
|
|
|
|
|
|
9857
|
|
|
|
|
|
|
|
|
9858
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/ScaledNoder.xsi' */ |
|
9859
|
|
|
|
|
|
|
|
|
9860
|
|
|
|
|
|
|
|
|
9861
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/SinglePassNoder.xsi' from 'Geos.xs' */ |
|
9862
|
|
|
|
|
|
|
|
|
9863
|
|
|
|
|
|
|
|
|
9864
|
|
|
|
|
|
|
|
|
9865
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SinglePassNoder_setSegmentIntersector) { xs::throw_guard(aTHX_ cv, [=]() |
|
9866
|
|
|
|
|
|
|
{ |
|
9867
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9868
|
0
|
0
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
0
|
|
|
|
|
|
|
9869
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newSegInt= NULL"); |
|
9870
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
9871
|
0
|
|
|
|
|
|
SP -= items; |
|
9872
|
|
|
|
|
|
|
{ |
|
9873
|
0
|
0
|
|
|
|
|
SinglePassNoder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9874
|
|
|
|
|
|
|
; |
|
9875
|
|
|
|
|
|
|
SV * newSegInt; |
|
9876
|
|
|
|
|
|
|
|
|
9877
|
0
|
0
|
|
|
|
|
if (items < 2) |
|
9878
|
0
|
|
|
|
|
|
newSegInt = NULL; |
|
9879
|
|
|
|
|
|
|
else { |
|
9880
|
0
|
|
|
|
|
|
newSegInt = ST(1) |
|
9881
|
0
|
|
|
|
|
|
; |
|
9882
|
|
|
|
|
|
|
} |
|
9883
|
|
|
|
|
|
|
#line 5 "./xsi/noding/SinglePassNoder.xsi" |
|
9884
|
|
|
|
|
|
|
Object self{ST(0)}; |
|
9885
|
|
|
|
|
|
|
|
|
9886
|
|
|
|
|
|
|
SegmentIntersector* si = newSegInt ? xs::in(newSegInt) : NULL; |
|
9887
|
|
|
|
|
|
|
if (si) { |
|
9888
|
|
|
|
|
|
|
self.payload_attach(SvRV(newSegInt), &payload_marker); |
|
9889
|
|
|
|
|
|
|
} |
|
9890
|
|
|
|
|
|
|
else if (self.payload_exists(&payload_marker)) { |
|
9891
|
|
|
|
|
|
|
self.payload_detach(&payload_marker); |
|
9892
|
|
|
|
|
|
|
} |
|
9893
|
|
|
|
|
|
|
|
|
9894
|
|
|
|
|
|
|
THIS->setSegmentIntersector(si); |
|
9895
|
|
|
|
|
|
|
#line 9896 "Geos.xs.cc" |
|
9896
|
0
|
|
|
|
|
|
PUTBACK; |
|
9897
|
0
|
|
|
|
|
|
return; |
|
9898
|
|
|
|
|
|
|
} |
|
9899
|
0
|
0
|
|
|
|
|
}); } |
|
9900
|
|
|
|
|
|
|
|
|
9901
|
|
|
|
|
|
|
|
|
9902
|
|
|
|
|
|
|
|
|
9903
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SinglePassNoder_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
9904
|
|
|
|
|
|
|
{ |
|
9905
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9906
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
9907
|
|
|
|
|
|
|
{ |
|
9908
|
|
|
|
|
|
|
int RETVAL; |
|
9909
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
9910
|
|
|
|
|
|
|
#line 19 "./xsi/noding/SinglePassNoder.xsi" |
|
9911
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
9912
|
|
|
|
|
|
|
#line 9913 "Geos.xs.cc" |
|
9913
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
9914
|
|
|
|
|
|
|
} |
|
9915
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
9916
|
0
|
0
|
|
|
|
|
}); } |
|
9917
|
|
|
|
|
|
|
|
|
9918
|
|
|
|
|
|
|
|
|
9919
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/SinglePassNoder.xsi' */ |
|
9920
|
|
|
|
|
|
|
|
|
9921
|
|
|
|
|
|
|
|
|
9922
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/SimpleNoder.xsi' from 'Geos.xs' */ |
|
9923
|
|
|
|
|
|
|
|
|
9924
|
|
|
|
|
|
|
|
|
9925
|
|
|
|
|
|
|
|
|
9926
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SimpleNoder_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
9927
|
|
|
|
|
|
|
{ |
|
9928
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9929
|
1
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
9930
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, newSegInt= NULL"); |
|
9931
|
|
|
|
|
|
|
{ |
|
9932
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
9933
|
|
|
|
|
|
|
SV * newSegInt; |
|
9934
|
|
|
|
|
|
|
|
|
9935
|
1
|
50
|
|
|
|
|
if (items < 2) |
|
9936
|
0
|
|
|
|
|
|
newSegInt = NULL; |
|
9937
|
|
|
|
|
|
|
else { |
|
9938
|
1
|
|
|
|
|
|
newSegInt = ST(1) |
|
9939
|
1
|
|
|
|
|
|
; |
|
9940
|
|
|
|
|
|
|
} |
|
9941
|
|
|
|
|
|
|
#line 5 "./xsi/noding/SimpleNoder.xsi" |
|
9942
|
|
|
|
|
|
|
SegmentIntersector* si = newSegInt ? xs::in(newSegInt) : NULL; |
|
9943
|
|
|
|
|
|
|
Object self{xs::out(new SimpleNoder(si))}; |
|
9944
|
|
|
|
|
|
|
if (si) { |
|
9945
|
|
|
|
|
|
|
self.payload_attach(SvRV(newSegInt), &payload_marker); |
|
9946
|
|
|
|
|
|
|
} |
|
9947
|
|
|
|
|
|
|
RETVAL = self.ref(); |
|
9948
|
|
|
|
|
|
|
#line 9949 "Geos.xs.cc" |
|
9949
|
|
|
|
|
|
|
{ |
|
9950
|
|
|
|
|
|
|
SV * RETVALSV; |
|
9951
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
9952
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
9953
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
9954
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
9955
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9956
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
9957
|
|
|
|
|
|
|
case SVt_PVCV: |
|
9958
|
|
|
|
|
|
|
case SVt_PVIO: |
|
9959
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
9960
|
0
|
|
|
|
|
|
break; |
|
9961
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
9962
|
|
|
|
|
|
|
} |
|
9963
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
9964
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
9965
|
|
|
|
|
|
|
} |
|
9966
|
|
|
|
|
|
|
} |
|
9967
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
9968
|
1
|
50
|
|
|
|
|
}); } |
|
9969
|
|
|
|
|
|
|
|
|
9970
|
|
|
|
|
|
|
|
|
9971
|
|
|
|
|
|
|
|
|
9972
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SimpleNoder_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
9973
|
|
|
|
|
|
|
{ |
|
9974
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9975
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
9976
|
|
|
|
|
|
|
{ |
|
9977
|
|
|
|
|
|
|
int RETVAL; |
|
9978
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
9979
|
|
|
|
|
|
|
#line 14 "./xsi/noding/SimpleNoder.xsi" |
|
9980
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
9981
|
|
|
|
|
|
|
#line 9982 "Geos.xs.cc" |
|
9982
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
9983
|
|
|
|
|
|
|
} |
|
9984
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
9985
|
0
|
0
|
|
|
|
|
}); } |
|
9986
|
|
|
|
|
|
|
|
|
9987
|
|
|
|
|
|
|
|
|
9988
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/SimpleNoder.xsi' */ |
|
9989
|
|
|
|
|
|
|
|
|
9990
|
|
|
|
|
|
|
|
|
9991
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/SimpleSnapRounder.xsi' from 'Geos.xs' */ |
|
9992
|
|
|
|
|
|
|
|
|
9993
|
|
|
|
|
|
|
|
|
9994
|
|
|
|
|
|
|
|
|
9995
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SimpleSnapRounder_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
9996
|
|
|
|
|
|
|
{ |
|
9997
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
9998
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
9999
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, precisionModel"); |
|
10000
|
|
|
|
|
|
|
{ |
|
10001
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
10002
|
2
|
|
|
|
|
|
SV* precisionModel = ST(1) |
|
10003
|
|
|
|
|
|
|
; |
|
10004
|
|
|
|
|
|
|
#line 5 "./xsi/noding/SimpleSnapRounder.xsi" |
|
10005
|
|
|
|
|
|
|
auto& pm = xs::in(precisionModel); |
|
10006
|
|
|
|
|
|
|
Object wrapped = xs::out(new SimpleSnapRounder(pm)); |
|
10007
|
|
|
|
|
|
|
wrapped.payload_attach(precisionModel, &payload_marker); |
|
10008
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
10009
|
|
|
|
|
|
|
#line 10010 "Geos.xs.cc" |
|
10010
|
|
|
|
|
|
|
{ |
|
10011
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10012
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
10013
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
10014
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
10015
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
10016
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
10017
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
10018
|
|
|
|
|
|
|
case SVt_PVCV: |
|
10019
|
|
|
|
|
|
|
case SVt_PVIO: |
|
10020
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
10021
|
0
|
|
|
|
|
|
break; |
|
10022
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
10023
|
|
|
|
|
|
|
} |
|
10024
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10025
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
10026
|
|
|
|
|
|
|
} |
|
10027
|
|
|
|
|
|
|
} |
|
10028
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
10029
|
2
|
50
|
|
|
|
|
}); } |
|
10030
|
|
|
|
|
|
|
|
|
10031
|
|
|
|
|
|
|
|
|
10032
|
|
|
|
|
|
|
|
|
10033
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SimpleSnapRounder_computeVertexSnaps) { xs::throw_guard(aTHX_ cv, [=]() |
|
10034
|
|
|
|
|
|
|
{ |
|
10035
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10036
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
10037
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, edges"); |
|
10038
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
10039
|
2
|
|
|
|
|
|
SP -= items; |
|
10040
|
|
|
|
|
|
|
{ |
|
10041
|
2
|
50
|
|
|
|
|
SimpleSnapRounder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10042
|
|
|
|
|
|
|
; |
|
10043
|
4
|
50
|
|
|
|
|
Array edges = ST(1); |
|
10044
|
2
|
50
|
|
|
|
|
if (!edges && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
10045
|
0
|
|
|
|
|
|
; |
|
10046
|
|
|
|
|
|
|
#line 12 "./xsi/noding/SimpleSnapRounder.xsi" |
|
10047
|
|
|
|
|
|
|
std::vector v; |
|
10048
|
|
|
|
|
|
|
v.reserve(edges.size()); |
|
10049
|
|
|
|
|
|
|
|
|
10050
|
|
|
|
|
|
|
for(auto it: edges) { |
|
10051
|
|
|
|
|
|
|
auto& ss = xs::in(it); |
|
10052
|
|
|
|
|
|
|
v.push_back(&ss); |
|
10053
|
|
|
|
|
|
|
} |
|
10054
|
|
|
|
|
|
|
THIS->computeVertexSnaps(v); |
|
10055
|
|
|
|
|
|
|
#line 10056 "Geos.xs.cc" |
|
10056
|
2
|
|
|
|
|
|
PUTBACK; |
|
10057
|
4
|
|
|
|
|
|
return; |
|
10058
|
|
|
|
|
|
|
} |
|
10059
|
2
|
50
|
|
|
|
|
}); } |
|
10060
|
|
|
|
|
|
|
|
|
10061
|
|
|
|
|
|
|
|
|
10062
|
|
|
|
|
|
|
|
|
10063
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SimpleSnapRounder_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
10064
|
|
|
|
|
|
|
{ |
|
10065
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10066
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
10067
|
|
|
|
|
|
|
{ |
|
10068
|
|
|
|
|
|
|
int RETVAL; |
|
10069
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
10070
|
|
|
|
|
|
|
#line 23 "./xsi/noding/SimpleSnapRounder.xsi" |
|
10071
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
10072
|
|
|
|
|
|
|
#line 10073 "Geos.xs.cc" |
|
10073
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
10074
|
|
|
|
|
|
|
} |
|
10075
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
10076
|
0
|
0
|
|
|
|
|
}); } |
|
10077
|
|
|
|
|
|
|
|
|
10078
|
|
|
|
|
|
|
|
|
10079
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/SimpleSnapRounder.xsi' */ |
|
10080
|
|
|
|
|
|
|
|
|
10081
|
|
|
|
|
|
|
|
|
10082
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/index/MonotoneChain.xsi' from 'Geos.xs' */ |
|
10083
|
|
|
|
|
|
|
|
|
10084
|
|
|
|
|
|
|
|
|
10085
|
|
|
|
|
|
|
|
|
10086
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
10087
|
|
|
|
|
|
|
{ |
|
10088
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10089
|
2
|
50
|
|
|
|
|
if (items != 4) |
|
10090
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, pts, start, end"); |
|
10091
|
|
|
|
|
|
|
{ |
|
10092
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
10093
|
4
|
50
|
|
|
|
|
Array pts = ST(1); |
|
|
|
50
|
|
|
|
|
|
|
10094
|
2
|
50
|
|
|
|
|
if (!pts && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
10095
|
0
|
|
|
|
|
|
; |
|
10096
|
2
|
50
|
|
|
|
|
std::size_t start = xs::in(aTHX_ ST(2)); |
|
10097
|
|
|
|
|
|
|
; |
|
10098
|
2
|
50
|
|
|
|
|
std::size_t end = xs::in(aTHX_ ST(3)); |
|
10099
|
|
|
|
|
|
|
; |
|
10100
|
|
|
|
|
|
|
#line 5 "./xsi/index/MonotoneChain.xsi" |
|
10101
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(pts); |
|
10102
|
|
|
|
|
|
|
auto seq_ptr = seq.clone(); |
|
10103
|
|
|
|
|
|
|
auto payload = new MonotoneChain_payload(); |
|
10104
|
|
|
|
|
|
|
payload->seq.reset(seq_ptr); |
|
10105
|
|
|
|
|
|
|
|
|
10106
|
|
|
|
|
|
|
Object wrapped = xs::out<>(new MonotoneChain(*seq_ptr, start, end, NULL)); |
|
10107
|
|
|
|
|
|
|
wrapped.payload_attach(payload, &payload_marker_MonotoneChain); |
|
10108
|
|
|
|
|
|
|
|
|
10109
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
10110
|
|
|
|
|
|
|
#line 10111 "Geos.xs.cc" |
|
10111
|
|
|
|
|
|
|
{ |
|
10112
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10113
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
10114
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
10115
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
10116
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
10117
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
10118
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
10119
|
|
|
|
|
|
|
case SVt_PVCV: |
|
10120
|
|
|
|
|
|
|
case SVt_PVIO: |
|
10121
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
10122
|
0
|
|
|
|
|
|
break; |
|
10123
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
10124
|
|
|
|
|
|
|
} |
|
10125
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10126
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
10127
|
|
|
|
|
|
|
} |
|
10128
|
|
|
|
|
|
|
} |
|
10129
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
10130
|
2
|
50
|
|
|
|
|
}); } |
|
10131
|
|
|
|
|
|
|
|
|
10132
|
|
|
|
|
|
|
|
|
10133
|
|
|
|
|
|
|
|
|
10134
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getChains) { xs::throw_guard(aTHX_ cv, [=]() |
|
10135
|
|
|
|
|
|
|
{ |
|
10136
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10137
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
10138
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "pts"); |
|
10139
|
|
|
|
|
|
|
{ |
|
10140
|
2
|
|
|
|
|
|
Array RETVAL; |
|
10141
|
2
|
50
|
|
|
|
|
Array pts = ST(0); |
|
|
|
50
|
|
|
|
|
|
|
10142
|
1
|
50
|
|
|
|
|
if (!pts && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
10143
|
0
|
|
|
|
|
|
; |
|
10144
|
|
|
|
|
|
|
#line 17 "./xsi/index/MonotoneChain.xsi" |
|
10145
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(pts); |
|
10146
|
|
|
|
|
|
|
std::vector v; |
|
10147
|
|
|
|
|
|
|
MonotoneChainBuilder::getChains(&seq, NULL, v); |
|
10148
|
|
|
|
|
|
|
|
|
10149
|
|
|
|
|
|
|
Array result = Array::create(v.size()); |
|
10150
|
|
|
|
|
|
|
for(auto mc: v) { |
|
10151
|
|
|
|
|
|
|
result.push(xs::out(mc)); |
|
10152
|
|
|
|
|
|
|
} |
|
10153
|
|
|
|
|
|
|
RETVAL = result; |
|
10154
|
|
|
|
|
|
|
#line 10155 "Geos.xs.cc" |
|
10155
|
|
|
|
|
|
|
{ |
|
10156
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10157
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
10158
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
10159
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
10160
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10161
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
10162
|
|
|
|
|
|
|
} |
|
10163
|
|
|
|
|
|
|
} |
|
10164
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10165
|
1
|
50
|
|
|
|
|
}); } |
|
10166
|
|
|
|
|
|
|
|
|
10167
|
|
|
|
|
|
|
|
|
10168
|
|
|
|
|
|
|
|
|
10169
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getEnvelope) { xs::throw_guard(aTHX_ cv, [=]() |
|
10170
|
|
|
|
|
|
|
{ |
|
10171
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10172
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
10173
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
10174
|
|
|
|
|
|
|
{ |
|
10175
|
|
|
|
|
|
|
Envelope * RETVAL; |
|
10176
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10177
|
|
|
|
|
|
|
; |
|
10178
|
|
|
|
|
|
|
#line 29 "./xsi/index/MonotoneChain.xsi" |
|
10179
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
10180
|
|
|
|
|
|
|
RETVAL = new Envelope(THIS->getEnvelope()); |
|
10181
|
|
|
|
|
|
|
#line 10182 "Geos.xs.cc" |
|
10182
|
|
|
|
|
|
|
{ |
|
10183
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10184
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
10185
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10186
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
10187
|
|
|
|
|
|
|
} |
|
10188
|
|
|
|
|
|
|
} |
|
10189
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10190
|
1
|
50
|
|
|
|
|
}); } |
|
10191
|
|
|
|
|
|
|
|
|
10192
|
|
|
|
|
|
|
|
|
10193
|
|
|
|
|
|
|
|
|
10194
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getStartIndex) { xs::throw_guard(aTHX_ cv, [=]() |
|
10195
|
|
|
|
|
|
|
{ |
|
10196
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10197
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
10198
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
10199
|
|
|
|
|
|
|
{ |
|
10200
|
|
|
|
|
|
|
size_t RETVAL; |
|
10201
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
10202
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10203
|
|
|
|
|
|
|
; |
|
10204
|
|
|
|
|
|
|
#line 32 "./xsi/index/MonotoneChain.xsi" |
|
10205
|
|
|
|
|
|
|
RETVAL = THIS->getStartIndex(); |
|
10206
|
|
|
|
|
|
|
#line 10207 "Geos.xs.cc" |
|
10207
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
10208
|
|
|
|
|
|
|
} |
|
10209
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10210
|
1
|
50
|
|
|
|
|
}); } |
|
10211
|
|
|
|
|
|
|
|
|
10212
|
|
|
|
|
|
|
|
|
10213
|
|
|
|
|
|
|
|
|
10214
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getEndIndex) { xs::throw_guard(aTHX_ cv, [=]() |
|
10215
|
|
|
|
|
|
|
{ |
|
10216
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10217
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
10218
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
10219
|
|
|
|
|
|
|
{ |
|
10220
|
|
|
|
|
|
|
size_t RETVAL; |
|
10221
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
10222
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10223
|
|
|
|
|
|
|
; |
|
10224
|
|
|
|
|
|
|
#line 34 "./xsi/index/MonotoneChain.xsi" |
|
10225
|
|
|
|
|
|
|
RETVAL = THIS->getEndIndex(); |
|
10226
|
|
|
|
|
|
|
#line 10227 "Geos.xs.cc" |
|
10227
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
10228
|
|
|
|
|
|
|
} |
|
10229
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10230
|
1
|
50
|
|
|
|
|
}); } |
|
10231
|
|
|
|
|
|
|
|
|
10232
|
|
|
|
|
|
|
|
|
10233
|
|
|
|
|
|
|
|
|
10234
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getLineSegment) { xs::throw_guard(aTHX_ cv, [=]() |
|
10235
|
|
|
|
|
|
|
{ |
|
10236
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10237
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
10238
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, index"); |
|
10239
|
|
|
|
|
|
|
{ |
|
10240
|
|
|
|
|
|
|
LineSegment * RETVAL; |
|
10241
|
2
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10242
|
|
|
|
|
|
|
; |
|
10243
|
2
|
50
|
|
|
|
|
std::size_t index = xs::in(aTHX_ ST(1)); |
|
10244
|
|
|
|
|
|
|
; |
|
10245
|
|
|
|
|
|
|
#line 37 "./xsi/index/MonotoneChain.xsi" |
|
10246
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
10247
|
|
|
|
|
|
|
LineSegment ls; |
|
10248
|
|
|
|
|
|
|
THIS->getLineSegment(index, ls); |
|
10249
|
|
|
|
|
|
|
RETVAL = new LineSegment(ls); |
|
10250
|
|
|
|
|
|
|
#line 10251 "Geos.xs.cc" |
|
10251
|
|
|
|
|
|
|
{ |
|
10252
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10253
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
10254
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10255
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
10256
|
|
|
|
|
|
|
} |
|
10257
|
|
|
|
|
|
|
} |
|
10258
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
10259
|
2
|
50
|
|
|
|
|
}); } |
|
10260
|
|
|
|
|
|
|
|
|
10261
|
|
|
|
|
|
|
|
|
10262
|
|
|
|
|
|
|
|
|
10263
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getCoordinates) { xs::throw_guard(aTHX_ cv, [=]() |
|
10264
|
|
|
|
|
|
|
{ |
|
10265
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10266
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
10267
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
10268
|
|
|
|
|
|
|
{ |
|
10269
|
2
|
|
|
|
|
|
Array RETVAL; |
|
10270
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10271
|
|
|
|
|
|
|
; |
|
10272
|
|
|
|
|
|
|
#line 43 "./xsi/index/MonotoneChain.xsi" |
|
10273
|
|
|
|
|
|
|
auto smart_ptr = THIS->getCoordinates(); |
|
10274
|
|
|
|
|
|
|
RETVAL = Helper::convert_copy(smart_ptr.get()); |
|
10275
|
|
|
|
|
|
|
#line 10276 "Geos.xs.cc" |
|
10276
|
|
|
|
|
|
|
{ |
|
10277
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10278
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
10279
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
10280
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
10281
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10282
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
10283
|
|
|
|
|
|
|
} |
|
10284
|
|
|
|
|
|
|
} |
|
10285
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10286
|
1
|
50
|
|
|
|
|
}); } |
|
10287
|
|
|
|
|
|
|
|
|
10288
|
|
|
|
|
|
|
|
|
10289
|
|
|
|
|
|
|
|
|
10290
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_computeOverlaps) { xs::throw_guard(aTHX_ cv, [=]() |
|
10291
|
|
|
|
|
|
|
{ |
|
10292
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10293
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
10294
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, mc, mco"); |
|
10295
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
10296
|
1
|
|
|
|
|
|
SP -= items; |
|
10297
|
|
|
|
|
|
|
{ |
|
10298
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10299
|
|
|
|
|
|
|
; |
|
10300
|
1
|
|
|
|
|
|
MonotoneChain & mc = xs::in(aTHX_ ST(1)); |
|
10301
|
|
|
|
|
|
|
; |
|
10302
|
1
|
|
|
|
|
|
MonotoneChainOverlapAction & mco = xs::in(aTHX_ ST(2)); |
|
10303
|
|
|
|
|
|
|
; |
|
10304
|
|
|
|
|
|
|
#line 48 "./xsi/index/MonotoneChain.xsi" |
|
10305
|
|
|
|
|
|
|
THIS->computeOverlaps(&mc, &mco); |
|
10306
|
|
|
|
|
|
|
#line 10307 "Geos.xs.cc" |
|
10307
|
1
|
|
|
|
|
|
PUTBACK; |
|
10308
|
1
|
|
|
|
|
|
return; |
|
10309
|
|
|
|
|
|
|
} |
|
10310
|
1
|
50
|
|
|
|
|
}); } |
|
10311
|
|
|
|
|
|
|
|
|
10312
|
|
|
|
|
|
|
|
|
10313
|
|
|
|
|
|
|
|
|
10314
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_setId) { xs::throw_guard(aTHX_ cv, [=]() |
|
10315
|
|
|
|
|
|
|
{ |
|
10316
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10317
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
10318
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, nId"); |
|
10319
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
10320
|
1
|
|
|
|
|
|
SP -= items; |
|
10321
|
|
|
|
|
|
|
{ |
|
10322
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10323
|
|
|
|
|
|
|
; |
|
10324
|
1
|
50
|
|
|
|
|
int nId = (int)SvIV(ST(1)) |
|
10325
|
|
|
|
|
|
|
; |
|
10326
|
|
|
|
|
|
|
#line 51 "./xsi/index/MonotoneChain.xsi" |
|
10327
|
|
|
|
|
|
|
THIS->setId(nId); |
|
10328
|
|
|
|
|
|
|
#line 10329 "Geos.xs.cc" |
|
10329
|
1
|
|
|
|
|
|
PUTBACK; |
|
10330
|
1
|
|
|
|
|
|
return; |
|
10331
|
|
|
|
|
|
|
} |
|
10332
|
1
|
50
|
|
|
|
|
}); } |
|
10333
|
|
|
|
|
|
|
|
|
10334
|
|
|
|
|
|
|
|
|
10335
|
|
|
|
|
|
|
|
|
10336
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getId) { xs::throw_guard(aTHX_ cv, [=]() |
|
10337
|
|
|
|
|
|
|
{ |
|
10338
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10339
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
10340
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
10341
|
|
|
|
|
|
|
{ |
|
10342
|
|
|
|
|
|
|
int RETVAL; |
|
10343
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
10344
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10345
|
|
|
|
|
|
|
; |
|
10346
|
|
|
|
|
|
|
#line 53 "./xsi/index/MonotoneChain.xsi" |
|
10347
|
|
|
|
|
|
|
RETVAL = THIS->getId(); |
|
10348
|
|
|
|
|
|
|
#line 10349 "Geos.xs.cc" |
|
10349
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
10350
|
|
|
|
|
|
|
} |
|
10351
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10352
|
1
|
50
|
|
|
|
|
}); } |
|
10353
|
|
|
|
|
|
|
|
|
10354
|
|
|
|
|
|
|
|
|
10355
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/index/MonotoneChain.xsi' */ |
|
10356
|
|
|
|
|
|
|
|
|
10357
|
|
|
|
|
|
|
|
|
10358
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/index/MonotoneChainOverlapAction.xsi' from 'Geos.xs' */ |
|
10359
|
|
|
|
|
|
|
|
|
10360
|
|
|
|
|
|
|
|
|
10361
|
|
|
|
|
|
|
|
|
10362
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChainOverlapAction_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
10363
|
|
|
|
|
|
|
{ |
|
10364
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10365
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
10366
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*"); |
|
10367
|
|
|
|
|
|
|
{ |
|
10368
|
|
|
|
|
|
|
MonotoneChainOverlapAction * RETVAL; |
|
10369
|
|
|
|
|
|
|
#line 4 "./xsi/index/MonotoneChainOverlapAction.xsi" |
|
10370
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
10371
|
|
|
|
|
|
|
RETVAL = new MonotoneChainOverlapAction(); |
|
10372
|
|
|
|
|
|
|
#line 10373 "Geos.xs.cc" |
|
10373
|
|
|
|
|
|
|
{ |
|
10374
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10375
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
10376
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10377
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
10378
|
|
|
|
|
|
|
} |
|
10379
|
|
|
|
|
|
|
} |
|
10380
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10381
|
1
|
50
|
|
|
|
|
}); } |
|
10382
|
|
|
|
|
|
|
|
|
10383
|
|
|
|
|
|
|
|
|
10384
|
|
|
|
|
|
|
|
|
10385
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChainOverlapAction_overlap) { xs::throw_guard(aTHX_ cv, [=]() |
|
10386
|
|
|
|
|
|
|
{ |
|
10387
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10388
|
2
|
50
|
|
|
|
|
if (items < 3 || items > 5) |
|
|
|
50
|
|
|
|
|
|
|
10389
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1, arg2, arg3= NULL, arg4= NULL"); |
|
10390
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
10391
|
2
|
|
|
|
|
|
SP -= items; |
|
10392
|
|
|
|
|
|
|
{ |
|
10393
|
2
|
50
|
|
|
|
|
MonotoneChainOverlapAction* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10394
|
|
|
|
|
|
|
; |
|
10395
|
4
|
50
|
|
|
|
|
Object arg1 = ST(1); |
|
10396
|
2
|
50
|
|
|
|
|
if (!arg1 && SvOK(ST(1))) throw "arg is not a blessed reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
10397
|
0
|
|
|
|
|
|
; |
|
10398
|
2
|
|
|
|
|
|
SV* arg2 = ST(2) |
|
10399
|
|
|
|
|
|
|
; |
|
10400
|
|
|
|
|
|
|
SV* arg3; |
|
10401
|
|
|
|
|
|
|
SV* arg4; |
|
10402
|
|
|
|
|
|
|
|
|
10403
|
2
|
100
|
|
|
|
|
if (items < 4) |
|
10404
|
1
|
|
|
|
|
|
arg3 = NULL; |
|
10405
|
|
|
|
|
|
|
else { |
|
10406
|
1
|
|
|
|
|
|
arg3 = ST(3) |
|
10407
|
1
|
|
|
|
|
|
; |
|
10408
|
|
|
|
|
|
|
} |
|
10409
|
|
|
|
|
|
|
|
|
10410
|
2
|
100
|
|
|
|
|
if (items < 5) |
|
10411
|
1
|
|
|
|
|
|
arg4 = NULL; |
|
10412
|
|
|
|
|
|
|
else { |
|
10413
|
1
|
|
|
|
|
|
arg4 = ST(4) |
|
10414
|
1
|
|
|
|
|
|
; |
|
10415
|
|
|
|
|
|
|
} |
|
10416
|
|
|
|
|
|
|
#line 7 "./xsi/index/MonotoneChainOverlapAction.xsi" |
|
10417
|
|
|
|
|
|
|
if (arg1.stash().name() == "Geo::Geos::LineSegment") { |
|
10418
|
|
|
|
|
|
|
auto& ls1 = xs::in(arg1); |
|
10419
|
|
|
|
|
|
|
auto& ls2 = xs::in(arg2); |
|
10420
|
|
|
|
|
|
|
THIS->overlap(ls1, ls2); |
|
10421
|
|
|
|
|
|
|
} |
|
10422
|
|
|
|
|
|
|
else { |
|
10423
|
|
|
|
|
|
|
if(!arg2) throw("undef not allowed"); |
|
10424
|
|
|
|
|
|
|
if(!arg4) throw("undef not allowed"); |
|
10425
|
|
|
|
|
|
|
auto& mc1 = xs::in(arg1); |
|
10426
|
|
|
|
|
|
|
auto& mc2 = xs::in(arg3); |
|
10427
|
|
|
|
|
|
|
std::size_t start1 = SvUV(arg2); |
|
10428
|
|
|
|
|
|
|
std::size_t start2 = SvUV(arg4); |
|
10429
|
|
|
|
|
|
|
THIS->overlap(mc1, start1, mc2, start2); |
|
10430
|
|
|
|
|
|
|
} |
|
10431
|
|
|
|
|
|
|
#line 10432 "Geos.xs.cc" |
|
10432
|
2
|
|
|
|
|
|
PUTBACK; |
|
10433
|
4
|
|
|
|
|
|
return; |
|
10434
|
|
|
|
|
|
|
} |
|
10435
|
2
|
50
|
|
|
|
|
}); } |
|
10436
|
|
|
|
|
|
|
|
|
10437
|
|
|
|
|
|
|
|
|
10438
|
|
|
|
|
|
|
|
|
10439
|
8
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChainOverlapAction_tempEnv1) { xs::throw_guard(aTHX_ cv, [=]() |
|
10440
|
|
|
|
|
|
|
{ |
|
10441
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10442
|
4
|
|
|
|
|
|
dXSI32; |
|
10443
|
4
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
10444
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
10445
|
|
|
|
|
|
|
{ |
|
10446
|
|
|
|
|
|
|
Envelope * RETVAL; |
|
10447
|
4
|
50
|
|
|
|
|
MonotoneChainOverlapAction* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10448
|
|
|
|
|
|
|
; |
|
10449
|
|
|
|
|
|
|
SV* newval; |
|
10450
|
|
|
|
|
|
|
|
|
10451
|
4
|
50
|
|
|
|
|
if (items < 2) |
|
10452
|
4
|
|
|
|
|
|
newval = NULL; |
|
10453
|
|
|
|
|
|
|
else { |
|
10454
|
0
|
|
|
|
|
|
newval = ST(1) |
|
10455
|
0
|
|
|
|
|
|
; |
|
10456
|
|
|
|
|
|
|
} |
|
10457
|
|
|
|
|
|
|
#line 24 "./xsi/index/MonotoneChainOverlapAction.xsi" |
|
10458
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
10459
|
|
|
|
|
|
|
Envelope* val; |
|
10460
|
|
|
|
|
|
|
switch (ix) { |
|
10461
|
|
|
|
|
|
|
case 0: val = &THIS->tempEnv1; break; |
|
10462
|
|
|
|
|
|
|
default: val = &THIS->tempEnv2; break; |
|
10463
|
|
|
|
|
|
|
} |
|
10464
|
|
|
|
|
|
|
if (newval) { |
|
10465
|
|
|
|
|
|
|
auto e = xs::in(newval); |
|
10466
|
|
|
|
|
|
|
*val = *e; |
|
10467
|
|
|
|
|
|
|
} |
|
10468
|
|
|
|
|
|
|
RETVAL = new Envelope(*val); |
|
10469
|
|
|
|
|
|
|
#line 10470 "Geos.xs.cc" |
|
10470
|
|
|
|
|
|
|
{ |
|
10471
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10472
|
4
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
10473
|
4
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10474
|
4
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
10475
|
|
|
|
|
|
|
} |
|
10476
|
|
|
|
|
|
|
} |
|
10477
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
10478
|
4
|
50
|
|
|
|
|
}); } |
|
10479
|
|
|
|
|
|
|
|
|
10480
|
|
|
|
|
|
|
|
|
10481
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/index/MonotoneChainOverlapAction.xsi' */ |
|
10482
|
|
|
|
|
|
|
|
|
10483
|
|
|
|
|
|
|
|
|
10484
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/index/SpatialIndex.xsi' from 'Geos.xs' */ |
|
10485
|
|
|
|
|
|
|
|
|
10486
|
|
|
|
|
|
|
|
|
10487
|
|
|
|
|
|
|
|
|
10488
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__SpatialIndex_query) { xs::throw_guard(aTHX_ cv, [=]() |
|
10489
|
|
|
|
|
|
|
{ |
|
10490
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10491
|
7
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
10492
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, env, arg= NULL"); |
|
10493
|
|
|
|
|
|
|
{ |
|
10494
|
12
|
|
|
|
|
|
Array RETVAL; |
|
10495
|
7
|
50
|
|
|
|
|
SpatialIndex* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10496
|
|
|
|
|
|
|
; |
|
10497
|
7
|
50
|
|
|
|
|
Envelope& env = xs::in(aTHX_ ST(1)); |
|
10498
|
|
|
|
|
|
|
; |
|
10499
|
|
|
|
|
|
|
SV* arg; |
|
10500
|
|
|
|
|
|
|
|
|
10501
|
7
|
100
|
|
|
|
|
if (items < 3) |
|
10502
|
5
|
|
|
|
|
|
arg = NULL; |
|
10503
|
|
|
|
|
|
|
else { |
|
10504
|
2
|
|
|
|
|
|
arg = ST(2) |
|
10505
|
2
|
|
|
|
|
|
; |
|
10506
|
|
|
|
|
|
|
} |
|
10507
|
|
|
|
|
|
|
#line 5 "./xsi/index/SpatialIndex.xsi" |
|
10508
|
|
|
|
|
|
|
Object me {ST(0)}; |
|
10509
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker_SVs_map); |
|
10510
|
|
|
|
|
|
|
auto real_payload = static_cast(payload.ptr); |
|
10511
|
|
|
|
|
|
|
|
|
10512
|
|
|
|
|
|
|
if (!arg) { |
|
10513
|
|
|
|
|
|
|
std::vector v; |
|
10514
|
|
|
|
|
|
|
THIS->query(&env, v); |
|
10515
|
|
|
|
|
|
|
RETVAL = Helper::wrap_inc_SVs(&v, real_payload->map); |
|
10516
|
|
|
|
|
|
|
} |
|
10517
|
|
|
|
|
|
|
else { |
|
10518
|
|
|
|
|
|
|
Sub visitor {arg}; |
|
10519
|
|
|
|
|
|
|
if (!visitor) throw "Unsupported argument"; |
|
10520
|
|
|
|
|
|
|
SubItemVisitor v{visitor, real_payload->map}; |
|
10521
|
|
|
|
|
|
|
THIS->query(&env, v); |
|
10522
|
|
|
|
|
|
|
XSRETURN_UNDEF; |
|
10523
|
|
|
|
|
|
|
} |
|
10524
|
|
|
|
|
|
|
#line 10525 "Geos.xs.cc" |
|
10525
|
|
|
|
|
|
|
{ |
|
10526
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10527
|
5
|
|
|
|
|
|
RETVALSV = NULL; |
|
10528
|
5
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
10529
|
5
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
10530
|
5
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10531
|
7
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
10532
|
|
|
|
|
|
|
} |
|
10533
|
|
|
|
|
|
|
} |
|
10534
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
10535
|
7
|
50
|
|
|
|
|
}); } |
|
10536
|
|
|
|
|
|
|
|
|
10537
|
|
|
|
|
|
|
|
|
10538
|
|
|
|
|
|
|
|
|
10539
|
32
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__SpatialIndex_insert) { xs::throw_guard(aTHX_ cv, [=]() |
|
10540
|
|
|
|
|
|
|
{ |
|
10541
|
16
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10542
|
16
|
50
|
|
|
|
|
if (items != 3) |
|
10543
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, env, item"); |
|
10544
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
10545
|
16
|
|
|
|
|
|
SP -= items; |
|
10546
|
|
|
|
|
|
|
{ |
|
10547
|
16
|
50
|
|
|
|
|
SpatialIndex* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10548
|
|
|
|
|
|
|
; |
|
10549
|
16
|
50
|
|
|
|
|
Envelope& env = xs::in(aTHX_ ST(1)); |
|
10550
|
|
|
|
|
|
|
; |
|
10551
|
16
|
|
|
|
|
|
SV* item = ST(2) |
|
10552
|
|
|
|
|
|
|
; |
|
10553
|
|
|
|
|
|
|
#line 24 "./xsi/index/SpatialIndex.xsi" |
|
10554
|
|
|
|
|
|
|
Object me{ST(0)}; |
|
10555
|
|
|
|
|
|
|
|
|
10556
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker_SVs_map); |
|
10557
|
|
|
|
|
|
|
auto real_payload = static_cast(payload.ptr); |
|
10558
|
|
|
|
|
|
|
SV* value = Helper::store_sv(item, real_payload->map); |
|
10559
|
|
|
|
|
|
|
THIS->insert(&env, value); |
|
10560
|
|
|
|
|
|
|
#line 10561 "Geos.xs.cc" |
|
10561
|
16
|
|
|
|
|
|
PUTBACK; |
|
10562
|
32
|
|
|
|
|
|
return; |
|
10563
|
|
|
|
|
|
|
} |
|
10564
|
16
|
50
|
|
|
|
|
}); } |
|
10565
|
|
|
|
|
|
|
|
|
10566
|
|
|
|
|
|
|
|
|
10567
|
|
|
|
|
|
|
|
|
10568
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__SpatialIndex_remove) { xs::throw_guard(aTHX_ cv, [=]() |
|
10569
|
|
|
|
|
|
|
{ |
|
10570
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10571
|
3
|
50
|
|
|
|
|
if (items != 3) |
|
10572
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, env, item"); |
|
10573
|
|
|
|
|
|
|
{ |
|
10574
|
|
|
|
|
|
|
bool RETVAL; |
|
10575
|
3
|
50
|
|
|
|
|
SpatialIndex* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10576
|
|
|
|
|
|
|
; |
|
10577
|
3
|
50
|
|
|
|
|
Envelope& env = xs::in(aTHX_ ST(1)); |
|
10578
|
|
|
|
|
|
|
; |
|
10579
|
3
|
|
|
|
|
|
SV * item = ST(2) |
|
10580
|
|
|
|
|
|
|
; |
|
10581
|
|
|
|
|
|
|
#line 33 "./xsi/index/SpatialIndex.xsi" |
|
10582
|
|
|
|
|
|
|
Object me{ST(0)}; |
|
10583
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker_SVs_map); |
|
10584
|
|
|
|
|
|
|
auto real_payload = static_cast(payload.ptr); |
|
10585
|
|
|
|
|
|
|
|
|
10586
|
|
|
|
|
|
|
SV* value = hv_delete_ent(real_payload->map, item, 0, 0); |
|
10587
|
|
|
|
|
|
|
if (!value) throw "value is n/a in hash"; |
|
10588
|
|
|
|
|
|
|
|
|
10589
|
|
|
|
|
|
|
THIS->remove(&env, value); |
|
10590
|
|
|
|
|
|
|
#line 10591 "Geos.xs.cc" |
|
10591
|
3
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
10592
|
|
|
|
|
|
|
} |
|
10593
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
10594
|
3
|
50
|
|
|
|
|
}); } |
|
10595
|
|
|
|
|
|
|
|
|
10596
|
|
|
|
|
|
|
|
|
10597
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/index/SpatialIndex.xsi' */ |
|
10598
|
|
|
|
|
|
|
|
|
10599
|
|
|
|
|
|
|
|
|
10600
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/index/Quadtree.xsi' from 'Geos.xs' */ |
|
10601
|
|
|
|
|
|
|
|
|
10602
|
|
|
|
|
|
|
|
|
10603
|
|
|
|
|
|
|
|
|
10604
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__Quadtree_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
10605
|
|
|
|
|
|
|
{ |
|
10606
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10607
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
10608
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV"); |
|
10609
|
|
|
|
|
|
|
{ |
|
10610
|
12
|
|
|
|
|
|
Sv RETVAL; |
|
10611
|
|
|
|
|
|
|
#line 5 "./xsi/index/Quadtree.xsi" |
|
10612
|
|
|
|
|
|
|
Object wrapped = xs::out(new quadtree::Quadtree()); |
|
10613
|
|
|
|
|
|
|
auto payload = new SVs_map_payload(); |
|
10614
|
|
|
|
|
|
|
wrapped.payload_attach(payload, &payload_marker_SVs_map); |
|
10615
|
|
|
|
|
|
|
|
|
10616
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
10617
|
|
|
|
|
|
|
#line 10618 "Geos.xs.cc" |
|
10618
|
|
|
|
|
|
|
{ |
|
10619
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10620
|
6
|
|
|
|
|
|
RETVALSV = NULL; |
|
10621
|
6
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
10622
|
6
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
10623
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
10624
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
10625
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
10626
|
|
|
|
|
|
|
case SVt_PVCV: |
|
10627
|
|
|
|
|
|
|
case SVt_PVIO: |
|
10628
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
10629
|
0
|
|
|
|
|
|
break; |
|
10630
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
10631
|
|
|
|
|
|
|
} |
|
10632
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10633
|
6
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
10634
|
|
|
|
|
|
|
} |
|
10635
|
|
|
|
|
|
|
} |
|
10636
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
10637
|
6
|
50
|
|
|
|
|
}); } |
|
10638
|
|
|
|
|
|
|
|
|
10639
|
|
|
|
|
|
|
|
|
10640
|
|
|
|
|
|
|
|
|
10641
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__Quadtree_depth) { xs::throw_guard(aTHX_ cv, [=]() |
|
10642
|
|
|
|
|
|
|
{ |
|
10643
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10644
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
10645
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
10646
|
|
|
|
|
|
|
{ |
|
10647
|
|
|
|
|
|
|
int RETVAL; |
|
10648
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
10649
|
1
|
50
|
|
|
|
|
quadtree::Quadtree* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10650
|
|
|
|
|
|
|
; |
|
10651
|
|
|
|
|
|
|
#line 12 "./xsi/index/Quadtree.xsi" |
|
10652
|
|
|
|
|
|
|
RETVAL = THIS->depth(); |
|
10653
|
|
|
|
|
|
|
#line 10654 "Geos.xs.cc" |
|
10654
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
10655
|
|
|
|
|
|
|
} |
|
10656
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10657
|
1
|
50
|
|
|
|
|
}); } |
|
10658
|
|
|
|
|
|
|
|
|
10659
|
|
|
|
|
|
|
|
|
10660
|
|
|
|
|
|
|
|
|
10661
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__Quadtree_size) { xs::throw_guard(aTHX_ cv, [=]() |
|
10662
|
|
|
|
|
|
|
{ |
|
10663
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10664
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
10665
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
10666
|
|
|
|
|
|
|
{ |
|
10667
|
|
|
|
|
|
|
int RETVAL; |
|
10668
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
10669
|
1
|
50
|
|
|
|
|
quadtree::Quadtree* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10670
|
|
|
|
|
|
|
; |
|
10671
|
|
|
|
|
|
|
#line 14 "./xsi/index/Quadtree.xsi" |
|
10672
|
|
|
|
|
|
|
RETVAL = THIS->size(); |
|
10673
|
|
|
|
|
|
|
#line 10674 "Geos.xs.cc" |
|
10674
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
10675
|
|
|
|
|
|
|
} |
|
10676
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10677
|
1
|
50
|
|
|
|
|
}); } |
|
10678
|
|
|
|
|
|
|
|
|
10679
|
|
|
|
|
|
|
|
|
10680
|
|
|
|
|
|
|
|
|
10681
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__Quadtree_queryAll) { xs::throw_guard(aTHX_ cv, [=]() |
|
10682
|
|
|
|
|
|
|
{ |
|
10683
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10684
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
10685
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
10686
|
|
|
|
|
|
|
{ |
|
10687
|
12
|
|
|
|
|
|
Array RETVAL; |
|
10688
|
6
|
50
|
|
|
|
|
quadtree::Quadtree* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10689
|
|
|
|
|
|
|
; |
|
10690
|
|
|
|
|
|
|
#line 17 "./xsi/index/Quadtree.xsi" |
|
10691
|
|
|
|
|
|
|
Object me{ST(0)}; |
|
10692
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker_SVs_map); |
|
10693
|
|
|
|
|
|
|
auto real_payload = static_cast(payload.ptr); |
|
10694
|
|
|
|
|
|
|
|
|
10695
|
|
|
|
|
|
|
std::unique_ptr> holder {THIS->queryAll()}; |
|
10696
|
|
|
|
|
|
|
RETVAL = Helper::wrap_inc_SVs(holder.get(), real_payload->map); |
|
10697
|
|
|
|
|
|
|
#line 10698 "Geos.xs.cc" |
|
10698
|
|
|
|
|
|
|
{ |
|
10699
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10700
|
6
|
|
|
|
|
|
RETVALSV = NULL; |
|
10701
|
6
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
10702
|
6
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
10703
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10704
|
6
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
10705
|
|
|
|
|
|
|
} |
|
10706
|
|
|
|
|
|
|
} |
|
10707
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
10708
|
6
|
50
|
|
|
|
|
}); } |
|
10709
|
|
|
|
|
|
|
|
|
10710
|
|
|
|
|
|
|
|
|
10711
|
|
|
|
|
|
|
|
|
10712
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__Quadtree_toString) { xs::throw_guard(aTHX_ cv, [=]() |
|
10713
|
|
|
|
|
|
|
{ |
|
10714
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10715
|
2
|
50
|
|
|
|
|
if (items < 1) |
|
10716
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
10717
|
|
|
|
|
|
|
{ |
|
10718
|
4
|
|
|
|
|
|
std::string RETVAL; |
|
10719
|
2
|
100
|
|
|
|
|
dXSTARG; |
|
|
|
50
|
|
|
|
|
|
|
10720
|
2
|
50
|
|
|
|
|
quadtree::Quadtree* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10721
|
|
|
|
|
|
|
; |
|
10722
|
|
|
|
|
|
|
#line 25 "./xsi/index/Quadtree.xsi" |
|
10723
|
|
|
|
|
|
|
RETVAL = THIS->toString(); |
|
10724
|
|
|
|
|
|
|
#line 10725 "Geos.xs.cc" |
|
10725
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10726
|
|
|
|
|
|
|
} |
|
10727
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
10728
|
2
|
50
|
|
|
|
|
}); } |
|
10729
|
|
|
|
|
|
|
|
|
10730
|
|
|
|
|
|
|
|
|
10731
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/index/Quadtree.xsi' */ |
|
10732
|
|
|
|
|
|
|
|
|
10733
|
|
|
|
|
|
|
|
|
10734
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/index/STRtree.xsi' from 'Geos.xs' */ |
|
10735
|
|
|
|
|
|
|
|
|
10736
|
|
|
|
|
|
|
|
|
10737
|
|
|
|
|
|
|
|
|
10738
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__STRtree_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
10739
|
|
|
|
|
|
|
{ |
|
10740
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10741
|
2
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
10742
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV, nodeCapacity= 10"); |
|
10743
|
|
|
|
|
|
|
{ |
|
10744
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
10745
|
|
|
|
|
|
|
std::size_t nodeCapacity; |
|
10746
|
|
|
|
|
|
|
|
|
10747
|
2
|
50
|
|
|
|
|
if (items < 2) |
|
10748
|
2
|
|
|
|
|
|
nodeCapacity = 10; |
|
10749
|
|
|
|
|
|
|
else { |
|
10750
|
0
|
0
|
|
|
|
|
nodeCapacity = xs::in(aTHX_ ST(1)); |
|
10751
|
|
|
|
|
|
|
; |
|
10752
|
|
|
|
|
|
|
} |
|
10753
|
|
|
|
|
|
|
#line 5 "./xsi/index/STRtree.xsi" |
|
10754
|
|
|
|
|
|
|
Object wrapped = xs::out(new strtree::STRtree(nodeCapacity)); |
|
10755
|
|
|
|
|
|
|
auto payload = new SVs_map_payload(); |
|
10756
|
|
|
|
|
|
|
wrapped.payload_attach(payload, &payload_marker_SVs_map); |
|
10757
|
|
|
|
|
|
|
|
|
10758
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
10759
|
|
|
|
|
|
|
#line 10760 "Geos.xs.cc" |
|
10760
|
|
|
|
|
|
|
{ |
|
10761
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10762
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
10763
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
10764
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
10765
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
10766
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
10767
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
10768
|
|
|
|
|
|
|
case SVt_PVCV: |
|
10769
|
|
|
|
|
|
|
case SVt_PVIO: |
|
10770
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
10771
|
0
|
|
|
|
|
|
break; |
|
10772
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
10773
|
|
|
|
|
|
|
} |
|
10774
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10775
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
10776
|
|
|
|
|
|
|
} |
|
10777
|
|
|
|
|
|
|
} |
|
10778
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
10779
|
2
|
50
|
|
|
|
|
}); } |
|
10780
|
|
|
|
|
|
|
|
|
10781
|
|
|
|
|
|
|
|
|
10782
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/index/STRtree.xsi' */ |
|
10783
|
|
|
|
|
|
|
|
|
10784
|
|
|
|
|
|
|
|
|
10785
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/precision.xsi' from 'Geos.xs' */ |
|
10786
|
|
|
|
|
|
|
|
|
10787
|
|
|
|
|
|
|
|
|
10788
|
|
|
|
|
|
|
|
|
10789
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_signExpBits) { xs::throw_guard(aTHX_ cv, [=]() |
|
10790
|
|
|
|
|
|
|
{ |
|
10791
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10792
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
10793
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "num"); |
|
10794
|
|
|
|
|
|
|
{ |
|
10795
|
|
|
|
|
|
|
int64 RETVAL; |
|
10796
|
1
|
50
|
|
|
|
|
int64 num = xs::in(aTHX_ ST(0)); |
|
10797
|
|
|
|
|
|
|
; |
|
10798
|
|
|
|
|
|
|
#line 5 "./xsi/precision.xsi" |
|
10799
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
10800
|
|
|
|
|
|
|
RETVAL = CommonBits::signExpBits(num); |
|
10801
|
|
|
|
|
|
|
#line 10802 "Geos.xs.cc" |
|
10802
|
|
|
|
|
|
|
{ |
|
10803
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10804
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
10805
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10806
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
10807
|
|
|
|
|
|
|
} |
|
10808
|
|
|
|
|
|
|
} |
|
10809
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10810
|
1
|
50
|
|
|
|
|
}); } |
|
10811
|
|
|
|
|
|
|
|
|
10812
|
|
|
|
|
|
|
|
|
10813
|
|
|
|
|
|
|
|
|
10814
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_numCommonMostSigMantissaBits) { xs::throw_guard(aTHX_ cv, [=]() |
|
10815
|
|
|
|
|
|
|
{ |
|
10816
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10817
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
10818
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "num1, num2"); |
|
10819
|
|
|
|
|
|
|
{ |
|
10820
|
|
|
|
|
|
|
int RETVAL; |
|
10821
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
10822
|
1
|
50
|
|
|
|
|
int64 num1 = xs::in(aTHX_ ST(0)); |
|
10823
|
|
|
|
|
|
|
; |
|
10824
|
1
|
50
|
|
|
|
|
int64 num2 = xs::in(aTHX_ ST(1)); |
|
10825
|
|
|
|
|
|
|
; |
|
10826
|
|
|
|
|
|
|
#line 9 "./xsi/precision.xsi" |
|
10827
|
|
|
|
|
|
|
RETVAL = CommonBits::numCommonMostSigMantissaBits(num1, num2); |
|
10828
|
|
|
|
|
|
|
#line 10829 "Geos.xs.cc" |
|
10829
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
10830
|
|
|
|
|
|
|
} |
|
10831
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10832
|
1
|
50
|
|
|
|
|
}); } |
|
10833
|
|
|
|
|
|
|
|
|
10834
|
|
|
|
|
|
|
|
|
10835
|
|
|
|
|
|
|
|
|
10836
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_zeroLowerBits) { xs::throw_guard(aTHX_ cv, [=]() |
|
10837
|
|
|
|
|
|
|
{ |
|
10838
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10839
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
10840
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "bits, nBits"); |
|
10841
|
|
|
|
|
|
|
{ |
|
10842
|
|
|
|
|
|
|
int64 RETVAL; |
|
10843
|
1
|
50
|
|
|
|
|
int64 bits = xs::in(aTHX_ ST(0)); |
|
10844
|
|
|
|
|
|
|
; |
|
10845
|
1
|
50
|
|
|
|
|
int nBits = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
10846
|
|
|
|
|
|
|
; |
|
10847
|
|
|
|
|
|
|
#line 13 "./xsi/precision.xsi" |
|
10848
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
10849
|
|
|
|
|
|
|
RETVAL = CommonBits::zeroLowerBits(bits, nBits); |
|
10850
|
|
|
|
|
|
|
#line 10851 "Geos.xs.cc" |
|
10851
|
|
|
|
|
|
|
{ |
|
10852
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10853
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
10854
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10855
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
10856
|
|
|
|
|
|
|
} |
|
10857
|
|
|
|
|
|
|
} |
|
10858
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10859
|
1
|
50
|
|
|
|
|
}); } |
|
10860
|
|
|
|
|
|
|
|
|
10861
|
|
|
|
|
|
|
|
|
10862
|
|
|
|
|
|
|
|
|
10863
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_getBit) { xs::throw_guard(aTHX_ cv, [=]() |
|
10864
|
|
|
|
|
|
|
{ |
|
10865
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10866
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
10867
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "bits, i"); |
|
10868
|
|
|
|
|
|
|
{ |
|
10869
|
|
|
|
|
|
|
int RETVAL; |
|
10870
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
10871
|
1
|
50
|
|
|
|
|
int64 bits = xs::in(aTHX_ ST(0)); |
|
10872
|
|
|
|
|
|
|
; |
|
10873
|
1
|
50
|
|
|
|
|
int i = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
10874
|
|
|
|
|
|
|
; |
|
10875
|
|
|
|
|
|
|
#line 17 "./xsi/precision.xsi" |
|
10876
|
|
|
|
|
|
|
RETVAL = CommonBits::getBit (bits, i); |
|
10877
|
|
|
|
|
|
|
#line 10878 "Geos.xs.cc" |
|
10878
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
10879
|
|
|
|
|
|
|
} |
|
10880
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
10881
|
1
|
50
|
|
|
|
|
}); } |
|
10882
|
|
|
|
|
|
|
|
|
10883
|
|
|
|
|
|
|
|
|
10884
|
|
|
|
|
|
|
|
|
10885
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_commonIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
10886
|
|
|
|
|
|
|
{ |
|
10887
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10888
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
10889
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1, nReturnToOriginalPrecision= false"); |
|
10890
|
|
|
|
|
|
|
{ |
|
10891
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
10892
|
2
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
10893
|
|
|
|
|
|
|
; |
|
10894
|
2
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
10895
|
|
|
|
|
|
|
; |
|
10896
|
|
|
|
|
|
|
bool nReturnToOriginalPrecision; |
|
10897
|
|
|
|
|
|
|
|
|
10898
|
2
|
100
|
|
|
|
|
if (items < 3) |
|
10899
|
1
|
|
|
|
|
|
nReturnToOriginalPrecision = false; |
|
10900
|
|
|
|
|
|
|
else { |
|
10901
|
1
|
50
|
|
|
|
|
nReturnToOriginalPrecision = (bool)SvTRUE(ST(2)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10902
|
1
|
|
|
|
|
|
; |
|
10903
|
|
|
|
|
|
|
} |
|
10904
|
|
|
|
|
|
|
#line 21 "./xsi/precision.xsi" |
|
10905
|
|
|
|
|
|
|
RETVAL = Helper::uplift(CommonBitsOp(nReturnToOriginalPrecision).intersection(&g0, &g1)); |
|
10906
|
|
|
|
|
|
|
#line 10907 "Geos.xs.cc" |
|
10907
|
|
|
|
|
|
|
{ |
|
10908
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10909
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
10910
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
10911
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
10912
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
10913
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
10914
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
10915
|
|
|
|
|
|
|
case SVt_PVCV: |
|
10916
|
|
|
|
|
|
|
case SVt_PVIO: |
|
10917
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
10918
|
0
|
|
|
|
|
|
break; |
|
10919
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
10920
|
|
|
|
|
|
|
} |
|
10921
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10922
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
10923
|
|
|
|
|
|
|
} |
|
10924
|
|
|
|
|
|
|
} |
|
10925
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
10926
|
2
|
50
|
|
|
|
|
}); } |
|
10927
|
|
|
|
|
|
|
|
|
10928
|
|
|
|
|
|
|
|
|
10929
|
|
|
|
|
|
|
|
|
10930
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_commonUnion) { xs::throw_guard(aTHX_ cv, [=]() |
|
10931
|
|
|
|
|
|
|
{ |
|
10932
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10933
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
10934
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1, nReturnToOriginalPrecision= false"); |
|
10935
|
|
|
|
|
|
|
{ |
|
10936
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
10937
|
2
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
10938
|
|
|
|
|
|
|
; |
|
10939
|
2
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
10940
|
|
|
|
|
|
|
; |
|
10941
|
|
|
|
|
|
|
bool nReturnToOriginalPrecision; |
|
10942
|
|
|
|
|
|
|
|
|
10943
|
2
|
100
|
|
|
|
|
if (items < 3) |
|
10944
|
1
|
|
|
|
|
|
nReturnToOriginalPrecision = false; |
|
10945
|
|
|
|
|
|
|
else { |
|
10946
|
1
|
50
|
|
|
|
|
nReturnToOriginalPrecision = (bool)SvTRUE(ST(2)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10947
|
1
|
|
|
|
|
|
; |
|
10948
|
|
|
|
|
|
|
} |
|
10949
|
|
|
|
|
|
|
#line 25 "./xsi/precision.xsi" |
|
10950
|
|
|
|
|
|
|
RETVAL = Helper::uplift(CommonBitsOp(nReturnToOriginalPrecision).Union(&g0, &g1)); |
|
10951
|
|
|
|
|
|
|
#line 10952 "Geos.xs.cc" |
|
10952
|
|
|
|
|
|
|
{ |
|
10953
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10954
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
10955
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
10956
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
10957
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
10958
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
10959
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
10960
|
|
|
|
|
|
|
case SVt_PVCV: |
|
10961
|
|
|
|
|
|
|
case SVt_PVIO: |
|
10962
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
10963
|
0
|
|
|
|
|
|
break; |
|
10964
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
10965
|
|
|
|
|
|
|
} |
|
10966
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
10967
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
10968
|
|
|
|
|
|
|
} |
|
10969
|
|
|
|
|
|
|
} |
|
10970
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
10971
|
2
|
50
|
|
|
|
|
}); } |
|
10972
|
|
|
|
|
|
|
|
|
10973
|
|
|
|
|
|
|
|
|
10974
|
|
|
|
|
|
|
|
|
10975
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_commonDifference) { xs::throw_guard(aTHX_ cv, [=]() |
|
10976
|
|
|
|
|
|
|
{ |
|
10977
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
10978
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
10979
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1, nReturnToOriginalPrecision= false"); |
|
10980
|
|
|
|
|
|
|
{ |
|
10981
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
10982
|
2
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
10983
|
|
|
|
|
|
|
; |
|
10984
|
2
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
10985
|
|
|
|
|
|
|
; |
|
10986
|
|
|
|
|
|
|
bool nReturnToOriginalPrecision; |
|
10987
|
|
|
|
|
|
|
|
|
10988
|
2
|
100
|
|
|
|
|
if (items < 3) |
|
10989
|
1
|
|
|
|
|
|
nReturnToOriginalPrecision = false; |
|
10990
|
|
|
|
|
|
|
else { |
|
10991
|
1
|
50
|
|
|
|
|
nReturnToOriginalPrecision = (bool)SvTRUE(ST(2)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10992
|
1
|
|
|
|
|
|
; |
|
10993
|
|
|
|
|
|
|
} |
|
10994
|
|
|
|
|
|
|
#line 29 "./xsi/precision.xsi" |
|
10995
|
|
|
|
|
|
|
RETVAL = Helper::uplift(CommonBitsOp(nReturnToOriginalPrecision).difference(&g0, &g1)); |
|
10996
|
|
|
|
|
|
|
#line 10997 "Geos.xs.cc" |
|
10997
|
|
|
|
|
|
|
{ |
|
10998
|
|
|
|
|
|
|
SV * RETVALSV; |
|
10999
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
11000
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11001
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11002
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11003
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11004
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11005
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11006
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11007
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11008
|
0
|
|
|
|
|
|
break; |
|
11009
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11010
|
|
|
|
|
|
|
} |
|
11011
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11012
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11013
|
|
|
|
|
|
|
} |
|
11014
|
|
|
|
|
|
|
} |
|
11015
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
11016
|
2
|
50
|
|
|
|
|
}); } |
|
11017
|
|
|
|
|
|
|
|
|
11018
|
|
|
|
|
|
|
|
|
11019
|
|
|
|
|
|
|
|
|
11020
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_commonSymDifference) { xs::throw_guard(aTHX_ cv, [=]() |
|
11021
|
|
|
|
|
|
|
{ |
|
11022
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11023
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
11024
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1, nReturnToOriginalPrecision= false"); |
|
11025
|
|
|
|
|
|
|
{ |
|
11026
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
11027
|
2
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
11028
|
|
|
|
|
|
|
; |
|
11029
|
2
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
11030
|
|
|
|
|
|
|
; |
|
11031
|
|
|
|
|
|
|
bool nReturnToOriginalPrecision; |
|
11032
|
|
|
|
|
|
|
|
|
11033
|
2
|
100
|
|
|
|
|
if (items < 3) |
|
11034
|
1
|
|
|
|
|
|
nReturnToOriginalPrecision = false; |
|
11035
|
|
|
|
|
|
|
else { |
|
11036
|
1
|
50
|
|
|
|
|
nReturnToOriginalPrecision = (bool)SvTRUE(ST(2)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11037
|
1
|
|
|
|
|
|
; |
|
11038
|
|
|
|
|
|
|
} |
|
11039
|
|
|
|
|
|
|
#line 33 "./xsi/precision.xsi" |
|
11040
|
|
|
|
|
|
|
RETVAL = Helper::uplift(CommonBitsOp(nReturnToOriginalPrecision).symDifference(&g0, &g1)); |
|
11041
|
|
|
|
|
|
|
#line 11042 "Geos.xs.cc" |
|
11042
|
|
|
|
|
|
|
{ |
|
11043
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11044
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
11045
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11046
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11047
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11048
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11049
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11050
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11051
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11052
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11053
|
0
|
|
|
|
|
|
break; |
|
11054
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11055
|
|
|
|
|
|
|
} |
|
11056
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11057
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11058
|
|
|
|
|
|
|
} |
|
11059
|
|
|
|
|
|
|
} |
|
11060
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
11061
|
2
|
50
|
|
|
|
|
}); } |
|
11062
|
|
|
|
|
|
|
|
|
11063
|
|
|
|
|
|
|
|
|
11064
|
|
|
|
|
|
|
|
|
11065
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_commonBuffer) { xs::throw_guard(aTHX_ cv, [=]() |
|
11066
|
|
|
|
|
|
|
{ |
|
11067
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11068
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
11069
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, distance, nReturnToOriginalPrecision= false"); |
|
11070
|
|
|
|
|
|
|
{ |
|
11071
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
11072
|
2
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
11073
|
|
|
|
|
|
|
; |
|
11074
|
2
|
50
|
|
|
|
|
double distance = (double)SvNV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
11075
|
|
|
|
|
|
|
; |
|
11076
|
|
|
|
|
|
|
bool nReturnToOriginalPrecision; |
|
11077
|
|
|
|
|
|
|
|
|
11078
|
2
|
100
|
|
|
|
|
if (items < 3) |
|
11079
|
1
|
|
|
|
|
|
nReturnToOriginalPrecision = false; |
|
11080
|
|
|
|
|
|
|
else { |
|
11081
|
1
|
50
|
|
|
|
|
nReturnToOriginalPrecision = (bool)SvTRUE(ST(2)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11082
|
1
|
|
|
|
|
|
; |
|
11083
|
|
|
|
|
|
|
} |
|
11084
|
|
|
|
|
|
|
#line 37 "./xsi/precision.xsi" |
|
11085
|
|
|
|
|
|
|
RETVAL = Helper::uplift(CommonBitsOp(nReturnToOriginalPrecision).buffer(&g0, distance)); |
|
11086
|
|
|
|
|
|
|
#line 11087 "Geos.xs.cc" |
|
11087
|
|
|
|
|
|
|
{ |
|
11088
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11089
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
11090
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11091
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11092
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11093
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11094
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11095
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11096
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11097
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11098
|
0
|
|
|
|
|
|
break; |
|
11099
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11100
|
|
|
|
|
|
|
} |
|
11101
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11102
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11103
|
|
|
|
|
|
|
} |
|
11104
|
|
|
|
|
|
|
} |
|
11105
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
11106
|
2
|
50
|
|
|
|
|
}); } |
|
11107
|
|
|
|
|
|
|
|
|
11108
|
|
|
|
|
|
|
|
|
11109
|
|
|
|
|
|
|
|
|
11110
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_enhancedIntersection) { xs::throw_guard(aTHX_ cv, [=]() |
|
11111
|
|
|
|
|
|
|
{ |
|
11112
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11113
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11114
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
|
11115
|
|
|
|
|
|
|
{ |
|
11116
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
11117
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
11118
|
|
|
|
|
|
|
; |
|
11119
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
11120
|
|
|
|
|
|
|
; |
|
11121
|
|
|
|
|
|
|
#line 41 "./xsi/precision.xsi" |
|
11122
|
|
|
|
|
|
|
RETVAL = Helper::uplift(EnhancedPrecisionOp().intersection(&g0, &g1)); |
|
11123
|
|
|
|
|
|
|
#line 11124 "Geos.xs.cc" |
|
11124
|
|
|
|
|
|
|
{ |
|
11125
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11126
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11127
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11128
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11129
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11130
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11131
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11132
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11133
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11134
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11135
|
0
|
|
|
|
|
|
break; |
|
11136
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11137
|
|
|
|
|
|
|
} |
|
11138
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11139
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11140
|
|
|
|
|
|
|
} |
|
11141
|
|
|
|
|
|
|
} |
|
11142
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11143
|
1
|
50
|
|
|
|
|
}); } |
|
11144
|
|
|
|
|
|
|
|
|
11145
|
|
|
|
|
|
|
|
|
11146
|
|
|
|
|
|
|
|
|
11147
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_enhancedUnion) { xs::throw_guard(aTHX_ cv, [=]() |
|
11148
|
|
|
|
|
|
|
{ |
|
11149
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11150
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11151
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
|
11152
|
|
|
|
|
|
|
{ |
|
11153
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
11154
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
11155
|
|
|
|
|
|
|
; |
|
11156
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
11157
|
|
|
|
|
|
|
; |
|
11158
|
|
|
|
|
|
|
#line 45 "./xsi/precision.xsi" |
|
11159
|
|
|
|
|
|
|
RETVAL = Helper::uplift(EnhancedPrecisionOp().Union(&g0, &g1)); |
|
11160
|
|
|
|
|
|
|
#line 11161 "Geos.xs.cc" |
|
11161
|
|
|
|
|
|
|
{ |
|
11162
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11163
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11164
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11165
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11166
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11167
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11168
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11169
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11170
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11171
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11172
|
0
|
|
|
|
|
|
break; |
|
11173
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11174
|
|
|
|
|
|
|
} |
|
11175
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11176
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11177
|
|
|
|
|
|
|
} |
|
11178
|
|
|
|
|
|
|
} |
|
11179
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11180
|
1
|
50
|
|
|
|
|
}); } |
|
11181
|
|
|
|
|
|
|
|
|
11182
|
|
|
|
|
|
|
|
|
11183
|
|
|
|
|
|
|
|
|
11184
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_enhancedDifference) { xs::throw_guard(aTHX_ cv, [=]() |
|
11185
|
|
|
|
|
|
|
{ |
|
11186
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11187
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11188
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
|
11189
|
|
|
|
|
|
|
{ |
|
11190
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
11191
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
11192
|
|
|
|
|
|
|
; |
|
11193
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
11194
|
|
|
|
|
|
|
; |
|
11195
|
|
|
|
|
|
|
#line 49 "./xsi/precision.xsi" |
|
11196
|
|
|
|
|
|
|
RETVAL = Helper::uplift(EnhancedPrecisionOp().difference(&g0, &g1)); |
|
11197
|
|
|
|
|
|
|
#line 11198 "Geos.xs.cc" |
|
11198
|
|
|
|
|
|
|
{ |
|
11199
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11200
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11201
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11202
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11203
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11204
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11205
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11206
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11207
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11208
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11209
|
0
|
|
|
|
|
|
break; |
|
11210
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11211
|
|
|
|
|
|
|
} |
|
11212
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11213
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11214
|
|
|
|
|
|
|
} |
|
11215
|
|
|
|
|
|
|
} |
|
11216
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11217
|
1
|
50
|
|
|
|
|
}); } |
|
11218
|
|
|
|
|
|
|
|
|
11219
|
|
|
|
|
|
|
|
|
11220
|
|
|
|
|
|
|
|
|
11221
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_enhancedSymDifference) { xs::throw_guard(aTHX_ cv, [=]() |
|
11222
|
|
|
|
|
|
|
{ |
|
11223
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11224
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11225
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
|
11226
|
|
|
|
|
|
|
{ |
|
11227
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
11228
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
11229
|
|
|
|
|
|
|
; |
|
11230
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
11231
|
|
|
|
|
|
|
; |
|
11232
|
|
|
|
|
|
|
#line 53 "./xsi/precision.xsi" |
|
11233
|
|
|
|
|
|
|
RETVAL = Helper::uplift(EnhancedPrecisionOp().symDifference(&g0, &g1)); |
|
11234
|
|
|
|
|
|
|
#line 11235 "Geos.xs.cc" |
|
11235
|
|
|
|
|
|
|
{ |
|
11236
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11237
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11238
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11239
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11240
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11241
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11242
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11243
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11244
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11245
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11246
|
0
|
|
|
|
|
|
break; |
|
11247
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11248
|
|
|
|
|
|
|
} |
|
11249
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11250
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11251
|
|
|
|
|
|
|
} |
|
11252
|
|
|
|
|
|
|
} |
|
11253
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11254
|
1
|
50
|
|
|
|
|
}); } |
|
11255
|
|
|
|
|
|
|
|
|
11256
|
|
|
|
|
|
|
|
|
11257
|
|
|
|
|
|
|
|
|
11258
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_enhancedBuffer) { xs::throw_guard(aTHX_ cv, [=]() |
|
11259
|
|
|
|
|
|
|
{ |
|
11260
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11261
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11262
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g, distance"); |
|
11263
|
|
|
|
|
|
|
{ |
|
11264
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
11265
|
1
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(0)); |
|
11266
|
|
|
|
|
|
|
; |
|
11267
|
1
|
50
|
|
|
|
|
double distance = (double)SvNV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
11268
|
|
|
|
|
|
|
; |
|
11269
|
|
|
|
|
|
|
#line 57 "./xsi/precision.xsi" |
|
11270
|
|
|
|
|
|
|
RETVAL = Helper::uplift(EnhancedPrecisionOp().buffer(&g, distance)); |
|
11271
|
|
|
|
|
|
|
#line 11272 "Geos.xs.cc" |
|
11272
|
|
|
|
|
|
|
{ |
|
11273
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11274
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11275
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11276
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11277
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11278
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11279
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11280
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11281
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11282
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11283
|
0
|
|
|
|
|
|
break; |
|
11284
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11285
|
|
|
|
|
|
|
} |
|
11286
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11287
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11288
|
|
|
|
|
|
|
} |
|
11289
|
|
|
|
|
|
|
} |
|
11290
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11291
|
1
|
50
|
|
|
|
|
}); } |
|
11292
|
|
|
|
|
|
|
|
|
11293
|
|
|
|
|
|
|
|
|
11294
|
|
|
|
|
|
|
|
|
11295
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_removeCommonBits) { xs::throw_guard(aTHX_ cv, [=]() |
|
11296
|
|
|
|
|
|
|
{ |
|
11297
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11298
|
2
|
|
|
|
|
|
dXSI32; |
|
11299
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
11300
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "target, sources"); |
|
11301
|
|
|
|
|
|
|
{ |
|
11302
|
|
|
|
|
|
|
Coordinate * RETVAL; |
|
11303
|
2
|
50
|
|
|
|
|
Geometry& target = xs::in(aTHX_ ST(0)); |
|
11304
|
|
|
|
|
|
|
; |
|
11305
|
4
|
50
|
|
|
|
|
Array sources = ST(1); |
|
11306
|
2
|
50
|
|
|
|
|
if (!sources && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
11307
|
0
|
|
|
|
|
|
; |
|
11308
|
|
|
|
|
|
|
#line 61 "./xsi/precision.xsi" |
|
11309
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
11310
|
|
|
|
|
|
|
CommonBitsRemover cbr; |
|
11311
|
|
|
|
|
|
|
for(const auto& it: sources) { |
|
11312
|
|
|
|
|
|
|
cbr.add(&xs::in(it)); |
|
11313
|
|
|
|
|
|
|
} |
|
11314
|
|
|
|
|
|
|
|
|
11315
|
|
|
|
|
|
|
switch (ix) { |
|
11316
|
|
|
|
|
|
|
case 0: cbr.removeCommonBits(&target); break; |
|
11317
|
|
|
|
|
|
|
default: cbr.addCommonBits(&target); break; |
|
11318
|
|
|
|
|
|
|
} |
|
11319
|
|
|
|
|
|
|
RETVAL = new Coordinate(cbr.getCommonCoordinate()); |
|
11320
|
|
|
|
|
|
|
#line 11321 "Geos.xs.cc" |
|
11321
|
|
|
|
|
|
|
{ |
|
11322
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11323
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
11324
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11325
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
11326
|
|
|
|
|
|
|
} |
|
11327
|
|
|
|
|
|
|
} |
|
11328
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
11329
|
2
|
50
|
|
|
|
|
}); } |
|
11330
|
|
|
|
|
|
|
|
|
11331
|
|
|
|
|
|
|
|
|
11332
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/precision.xsi' */ |
|
11333
|
|
|
|
|
|
|
|
|
11334
|
|
|
|
|
|
|
|
|
11335
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/precision/GeometryPrecisionReducer.xsi' from 'Geos.xs' */ |
|
11336
|
|
|
|
|
|
|
|
|
11337
|
|
|
|
|
|
|
|
|
11338
|
|
|
|
|
|
|
|
|
11339
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__GeometryPrecisionReducer_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
11340
|
|
|
|
|
|
|
{ |
|
11341
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11342
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11343
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg0"); |
|
11344
|
|
|
|
|
|
|
{ |
|
11345
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
11346
|
1
|
|
|
|
|
|
SV* arg0 = ST(1) |
|
11347
|
|
|
|
|
|
|
; |
|
11348
|
|
|
|
|
|
|
#line 5 "./xsi/precision/GeometryPrecisionReducer.xsi" |
|
11349
|
|
|
|
|
|
|
GeometryPrecisionReducer* self; |
|
11350
|
|
|
|
|
|
|
Object arg{arg0}; |
|
11351
|
|
|
|
|
|
|
if (arg.stash().name() == "Geo::Geos::PrecisionModel") { |
|
11352
|
|
|
|
|
|
|
PrecisionModel& pm = xs::in(arg); |
|
11353
|
|
|
|
|
|
|
self = new GeometryPrecisionReducer(pm); |
|
11354
|
|
|
|
|
|
|
} |
|
11355
|
|
|
|
|
|
|
else { |
|
11356
|
|
|
|
|
|
|
GeometryFactory& gf = xs::in(arg); |
|
11357
|
|
|
|
|
|
|
self = new GeometryPrecisionReducer(gf); |
|
11358
|
|
|
|
|
|
|
} |
|
11359
|
|
|
|
|
|
|
Object wrapped = xs::out(self); |
|
11360
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(arg0), &payload_marker); |
|
11361
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
11362
|
|
|
|
|
|
|
#line 11363 "Geos.xs.cc" |
|
11363
|
|
|
|
|
|
|
{ |
|
11364
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11365
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11366
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11367
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11368
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11369
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11370
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11371
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11372
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11373
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11374
|
0
|
|
|
|
|
|
break; |
|
11375
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11376
|
|
|
|
|
|
|
} |
|
11377
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11378
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11379
|
|
|
|
|
|
|
} |
|
11380
|
|
|
|
|
|
|
} |
|
11381
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11382
|
1
|
50
|
|
|
|
|
}); } |
|
11383
|
|
|
|
|
|
|
|
|
11384
|
|
|
|
|
|
|
|
|
11385
|
|
|
|
|
|
|
|
|
11386
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__GeometryPrecisionReducer_setRemoveCollapsedComponents) { xs::throw_guard(aTHX_ cv, [=]() |
|
11387
|
|
|
|
|
|
|
{ |
|
11388
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11389
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11390
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, remove"); |
|
11391
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
11392
|
1
|
|
|
|
|
|
SP -= items; |
|
11393
|
|
|
|
|
|
|
{ |
|
11394
|
1
|
50
|
|
|
|
|
GeometryPrecisionReducer* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11395
|
|
|
|
|
|
|
; |
|
11396
|
1
|
50
|
|
|
|
|
bool remove = (bool)SvTRUE(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11397
|
|
|
|
|
|
|
; |
|
11398
|
|
|
|
|
|
|
#line 20 "./xsi/precision/GeometryPrecisionReducer.xsi" |
|
11399
|
|
|
|
|
|
|
THIS->setRemoveCollapsedComponents(remove); |
|
11400
|
|
|
|
|
|
|
#line 11401 "Geos.xs.cc" |
|
11401
|
1
|
|
|
|
|
|
PUTBACK; |
|
11402
|
1
|
|
|
|
|
|
return; |
|
11403
|
|
|
|
|
|
|
} |
|
11404
|
1
|
50
|
|
|
|
|
}); } |
|
11405
|
|
|
|
|
|
|
|
|
11406
|
|
|
|
|
|
|
|
|
11407
|
|
|
|
|
|
|
|
|
11408
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__GeometryPrecisionReducer_setPointwise) { xs::throw_guard(aTHX_ cv, [=]() |
|
11409
|
|
|
|
|
|
|
{ |
|
11410
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11411
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11412
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, pointwise"); |
|
11413
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
11414
|
1
|
|
|
|
|
|
SP -= items; |
|
11415
|
|
|
|
|
|
|
{ |
|
11416
|
1
|
50
|
|
|
|
|
GeometryPrecisionReducer* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11417
|
|
|
|
|
|
|
; |
|
11418
|
1
|
50
|
|
|
|
|
bool pointwise = (bool)SvTRUE(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11419
|
|
|
|
|
|
|
; |
|
11420
|
|
|
|
|
|
|
#line 22 "./xsi/precision/GeometryPrecisionReducer.xsi" |
|
11421
|
|
|
|
|
|
|
THIS->setPointwise(pointwise); |
|
11422
|
|
|
|
|
|
|
#line 11423 "Geos.xs.cc" |
|
11423
|
1
|
|
|
|
|
|
PUTBACK; |
|
11424
|
1
|
|
|
|
|
|
return; |
|
11425
|
|
|
|
|
|
|
} |
|
11426
|
1
|
50
|
|
|
|
|
}); } |
|
11427
|
|
|
|
|
|
|
|
|
11428
|
|
|
|
|
|
|
|
|
11429
|
|
|
|
|
|
|
|
|
11430
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__GeometryPrecisionReducer_reduce) { xs::throw_guard(aTHX_ cv, [=]() |
|
11431
|
|
|
|
|
|
|
{ |
|
11432
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11433
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11434
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, g"); |
|
11435
|
|
|
|
|
|
|
{ |
|
11436
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
11437
|
1
|
50
|
|
|
|
|
GeometryPrecisionReducer* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11438
|
|
|
|
|
|
|
; |
|
11439
|
1
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(1)); |
|
11440
|
|
|
|
|
|
|
; |
|
11441
|
|
|
|
|
|
|
#line 25 "./xsi/precision/GeometryPrecisionReducer.xsi" |
|
11442
|
|
|
|
|
|
|
auto ptr = THIS->reduce(g); |
|
11443
|
|
|
|
|
|
|
RETVAL = Helper::uplift(ptr.release()); |
|
11444
|
|
|
|
|
|
|
#line 11445 "Geos.xs.cc" |
|
11445
|
|
|
|
|
|
|
{ |
|
11446
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11447
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11448
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11449
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11450
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11451
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11452
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11453
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11454
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11455
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11456
|
0
|
|
|
|
|
|
break; |
|
11457
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11458
|
|
|
|
|
|
|
} |
|
11459
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11460
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11461
|
|
|
|
|
|
|
} |
|
11462
|
|
|
|
|
|
|
} |
|
11463
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11464
|
1
|
50
|
|
|
|
|
}); } |
|
11465
|
|
|
|
|
|
|
|
|
11466
|
|
|
|
|
|
|
|
|
11467
|
|
|
|
|
|
|
|
|
11468
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__GeometryPrecisionReducer_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
11469
|
|
|
|
|
|
|
{ |
|
11470
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11471
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
11472
|
|
|
|
|
|
|
{ |
|
11473
|
|
|
|
|
|
|
int RETVAL; |
|
11474
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
11475
|
|
|
|
|
|
|
#line 29 "./xsi/precision/GeometryPrecisionReducer.xsi" |
|
11476
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
11477
|
|
|
|
|
|
|
#line 11478 "Geos.xs.cc" |
|
11478
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
11479
|
|
|
|
|
|
|
} |
|
11480
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
11481
|
0
|
0
|
|
|
|
|
}); } |
|
11482
|
|
|
|
|
|
|
|
|
11483
|
|
|
|
|
|
|
|
|
11484
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/precision/GeometryPrecisionReducer.xsi' */ |
|
11485
|
|
|
|
|
|
|
|
|
11486
|
|
|
|
|
|
|
|
|
11487
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/precision/SimpleGeometryPrecisionReducer.xsi' from 'Geos.xs' */ |
|
11488
|
|
|
|
|
|
|
|
|
11489
|
|
|
|
|
|
|
|
|
11490
|
|
|
|
|
|
|
|
|
11491
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
11492
|
|
|
|
|
|
|
{ |
|
11493
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11494
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11495
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg"); |
|
11496
|
|
|
|
|
|
|
{ |
|
11497
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
11498
|
1
|
|
|
|
|
|
SV* arg = ST(1) |
|
11499
|
|
|
|
|
|
|
; |
|
11500
|
|
|
|
|
|
|
#line 5 "./xsi/precision/SimpleGeometryPrecisionReducer.xsi" |
|
11501
|
|
|
|
|
|
|
PrecisionModel& pm = xs::in(arg); |
|
11502
|
|
|
|
|
|
|
auto self = new SimpleGeometryPrecisionReducer(&pm); |
|
11503
|
|
|
|
|
|
|
Object wrapped = xs::out(self); |
|
11504
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(arg), &payload_marker); |
|
11505
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
11506
|
|
|
|
|
|
|
#line 11507 "Geos.xs.cc" |
|
11507
|
|
|
|
|
|
|
{ |
|
11508
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11509
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11510
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11511
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11512
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11513
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11514
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11515
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11516
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11517
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11518
|
0
|
|
|
|
|
|
break; |
|
11519
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11520
|
|
|
|
|
|
|
} |
|
11521
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11522
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11523
|
|
|
|
|
|
|
} |
|
11524
|
|
|
|
|
|
|
} |
|
11525
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11526
|
1
|
50
|
|
|
|
|
}); } |
|
11527
|
|
|
|
|
|
|
|
|
11528
|
|
|
|
|
|
|
|
|
11529
|
|
|
|
|
|
|
|
|
11530
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_getPrecisionModel) { xs::throw_guard(aTHX_ cv, [=]() |
|
11531
|
|
|
|
|
|
|
{ |
|
11532
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11533
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
11534
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
11535
|
|
|
|
|
|
|
{ |
|
11536
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
11537
|
1
|
50
|
|
|
|
|
SimpleGeometryPrecisionReducer* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11538
|
|
|
|
|
|
|
; |
|
11539
|
|
|
|
|
|
|
#line 13 "./xsi/precision/SimpleGeometryPrecisionReducer.xsi" |
|
11540
|
|
|
|
|
|
|
Object me{ST(0)}; |
|
11541
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker); |
|
11542
|
|
|
|
|
|
|
Object obj { payload.obj }; |
|
11543
|
|
|
|
|
|
|
RETVAL = obj.ref(); |
|
11544
|
|
|
|
|
|
|
#line 11545 "Geos.xs.cc" |
|
11545
|
|
|
|
|
|
|
{ |
|
11546
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11547
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11548
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11549
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11550
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11551
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11552
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11553
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11554
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11555
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11556
|
0
|
|
|
|
|
|
break; |
|
11557
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11558
|
|
|
|
|
|
|
} |
|
11559
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11560
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11561
|
|
|
|
|
|
|
} |
|
11562
|
|
|
|
|
|
|
} |
|
11563
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11564
|
1
|
50
|
|
|
|
|
}); } |
|
11565
|
|
|
|
|
|
|
|
|
11566
|
|
|
|
|
|
|
|
|
11567
|
|
|
|
|
|
|
|
|
11568
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_setRemoveCollapsedComponents) { xs::throw_guard(aTHX_ cv, [=]() |
|
11569
|
|
|
|
|
|
|
{ |
|
11570
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11571
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11572
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, nRemoveCollapsed"); |
|
11573
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
11574
|
1
|
|
|
|
|
|
SP -= items; |
|
11575
|
|
|
|
|
|
|
{ |
|
11576
|
1
|
50
|
|
|
|
|
SimpleGeometryPrecisionReducer* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11577
|
|
|
|
|
|
|
; |
|
11578
|
1
|
50
|
|
|
|
|
bool nRemoveCollapsed = (bool)SvTRUE(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11579
|
|
|
|
|
|
|
; |
|
11580
|
|
|
|
|
|
|
#line 19 "./xsi/precision/SimpleGeometryPrecisionReducer.xsi" |
|
11581
|
|
|
|
|
|
|
THIS->setRemoveCollapsedComponents(nRemoveCollapsed); |
|
11582
|
|
|
|
|
|
|
#line 11583 "Geos.xs.cc" |
|
11583
|
1
|
|
|
|
|
|
PUTBACK; |
|
11584
|
1
|
|
|
|
|
|
return; |
|
11585
|
|
|
|
|
|
|
} |
|
11586
|
1
|
50
|
|
|
|
|
}); } |
|
11587
|
|
|
|
|
|
|
|
|
11588
|
|
|
|
|
|
|
|
|
11589
|
|
|
|
|
|
|
|
|
11590
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_getRemoveCollapsed) { xs::throw_guard(aTHX_ cv, [=]() |
|
11591
|
|
|
|
|
|
|
{ |
|
11592
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11593
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
11594
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
11595
|
|
|
|
|
|
|
{ |
|
11596
|
|
|
|
|
|
|
bool RETVAL; |
|
11597
|
1
|
50
|
|
|
|
|
SimpleGeometryPrecisionReducer* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11598
|
|
|
|
|
|
|
; |
|
11599
|
|
|
|
|
|
|
#line 21 "./xsi/precision/SimpleGeometryPrecisionReducer.xsi" |
|
11600
|
|
|
|
|
|
|
RETVAL = THIS->getRemoveCollapsed(); |
|
11601
|
|
|
|
|
|
|
#line 11602 "Geos.xs.cc" |
|
11602
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
11603
|
|
|
|
|
|
|
} |
|
11604
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11605
|
1
|
50
|
|
|
|
|
}); } |
|
11606
|
|
|
|
|
|
|
|
|
11607
|
|
|
|
|
|
|
|
|
11608
|
|
|
|
|
|
|
|
|
11609
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_reduce) { xs::throw_guard(aTHX_ cv, [=]() |
|
11610
|
|
|
|
|
|
|
{ |
|
11611
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11612
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11613
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, g"); |
|
11614
|
|
|
|
|
|
|
{ |
|
11615
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
11616
|
1
|
50
|
|
|
|
|
SimpleGeometryPrecisionReducer* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11617
|
|
|
|
|
|
|
; |
|
11618
|
1
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(1)); |
|
11619
|
|
|
|
|
|
|
; |
|
11620
|
|
|
|
|
|
|
#line 24 "./xsi/precision/SimpleGeometryPrecisionReducer.xsi" |
|
11621
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->reduce(&g)); |
|
11622
|
|
|
|
|
|
|
#line 11623 "Geos.xs.cc" |
|
11623
|
|
|
|
|
|
|
{ |
|
11624
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11625
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11626
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11627
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11628
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11629
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11630
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11631
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11632
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11633
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11634
|
0
|
|
|
|
|
|
break; |
|
11635
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11636
|
|
|
|
|
|
|
} |
|
11637
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11638
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11639
|
|
|
|
|
|
|
} |
|
11640
|
|
|
|
|
|
|
} |
|
11641
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11642
|
1
|
50
|
|
|
|
|
}); } |
|
11643
|
|
|
|
|
|
|
|
|
11644
|
|
|
|
|
|
|
|
|
11645
|
|
|
|
|
|
|
|
|
11646
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_CLONE_SKIP) { xs::throw_guard(aTHX_ cv, [=]() |
|
11647
|
|
|
|
|
|
|
{ |
|
11648
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11649
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
11650
|
|
|
|
|
|
|
{ |
|
11651
|
|
|
|
|
|
|
int RETVAL; |
|
11652
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
11653
|
|
|
|
|
|
|
#line 27 "./xsi/precision/SimpleGeometryPrecisionReducer.xsi" |
|
11654
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
|
11655
|
|
|
|
|
|
|
#line 11656 "Geos.xs.cc" |
|
11656
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
11657
|
|
|
|
|
|
|
} |
|
11658
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
11659
|
0
|
0
|
|
|
|
|
}); } |
|
11660
|
|
|
|
|
|
|
|
|
11661
|
|
|
|
|
|
|
|
|
11662
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/precision/SimpleGeometryPrecisionReducer.xsi' */ |
|
11663
|
|
|
|
|
|
|
|
|
11664
|
|
|
|
|
|
|
|
|
11665
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/operation.xsi' from 'Geos.xs' */ |
|
11666
|
|
|
|
|
|
|
|
|
11667
|
|
|
|
|
|
|
|
|
11668
|
|
|
|
|
|
|
|
|
11669
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_buffer) { xs::throw_guard(aTHX_ cv, [=]() |
|
11670
|
|
|
|
|
|
|
{ |
|
11671
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11672
|
3
|
50
|
|
|
|
|
if (items < 2 || items > 4) |
|
|
|
50
|
|
|
|
|
|
|
11673
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g, distance, quadrantSegments= NULL, endCapStyle= NULL"); |
|
11674
|
|
|
|
|
|
|
{ |
|
11675
|
6
|
|
|
|
|
|
Sv RETVAL; |
|
11676
|
3
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(0)); |
|
11677
|
|
|
|
|
|
|
; |
|
11678
|
3
|
50
|
|
|
|
|
double distance = (double)SvNV(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
11679
|
|
|
|
|
|
|
; |
|
11680
|
|
|
|
|
|
|
SV* quadrantSegments; |
|
11681
|
|
|
|
|
|
|
SV* endCapStyle; |
|
11682
|
|
|
|
|
|
|
|
|
11683
|
3
|
100
|
|
|
|
|
if (items < 3) |
|
11684
|
1
|
|
|
|
|
|
quadrantSegments = NULL; |
|
11685
|
|
|
|
|
|
|
else { |
|
11686
|
2
|
|
|
|
|
|
quadrantSegments = ST(2) |
|
11687
|
2
|
|
|
|
|
|
; |
|
11688
|
|
|
|
|
|
|
} |
|
11689
|
|
|
|
|
|
|
|
|
11690
|
3
|
100
|
|
|
|
|
if (items < 4) |
|
11691
|
2
|
|
|
|
|
|
endCapStyle = NULL; |
|
11692
|
|
|
|
|
|
|
else { |
|
11693
|
1
|
|
|
|
|
|
endCapStyle = ST(3) |
|
11694
|
1
|
|
|
|
|
|
; |
|
11695
|
|
|
|
|
|
|
} |
|
11696
|
|
|
|
|
|
|
#line 5 "./xsi/operation.xsi" |
|
11697
|
|
|
|
|
|
|
int vQuadrantSegments = quadrantSegments ? SvIV(quadrantSegments) : (int)BufferParameters::DEFAULT_QUADRANT_SEGMENTS; |
|
11698
|
|
|
|
|
|
|
int vEndCapStyle = endCapStyle? SvIV(endCapStyle) : (int)BufferParameters::CAP_ROUND; |
|
11699
|
|
|
|
|
|
|
Geometry* r = BufferOp::bufferOp(&g, distance, vQuadrantSegments, vEndCapStyle); |
|
11700
|
|
|
|
|
|
|
RETVAL = Helper::uplift(r); |
|
11701
|
|
|
|
|
|
|
#line 11702 "Geos.xs.cc" |
|
11702
|
|
|
|
|
|
|
{ |
|
11703
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11704
|
3
|
|
|
|
|
|
RETVALSV = NULL; |
|
11705
|
3
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11706
|
3
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11707
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11708
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11709
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11710
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11711
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11712
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11713
|
0
|
|
|
|
|
|
break; |
|
11714
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11715
|
|
|
|
|
|
|
} |
|
11716
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11717
|
3
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11718
|
|
|
|
|
|
|
} |
|
11719
|
|
|
|
|
|
|
} |
|
11720
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
11721
|
3
|
50
|
|
|
|
|
}); } |
|
11722
|
|
|
|
|
|
|
|
|
11723
|
|
|
|
|
|
|
|
|
11724
|
|
|
|
|
|
|
|
|
11725
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_distance) { xs::throw_guard(aTHX_ cv, [=]() |
|
11726
|
|
|
|
|
|
|
{ |
|
11727
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11728
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11729
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
|
11730
|
|
|
|
|
|
|
{ |
|
11731
|
|
|
|
|
|
|
double RETVAL; |
|
11732
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
11733
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
11734
|
|
|
|
|
|
|
; |
|
11735
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
11736
|
|
|
|
|
|
|
; |
|
11737
|
|
|
|
|
|
|
#line 12 "./xsi/operation.xsi" |
|
11738
|
|
|
|
|
|
|
RETVAL = DistanceOp::distance(&g0, &g1); |
|
11739
|
|
|
|
|
|
|
#line 11740 "Geos.xs.cc" |
|
11740
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
11741
|
|
|
|
|
|
|
} |
|
11742
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11743
|
1
|
50
|
|
|
|
|
}); } |
|
11744
|
|
|
|
|
|
|
|
|
11745
|
|
|
|
|
|
|
|
|
11746
|
|
|
|
|
|
|
|
|
11747
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_nearestPoints) { xs::throw_guard(aTHX_ cv, [=]() |
|
11748
|
|
|
|
|
|
|
{ |
|
11749
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11750
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11751
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
|
11752
|
|
|
|
|
|
|
{ |
|
11753
|
2
|
|
|
|
|
|
Array RETVAL; |
|
11754
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
11755
|
|
|
|
|
|
|
; |
|
11756
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
11757
|
|
|
|
|
|
|
; |
|
11758
|
|
|
|
|
|
|
#line 16 "./xsi/operation.xsi" |
|
11759
|
|
|
|
|
|
|
Array r; |
|
11760
|
|
|
|
|
|
|
auto seq = DistanceOp::nearestPoints(&g0, &g1); |
|
11761
|
|
|
|
|
|
|
if(seq) { |
|
11762
|
|
|
|
|
|
|
auto seq_ptr = std::unique_ptr(seq); |
|
11763
|
|
|
|
|
|
|
r = Helper::convert_copy(seq); |
|
11764
|
|
|
|
|
|
|
} |
|
11765
|
|
|
|
|
|
|
RETVAL = r; |
|
11766
|
|
|
|
|
|
|
#line 11767 "Geos.xs.cc" |
|
11767
|
|
|
|
|
|
|
{ |
|
11768
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11769
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11770
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11771
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11772
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11773
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11774
|
|
|
|
|
|
|
} |
|
11775
|
|
|
|
|
|
|
} |
|
11776
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11777
|
1
|
50
|
|
|
|
|
}); } |
|
11778
|
|
|
|
|
|
|
|
|
11779
|
|
|
|
|
|
|
|
|
11780
|
|
|
|
|
|
|
|
|
11781
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_closestPoints) { xs::throw_guard(aTHX_ cv, [=]() |
|
11782
|
|
|
|
|
|
|
{ |
|
11783
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11784
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
11785
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
|
11786
|
|
|
|
|
|
|
{ |
|
11787
|
2
|
|
|
|
|
|
Array RETVAL; |
|
11788
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
11789
|
|
|
|
|
|
|
; |
|
11790
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
11791
|
|
|
|
|
|
|
; |
|
11792
|
|
|
|
|
|
|
#line 26 "./xsi/operation.xsi" |
|
11793
|
|
|
|
|
|
|
Array r; |
|
11794
|
|
|
|
|
|
|
auto seq = DistanceOp::closestPoints(&g0, &g1); |
|
11795
|
|
|
|
|
|
|
if(seq) { |
|
11796
|
|
|
|
|
|
|
auto seq_ptr = std::unique_ptr(seq); |
|
11797
|
|
|
|
|
|
|
r = Helper::convert_copy(seq); |
|
11798
|
|
|
|
|
|
|
} |
|
11799
|
|
|
|
|
|
|
RETVAL = r; |
|
11800
|
|
|
|
|
|
|
#line 11801 "Geos.xs.cc" |
|
11801
|
|
|
|
|
|
|
{ |
|
11802
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11803
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11804
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11805
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11806
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11807
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11808
|
|
|
|
|
|
|
} |
|
11809
|
|
|
|
|
|
|
} |
|
11810
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11811
|
1
|
50
|
|
|
|
|
}); } |
|
11812
|
|
|
|
|
|
|
|
|
11813
|
|
|
|
|
|
|
|
|
11814
|
|
|
|
|
|
|
|
|
11815
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_overlayOp) { xs::throw_guard(aTHX_ cv, [=]() |
|
11816
|
|
|
|
|
|
|
{ |
|
11817
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11818
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
11819
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1, opCode"); |
|
11820
|
|
|
|
|
|
|
{ |
|
11821
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
11822
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
11823
|
|
|
|
|
|
|
; |
|
11824
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
11825
|
|
|
|
|
|
|
; |
|
11826
|
1
|
50
|
|
|
|
|
uint opCode = xs::in(aTHX_ ST(2)); |
|
11827
|
|
|
|
|
|
|
; |
|
11828
|
|
|
|
|
|
|
#line 36 "./xsi/operation.xsi" |
|
11829
|
|
|
|
|
|
|
if (opCode > 4) throw "wrong opCode"; |
|
11830
|
|
|
|
|
|
|
OverlayOp::OpCode code = static_cast(opCode); |
|
11831
|
|
|
|
|
|
|
Geometry* g = OverlayOp::overlayOp(&g0, &g1, code); |
|
11832
|
|
|
|
|
|
|
RETVAL = Helper::uplift(g); |
|
11833
|
|
|
|
|
|
|
#line 11834 "Geos.xs.cc" |
|
11834
|
|
|
|
|
|
|
{ |
|
11835
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11836
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11837
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11838
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
11839
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
11840
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11841
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
11842
|
|
|
|
|
|
|
case SVt_PVCV: |
|
11843
|
|
|
|
|
|
|
case SVt_PVIO: |
|
11844
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11845
|
0
|
|
|
|
|
|
break; |
|
11846
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
11847
|
|
|
|
|
|
|
} |
|
11848
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11849
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11850
|
|
|
|
|
|
|
} |
|
11851
|
|
|
|
|
|
|
} |
|
11852
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11853
|
1
|
50
|
|
|
|
|
}); } |
|
11854
|
|
|
|
|
|
|
|
|
11855
|
|
|
|
|
|
|
|
|
11856
|
|
|
|
|
|
|
|
|
11857
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_isValid) { xs::throw_guard(aTHX_ cv, [=]() |
|
11858
|
|
|
|
|
|
|
{ |
|
11859
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11860
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
11861
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "obj"); |
|
11862
|
|
|
|
|
|
|
{ |
|
11863
|
|
|
|
|
|
|
bool RETVAL; |
|
11864
|
4
|
50
|
|
|
|
|
Object obj = ST(0); |
|
11865
|
2
|
50
|
|
|
|
|
if (!obj && SvOK(ST(0))) throw "arg is not a blessed reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
11866
|
0
|
|
|
|
|
|
; |
|
11867
|
|
|
|
|
|
|
#line 43 "./xsi/operation.xsi" |
|
11868
|
|
|
|
|
|
|
if (obj.stash().name() == "Geo::Geos::Coordinate") { |
|
11869
|
|
|
|
|
|
|
auto& c = xs::in(obj); |
|
11870
|
|
|
|
|
|
|
RETVAL = IsValidOp::isValid(c); |
|
11871
|
|
|
|
|
|
|
} |
|
11872
|
|
|
|
|
|
|
else { |
|
11873
|
|
|
|
|
|
|
auto& g = xs::in(obj); |
|
11874
|
|
|
|
|
|
|
RETVAL = IsValidOp::isValid(g); |
|
11875
|
|
|
|
|
|
|
} |
|
11876
|
|
|
|
|
|
|
#line 11877 "Geos.xs.cc" |
|
11877
|
2
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
11878
|
|
|
|
|
|
|
} |
|
11879
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
11880
|
2
|
50
|
|
|
|
|
}); } |
|
11881
|
|
|
|
|
|
|
|
|
11882
|
|
|
|
|
|
|
|
|
11883
|
|
|
|
|
|
|
|
|
11884
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_relate) { xs::throw_guard(aTHX_ cv, [=]() |
|
11885
|
|
|
|
|
|
|
{ |
|
11886
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11887
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
11888
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1, boundaryNodeRule= NULL"); |
|
11889
|
|
|
|
|
|
|
{ |
|
11890
|
|
|
|
|
|
|
IntersectionMatrix * RETVAL; |
|
11891
|
2
|
50
|
|
|
|
|
Geometry& g0 = xs::in(aTHX_ ST(0)); |
|
11892
|
|
|
|
|
|
|
; |
|
11893
|
2
|
50
|
|
|
|
|
Geometry& g1 = xs::in(aTHX_ ST(1)); |
|
11894
|
|
|
|
|
|
|
; |
|
11895
|
|
|
|
|
|
|
SV* boundaryNodeRule; |
|
11896
|
|
|
|
|
|
|
|
|
11897
|
2
|
100
|
|
|
|
|
if (items < 3) |
|
11898
|
1
|
|
|
|
|
|
boundaryNodeRule = NULL; |
|
11899
|
|
|
|
|
|
|
else { |
|
11900
|
1
|
|
|
|
|
|
boundaryNodeRule = ST(2) |
|
11901
|
1
|
|
|
|
|
|
; |
|
11902
|
|
|
|
|
|
|
} |
|
11903
|
|
|
|
|
|
|
#line 54 "./xsi/operation.xsi" |
|
11904
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
11905
|
|
|
|
|
|
|
if (!boundaryNodeRule) RETVAL = RelateOp::relate(&g0, &g1); |
|
11906
|
|
|
|
|
|
|
else { |
|
11907
|
|
|
|
|
|
|
const BoundaryNodeRule* rule; |
|
11908
|
|
|
|
|
|
|
auto rule_id = SvIV(boundaryNodeRule); |
|
11909
|
|
|
|
|
|
|
switch(rule_id) { |
|
11910
|
|
|
|
|
|
|
case 0: rule = &BoundaryNodeRule::getBoundaryRuleMod2(); break; |
|
11911
|
|
|
|
|
|
|
case 1: rule = &BoundaryNodeRule::getBoundaryEndPoint(); break; |
|
11912
|
|
|
|
|
|
|
case 2: rule = &BoundaryNodeRule::getBoundaryMultivalentEndPoint(); break; |
|
11913
|
|
|
|
|
|
|
case 3: rule = &BoundaryNodeRule::getBoundaryMonovalentEndPoint(); break; |
|
11914
|
|
|
|
|
|
|
case 4: rule = &BoundaryNodeRule::getBoundaryOGCSFS(); break; |
|
11915
|
|
|
|
|
|
|
default: throw("Wrong boundaryNodeRule"); |
|
11916
|
|
|
|
|
|
|
} |
|
11917
|
|
|
|
|
|
|
RETVAL = RelateOp::relate(&g0, &g1, *rule); |
|
11918
|
|
|
|
|
|
|
} |
|
11919
|
|
|
|
|
|
|
#line 11920 "Geos.xs.cc" |
|
11920
|
|
|
|
|
|
|
{ |
|
11921
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11922
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(aTHX_ RETVAL, PROTO).detach(); |
|
11923
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11924
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
11925
|
|
|
|
|
|
|
} |
|
11926
|
|
|
|
|
|
|
} |
|
11927
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
11928
|
2
|
50
|
|
|
|
|
}); } |
|
11929
|
|
|
|
|
|
|
|
|
11930
|
|
|
|
|
|
|
|
|
11931
|
|
|
|
|
|
|
|
|
11932
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_mergeLines) { xs::throw_guard(aTHX_ cv, [=]() |
|
11933
|
|
|
|
|
|
|
{ |
|
11934
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11935
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
11936
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "in"); |
|
11937
|
|
|
|
|
|
|
{ |
|
11938
|
2
|
|
|
|
|
|
Array RETVAL; |
|
11939
|
2
|
50
|
|
|
|
|
Array in = ST(0); |
|
|
|
50
|
|
|
|
|
|
|
11940
|
1
|
50
|
|
|
|
|
if (!in && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
11941
|
0
|
|
|
|
|
|
; |
|
11942
|
|
|
|
|
|
|
#line 71 "./xsi/operation.xsi" |
|
11943
|
|
|
|
|
|
|
LineMerger lm; |
|
11944
|
|
|
|
|
|
|
|
|
11945
|
|
|
|
|
|
|
for(auto it: in) { |
|
11946
|
|
|
|
|
|
|
lm.add(&xs::in(it)); |
|
11947
|
|
|
|
|
|
|
} |
|
11948
|
|
|
|
|
|
|
|
|
11949
|
|
|
|
|
|
|
auto v = lm.getMergedLineStrings(); |
|
11950
|
|
|
|
|
|
|
Array out = Array::create(v->size()); |
|
11951
|
|
|
|
|
|
|
for(LineString* it: *v) { |
|
11952
|
|
|
|
|
|
|
auto wrapped = xs::out(it); |
|
11953
|
|
|
|
|
|
|
out.push(wrapped); |
|
11954
|
|
|
|
|
|
|
} |
|
11955
|
|
|
|
|
|
|
RETVAL = out; |
|
11956
|
|
|
|
|
|
|
delete v; |
|
11957
|
|
|
|
|
|
|
#line 11958 "Geos.xs.cc" |
|
11958
|
|
|
|
|
|
|
{ |
|
11959
|
|
|
|
|
|
|
SV * RETVALSV; |
|
11960
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
11961
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
11962
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
11963
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
11964
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
11965
|
|
|
|
|
|
|
} |
|
11966
|
|
|
|
|
|
|
} |
|
11967
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11968
|
1
|
50
|
|
|
|
|
}); } |
|
11969
|
|
|
|
|
|
|
|
|
11970
|
|
|
|
|
|
|
|
|
11971
|
|
|
|
|
|
|
|
|
11972
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_isSequenced) { xs::throw_guard(aTHX_ cv, [=]() |
|
11973
|
|
|
|
|
|
|
{ |
|
11974
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11975
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
11976
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g"); |
|
11977
|
|
|
|
|
|
|
{ |
|
11978
|
|
|
|
|
|
|
bool RETVAL; |
|
11979
|
1
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(0)); |
|
11980
|
|
|
|
|
|
|
; |
|
11981
|
|
|
|
|
|
|
#line 88 "./xsi/operation.xsi" |
|
11982
|
|
|
|
|
|
|
RETVAL = LineSequencer::isSequenced(&g); |
|
11983
|
|
|
|
|
|
|
#line 11984 "Geos.xs.cc" |
|
11984
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
11985
|
|
|
|
|
|
|
} |
|
11986
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
11987
|
1
|
50
|
|
|
|
|
}); } |
|
11988
|
|
|
|
|
|
|
|
|
11989
|
|
|
|
|
|
|
|
|
11990
|
|
|
|
|
|
|
|
|
11991
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_sequence) { xs::throw_guard(aTHX_ cv, [=]() |
|
11992
|
|
|
|
|
|
|
{ |
|
11993
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
11994
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
11995
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g"); |
|
11996
|
|
|
|
|
|
|
{ |
|
11997
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
11998
|
1
|
50
|
|
|
|
|
Geometry& g = xs::in(aTHX_ ST(0)); |
|
11999
|
|
|
|
|
|
|
; |
|
12000
|
|
|
|
|
|
|
#line 92 "./xsi/operation.xsi" |
|
12001
|
|
|
|
|
|
|
RETVAL = Helper::uplift(LineSequencer::sequence(g)); |
|
12002
|
|
|
|
|
|
|
#line 12003 "Geos.xs.cc" |
|
12003
|
|
|
|
|
|
|
{ |
|
12004
|
|
|
|
|
|
|
SV * RETVALSV; |
|
12005
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
12006
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
12007
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
12008
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
12009
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12010
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12011
|
|
|
|
|
|
|
case SVt_PVCV: |
|
12012
|
|
|
|
|
|
|
case SVt_PVIO: |
|
12013
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
12014
|
0
|
|
|
|
|
|
break; |
|
12015
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
12016
|
|
|
|
|
|
|
} |
|
12017
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
12018
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
12019
|
|
|
|
|
|
|
} |
|
12020
|
|
|
|
|
|
|
} |
|
12021
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
12022
|
1
|
50
|
|
|
|
|
}); } |
|
12023
|
|
|
|
|
|
|
|
|
12024
|
|
|
|
|
|
|
|
|
12025
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/operation.xsi' */ |
|
12026
|
|
|
|
|
|
|
|
|
12027
|
|
|
|
|
|
|
|
|
12028
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/triangulate/DelaunayTriangulationBuilder.xsi' from 'Geos.xs' */ |
|
12029
|
|
|
|
|
|
|
|
|
12030
|
|
|
|
|
|
|
|
|
12031
|
|
|
|
|
|
|
|
|
12032
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangulate__DelaunayTriangulationBuilder_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
12033
|
|
|
|
|
|
|
{ |
|
12034
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
12035
|
2
|
50
|
|
|
|
|
if (items < 3 || items > 4) |
|
|
|
50
|
|
|
|
|
|
|
12036
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, geometry_factory, sites, tolerance= NULL"); |
|
12037
|
|
|
|
|
|
|
{ |
|
12038
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
12039
|
2
|
|
|
|
|
|
SV* geometry_factory = ST(1) |
|
12040
|
|
|
|
|
|
|
; |
|
12041
|
4
|
50
|
|
|
|
|
Sv sites = ST(2) |
|
12042
|
|
|
|
|
|
|
; |
|
12043
|
|
|
|
|
|
|
SV* tolerance; |
|
12044
|
|
|
|
|
|
|
|
|
12045
|
2
|
100
|
|
|
|
|
if (items < 4) |
|
12046
|
1
|
|
|
|
|
|
tolerance = NULL; |
|
12047
|
|
|
|
|
|
|
else { |
|
12048
|
1
|
|
|
|
|
|
tolerance = ST(3) |
|
12049
|
1
|
|
|
|
|
|
; |
|
12050
|
|
|
|
|
|
|
} |
|
12051
|
|
|
|
|
|
|
#line 5 "./xsi/triangulate/DelaunayTriangulationBuilder.xsi" |
|
12052
|
|
|
|
|
|
|
auto builder = std::unique_ptr(new DelaunayTriangulationBuilder()); |
|
12053
|
|
|
|
|
|
|
GeometryFactory* factory = xs::in(geometry_factory); |
|
12054
|
|
|
|
|
|
|
|
|
12055
|
|
|
|
|
|
|
if (sites.is_array_ref()) { |
|
12056
|
|
|
|
|
|
|
auto seq = std::unique_ptr(Helper::convert_copy(*factory, sites, 2)); |
|
12057
|
|
|
|
|
|
|
builder->setSites(*seq); |
|
12058
|
|
|
|
|
|
|
} |
|
12059
|
|
|
|
|
|
|
else { |
|
12060
|
|
|
|
|
|
|
auto& g = xs::in(sites); |
|
12061
|
|
|
|
|
|
|
builder->setSites(g); |
|
12062
|
|
|
|
|
|
|
} |
|
12063
|
|
|
|
|
|
|
|
|
12064
|
|
|
|
|
|
|
if (tolerance) { |
|
12065
|
|
|
|
|
|
|
builder->setTolerance(Simple(tolerance)); |
|
12066
|
|
|
|
|
|
|
} |
|
12067
|
|
|
|
|
|
|
|
|
12068
|
|
|
|
|
|
|
Object wrapped = xs::out(builder.release()); |
|
12069
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(geometry_factory), &payload_marker); |
|
12070
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
12071
|
|
|
|
|
|
|
#line 12072 "Geos.xs.cc" |
|
12072
|
|
|
|
|
|
|
{ |
|
12073
|
|
|
|
|
|
|
SV * RETVALSV; |
|
12074
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
12075
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
12076
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
12077
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
12078
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12079
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12080
|
|
|
|
|
|
|
case SVt_PVCV: |
|
12081
|
|
|
|
|
|
|
case SVt_PVIO: |
|
12082
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
12083
|
0
|
|
|
|
|
|
break; |
|
12084
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
12085
|
|
|
|
|
|
|
} |
|
12086
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
12087
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
12088
|
|
|
|
|
|
|
} |
|
12089
|
|
|
|
|
|
|
} |
|
12090
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
12091
|
2
|
50
|
|
|
|
|
}); } |
|
12092
|
|
|
|
|
|
|
|
|
12093
|
|
|
|
|
|
|
|
|
12094
|
|
|
|
|
|
|
|
|
12095
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangulate__DelaunayTriangulationBuilder_getEdges) { xs::throw_guard(aTHX_ cv, [=]() |
|
12096
|
|
|
|
|
|
|
{ |
|
12097
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
12098
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
12099
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
12100
|
|
|
|
|
|
|
{ |
|
12101
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
12102
|
2
|
50
|
|
|
|
|
DelaunayTriangulationBuilder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
12103
|
|
|
|
|
|
|
; |
|
12104
|
|
|
|
|
|
|
#line 27 "./xsi/triangulate/DelaunayTriangulationBuilder.xsi" |
|
12105
|
|
|
|
|
|
|
Object me{ST(0)}; |
|
12106
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker); |
|
12107
|
|
|
|
|
|
|
GeometryFactory* factory = xs::in(payload.obj); |
|
12108
|
|
|
|
|
|
|
auto edges = THIS->getEdges(*factory); |
|
12109
|
|
|
|
|
|
|
RETVAL = Helper::uplift(edges.release()); |
|
12110
|
|
|
|
|
|
|
#line 12111 "Geos.xs.cc" |
|
12111
|
|
|
|
|
|
|
{ |
|
12112
|
|
|
|
|
|
|
SV * RETVALSV; |
|
12113
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
12114
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
12115
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
12116
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
12117
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12118
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12119
|
|
|
|
|
|
|
case SVt_PVCV: |
|
12120
|
|
|
|
|
|
|
case SVt_PVIO: |
|
12121
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
12122
|
0
|
|
|
|
|
|
break; |
|
12123
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
12124
|
|
|
|
|
|
|
} |
|
12125
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
12126
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
12127
|
|
|
|
|
|
|
} |
|
12128
|
|
|
|
|
|
|
} |
|
12129
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
12130
|
2
|
50
|
|
|
|
|
}); } |
|
12131
|
|
|
|
|
|
|
|
|
12132
|
|
|
|
|
|
|
|
|
12133
|
|
|
|
|
|
|
|
|
12134
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangulate__DelaunayTriangulationBuilder_getTriangles) { xs::throw_guard(aTHX_ cv, [=]() |
|
12135
|
|
|
|
|
|
|
{ |
|
12136
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
12137
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
12138
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
12139
|
|
|
|
|
|
|
{ |
|
12140
|
4
|
|
|
|
|
|
Sv RETVAL; |
|
12141
|
2
|
50
|
|
|
|
|
DelaunayTriangulationBuilder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
12142
|
|
|
|
|
|
|
; |
|
12143
|
|
|
|
|
|
|
#line 35 "./xsi/triangulate/DelaunayTriangulationBuilder.xsi" |
|
12144
|
|
|
|
|
|
|
Object me{ST(0)}; |
|
12145
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker); |
|
12146
|
|
|
|
|
|
|
GeometryFactory* factory = xs::in(payload.obj); |
|
12147
|
|
|
|
|
|
|
auto edges = THIS->getTriangles(*factory); |
|
12148
|
|
|
|
|
|
|
RETVAL = Helper::uplift(edges.release()); |
|
12149
|
|
|
|
|
|
|
#line 12150 "Geos.xs.cc" |
|
12150
|
|
|
|
|
|
|
{ |
|
12151
|
|
|
|
|
|
|
SV * RETVALSV; |
|
12152
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
12153
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
12154
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
12155
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
12156
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12157
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12158
|
|
|
|
|
|
|
case SVt_PVCV: |
|
12159
|
|
|
|
|
|
|
case SVt_PVIO: |
|
12160
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
12161
|
0
|
|
|
|
|
|
break; |
|
12162
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
12163
|
|
|
|
|
|
|
} |
|
12164
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
12165
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
12166
|
|
|
|
|
|
|
} |
|
12167
|
|
|
|
|
|
|
} |
|
12168
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
12169
|
2
|
50
|
|
|
|
|
}); } |
|
12170
|
|
|
|
|
|
|
|
|
12171
|
|
|
|
|
|
|
|
|
12172
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/triangulate/DelaunayTriangulationBuilder.xsi' */ |
|
12173
|
|
|
|
|
|
|
|
|
12174
|
|
|
|
|
|
|
|
|
12175
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/triangulate/VoronoiDiagramBuilder.xsi' from 'Geos.xs' */ |
|
12176
|
|
|
|
|
|
|
|
|
12177
|
|
|
|
|
|
|
|
|
12178
|
|
|
|
|
|
|
|
|
12179
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangulate__VoronoiDiagramBuilder_new) { xs::throw_guard(aTHX_ cv, [=]() |
|
12180
|
|
|
|
|
|
|
{ |
|
12181
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
12182
|
1
|
50
|
|
|
|
|
if (items < 3 || items > 5) |
|
|
|
50
|
|
|
|
|
|
|
12183
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, geometry_factory, sites, tolerance= NULL, env= NULL"); |
|
12184
|
|
|
|
|
|
|
{ |
|
12185
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
12186
|
1
|
|
|
|
|
|
SV* geometry_factory = ST(1) |
|
12187
|
|
|
|
|
|
|
; |
|
12188
|
2
|
50
|
|
|
|
|
Sv sites = ST(2) |
|
12189
|
|
|
|
|
|
|
; |
|
12190
|
|
|
|
|
|
|
SV* tolerance; |
|
12191
|
|
|
|
|
|
|
SV* env; |
|
12192
|
|
|
|
|
|
|
|
|
12193
|
1
|
50
|
|
|
|
|
if (items < 4) |
|
12194
|
0
|
|
|
|
|
|
tolerance = NULL; |
|
12195
|
|
|
|
|
|
|
else { |
|
12196
|
1
|
|
|
|
|
|
tolerance = ST(3) |
|
12197
|
1
|
|
|
|
|
|
; |
|
12198
|
|
|
|
|
|
|
} |
|
12199
|
|
|
|
|
|
|
|
|
12200
|
1
|
50
|
|
|
|
|
if (items < 5) |
|
12201
|
0
|
|
|
|
|
|
env = NULL; |
|
12202
|
|
|
|
|
|
|
else { |
|
12203
|
1
|
|
|
|
|
|
env = ST(4) |
|
12204
|
1
|
|
|
|
|
|
; |
|
12205
|
|
|
|
|
|
|
} |
|
12206
|
|
|
|
|
|
|
#line 5 "./xsi/triangulate/VoronoiDiagramBuilder.xsi" |
|
12207
|
|
|
|
|
|
|
auto builder = std::unique_ptr(new VoronoiDiagramBuilder()); |
|
12208
|
|
|
|
|
|
|
GeometryFactory* factory = xs::in(geometry_factory); |
|
12209
|
|
|
|
|
|
|
|
|
12210
|
|
|
|
|
|
|
if (sites.is_array_ref()) { |
|
12211
|
|
|
|
|
|
|
auto seq = std::unique_ptr(Helper::convert_copy(*factory, sites, 2)); |
|
12212
|
|
|
|
|
|
|
builder->setSites(*seq); |
|
12213
|
|
|
|
|
|
|
} |
|
12214
|
|
|
|
|
|
|
else { |
|
12215
|
|
|
|
|
|
|
auto& g = xs::in(sites); |
|
12216
|
|
|
|
|
|
|
builder->setSites(g); |
|
12217
|
|
|
|
|
|
|
} |
|
12218
|
|
|
|
|
|
|
|
|
12219
|
|
|
|
|
|
|
if (tolerance) { |
|
12220
|
|
|
|
|
|
|
builder->setTolerance(Simple(tolerance)); |
|
12221
|
|
|
|
|
|
|
} |
|
12222
|
|
|
|
|
|
|
|
|
12223
|
|
|
|
|
|
|
if (env) { |
|
12224
|
|
|
|
|
|
|
auto envelope = xs::in(env); |
|
12225
|
|
|
|
|
|
|
builder->setClipEnvelope(envelope); |
|
12226
|
|
|
|
|
|
|
} |
|
12227
|
|
|
|
|
|
|
|
|
12228
|
|
|
|
|
|
|
Object wrapped = xs::out(builder.release()); |
|
12229
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(geometry_factory), &payload_marker); |
|
12230
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
12231
|
|
|
|
|
|
|
#line 12232 "Geos.xs.cc" |
|
12232
|
|
|
|
|
|
|
{ |
|
12233
|
|
|
|
|
|
|
SV * RETVALSV; |
|
12234
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
12235
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
12236
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
12237
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
12238
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12239
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12240
|
|
|
|
|
|
|
case SVt_PVCV: |
|
12241
|
|
|
|
|
|
|
case SVt_PVIO: |
|
12242
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
12243
|
0
|
|
|
|
|
|
break; |
|
12244
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
12245
|
|
|
|
|
|
|
} |
|
12246
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
12247
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
12248
|
|
|
|
|
|
|
} |
|
12249
|
|
|
|
|
|
|
} |
|
12250
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
12251
|
1
|
50
|
|
|
|
|
}); } |
|
12252
|
|
|
|
|
|
|
|
|
12253
|
|
|
|
|
|
|
|
|
12254
|
|
|
|
|
|
|
|
|
12255
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangulate__VoronoiDiagramBuilder_getDiagramEdges) { xs::throw_guard(aTHX_ cv, [=]() |
|
12256
|
|
|
|
|
|
|
{ |
|
12257
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
12258
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
12259
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
12260
|
|
|
|
|
|
|
{ |
|
12261
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
12262
|
1
|
50
|
|
|
|
|
VoronoiDiagramBuilder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
12263
|
|
|
|
|
|
|
; |
|
12264
|
|
|
|
|
|
|
#line 32 "./xsi/triangulate/VoronoiDiagramBuilder.xsi" |
|
12265
|
|
|
|
|
|
|
Object me{ST(0)}; |
|
12266
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker); |
|
12267
|
|
|
|
|
|
|
GeometryFactory* factory = xs::in(payload.obj); |
|
12268
|
|
|
|
|
|
|
auto edges = THIS->getDiagramEdges(*factory); |
|
12269
|
|
|
|
|
|
|
RETVAL = Helper::uplift(edges.release()); |
|
12270
|
|
|
|
|
|
|
#line 12271 "Geos.xs.cc" |
|
12271
|
|
|
|
|
|
|
{ |
|
12272
|
|
|
|
|
|
|
SV * RETVALSV; |
|
12273
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
12274
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
12275
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
12276
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
12277
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12278
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12279
|
|
|
|
|
|
|
case SVt_PVCV: |
|
12280
|
|
|
|
|
|
|
case SVt_PVIO: |
|
12281
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
12282
|
0
|
|
|
|
|
|
break; |
|
12283
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
12284
|
|
|
|
|
|
|
} |
|
12285
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
12286
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
12287
|
|
|
|
|
|
|
} |
|
12288
|
|
|
|
|
|
|
} |
|
12289
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
12290
|
1
|
50
|
|
|
|
|
}); } |
|
12291
|
|
|
|
|
|
|
|
|
12292
|
|
|
|
|
|
|
|
|
12293
|
|
|
|
|
|
|
|
|
12294
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangulate__VoronoiDiagramBuilder_getDiagram) { xs::throw_guard(aTHX_ cv, [=]() |
|
12295
|
|
|
|
|
|
|
{ |
|
12296
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
12297
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
12298
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
12299
|
|
|
|
|
|
|
{ |
|
12300
|
2
|
|
|
|
|
|
Sv RETVAL; |
|
12301
|
1
|
50
|
|
|
|
|
VoronoiDiagramBuilder* THIS = xs::in(aTHX_ ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
12302
|
|
|
|
|
|
|
; |
|
12303
|
|
|
|
|
|
|
#line 40 "./xsi/triangulate/VoronoiDiagramBuilder.xsi" |
|
12304
|
|
|
|
|
|
|
Object me{ST(0)}; |
|
12305
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker); |
|
12306
|
|
|
|
|
|
|
GeometryFactory* factory = xs::in(payload.obj); |
|
12307
|
|
|
|
|
|
|
auto edges = THIS->getDiagram(*factory); |
|
12308
|
|
|
|
|
|
|
RETVAL = Helper::uplift(edges.release()); |
|
12309
|
|
|
|
|
|
|
#line 12310 "Geos.xs.cc" |
|
12310
|
|
|
|
|
|
|
{ |
|
12311
|
|
|
|
|
|
|
SV * RETVALSV; |
|
12312
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
|
12313
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
12314
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
12315
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
12316
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12317
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
12318
|
|
|
|
|
|
|
case SVt_PVCV: |
|
12319
|
|
|
|
|
|
|
case SVt_PVIO: |
|
12320
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
12321
|
0
|
|
|
|
|
|
break; |
|
12322
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
12323
|
|
|
|
|
|
|
} |
|
12324
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
12325
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
|
12326
|
|
|
|
|
|
|
} |
|
12327
|
|
|
|
|
|
|
} |
|
12328
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
12329
|
1
|
50
|
|
|
|
|
}); } |
|
12330
|
|
|
|
|
|
|
|
|
12331
|
|
|
|
|
|
|
|
|
12332
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/triangulate/VoronoiDiagramBuilder.xsi' */ |
|
12333
|
|
|
|
|
|
|
|
|
12334
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
12335
|
|
|
|
|
|
|
extern "C" |
|
12336
|
|
|
|
|
|
|
#endif |
|
12337
|
|
|
|
|
|
|
|
|
12338
|
92
|
|
|
|
|
|
XS_EXTERNAL(boot_Geo__Geos) { xs::throw_guard(aTHX_ cv, [=]() mutable |
|
12339
|
|
|
|
|
|
|
{ |
|
12340
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
12341
|
|
|
|
|
|
|
dVAR; dXSARGS; |
|
12342
|
|
|
|
|
|
|
#else |
|
12343
|
46
|
50
|
|
|
|
|
dVAR; dXSBOOTARGSXSAPIVERCHK; |
|
|
|
50
|
|
|
|
|
|
|
12344
|
|
|
|
|
|
|
#endif |
|
12345
|
|
|
|
|
|
|
#if (PERL_REVISION == 5 && PERL_VERSION < 9) |
|
12346
|
|
|
|
|
|
|
char* file = __FILE__; |
|
12347
|
|
|
|
|
|
|
#else |
|
12348
|
46
|
|
|
|
|
|
const char* file = __FILE__; |
|
12349
|
|
|
|
|
|
|
#endif |
|
12350
|
|
|
|
|
|
|
|
|
12351
|
|
|
|
|
|
|
PERL_UNUSED_VAR(file); |
|
12352
|
|
|
|
|
|
|
|
|
12353
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
12354
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); /* -W */ |
|
12355
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
12356
|
|
|
|
|
|
|
XS_VERSION_BOOTCHECK; |
|
12357
|
|
|
|
|
|
|
# ifdef XS_APIVERSION_BOOTCHECK |
|
12358
|
|
|
|
|
|
|
XS_APIVERSION_BOOTCHECK; |
|
12359
|
|
|
|
|
|
|
# endif |
|
12360
|
|
|
|
|
|
|
#endif |
|
12361
|
|
|
|
|
|
|
|
|
12362
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::getNull", XS_Geo__Geos__Coordinate_getNull); |
|
12363
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::new", XS_Geo__Geos__Coordinate_new); |
|
12364
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Coordinate::x", XS_Geo__Geos__Coordinate_x); |
|
12365
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
|
12366
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Coordinate::y", XS_Geo__Geos__Coordinate_x); |
|
12367
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
|
12368
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Coordinate::z", XS_Geo__Geos__Coordinate_x); |
|
12369
|
46
|
|
|
|
|
|
XSANY.any_i32 = 2; |
|
12370
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::setNull", XS_Geo__Geos__Coordinate_setNull); |
|
12371
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::isNull", XS_Geo__Geos__Coordinate_isNull); |
|
12372
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::equals", XS_Geo__Geos__Coordinate_equals); |
|
12373
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::equals2D", XS_Geo__Geos__Coordinate_equals2D); |
|
12374
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::equals3D", XS_Geo__Geos__Coordinate_equals3D); |
|
12375
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::compareTo", XS_Geo__Geos__Coordinate_compareTo); |
|
12376
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::eq", XS_Geo__Geos__Coordinate_eq); |
|
12377
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::toString", XS_Geo__Geos__Coordinate_toString); |
|
12378
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::distance", XS_Geo__Geos__Coordinate_distance); |
|
12379
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::hashCode", XS_Geo__Geos__Coordinate_hashCode); |
|
12380
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::CLONE_SKIP", XS_Geo__Geos__Coordinate_CLONE_SKIP); |
|
12381
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Dimension::toDimensionSymbol", XS_Geo__Geos__Dimension_toDimensionSymbol); |
|
12382
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Dimension::toDimensionValue", XS_Geo__Geos__Dimension_toDimensionValue); |
|
12383
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::new", XS_Geo__Geos__Envelope_new); |
|
12384
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::init", XS_Geo__Geos__Envelope_init); |
|
12385
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::setToNull", XS_Geo__Geos__Envelope_setToNull); |
|
12386
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getArea", XS_Geo__Geos__Envelope_getArea); |
|
12387
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getMaxY", XS_Geo__Geos__Envelope_getMaxY); |
|
12388
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getMaxX", XS_Geo__Geos__Envelope_getMaxX); |
|
12389
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getMinY", XS_Geo__Geos__Envelope_getMinY); |
|
12390
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getMinX", XS_Geo__Geos__Envelope_getMinX); |
|
12391
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getWidth", XS_Geo__Geos__Envelope_getWidth); |
|
12392
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getHeight", XS_Geo__Geos__Envelope_getHeight); |
|
12393
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::isNull", XS_Geo__Geos__Envelope_isNull); |
|
12394
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::hashCode", XS_Geo__Geos__Envelope_hashCode); |
|
12395
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::toString", XS_Geo__Geos__Envelope_toString); |
|
12396
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::eq", XS_Geo__Geos__Envelope_eq); |
|
12397
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::centre", XS_Geo__Geos__Envelope_centre); |
|
12398
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::contains", XS_Geo__Geos__Envelope_contains); |
|
12399
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::covers", XS_Geo__Geos__Envelope_covers); |
|
12400
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::intersects", XS_Geo__Geos__Envelope_intersects); |
|
12401
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::expandToInclude", XS_Geo__Geos__Envelope_expandToInclude); |
|
12402
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::distance", XS_Geo__Geos__Envelope_distance); |
|
12403
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::translate", XS_Geo__Geos__Envelope_translate); |
|
12404
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::expandBy", XS_Geo__Geos__Envelope_expandBy); |
|
12405
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::intersection", XS_Geo__Geos__Envelope_intersection); |
|
12406
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::CLONE_SKIP", XS_Geo__Geos__Envelope_CLONE_SKIP); |
|
12407
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::new", XS_Geo__Geos__PrecisionModel_new); |
|
12408
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::getScale", XS_Geo__Geos__PrecisionModel_getScale); |
|
12409
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::getOffsetX", XS_Geo__Geos__PrecisionModel_getOffsetX); |
|
12410
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::getOffsetY", XS_Geo__Geos__PrecisionModel_getOffsetY); |
|
12411
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::isFloating", XS_Geo__Geos__PrecisionModel_isFloating); |
|
12412
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::getMaximumSignificantDigits", XS_Geo__Geos__PrecisionModel_getMaximumSignificantDigits); |
|
12413
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::getType", XS_Geo__Geos__PrecisionModel_getType); |
|
12414
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::makePrecise", XS_Geo__Geos__PrecisionModel_makePrecise); |
|
12415
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::toString", XS_Geo__Geos__PrecisionModel_toString); |
|
12416
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::compareTo", XS_Geo__Geos__PrecisionModel_compareTo); |
|
12417
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::new", XS_Geo__Geos__IntersectionMatrix_new); |
|
12418
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::matches", XS_Geo__Geos__IntersectionMatrix_matches); |
|
12419
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::add", XS_Geo__Geos__IntersectionMatrix_add); |
|
12420
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::set", XS_Geo__Geos__IntersectionMatrix_set); |
|
12421
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::setAtLeast", XS_Geo__Geos__IntersectionMatrix_setAtLeast); |
|
12422
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::setAll", XS_Geo__Geos__IntersectionMatrix_setAll); |
|
12423
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::setAtLeastIfValid", XS_Geo__Geos__IntersectionMatrix_setAtLeastIfValid); |
|
12424
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::get", XS_Geo__Geos__IntersectionMatrix_get); |
|
12425
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isDisjoint", XS_Geo__Geos__IntersectionMatrix_isDisjoint); |
|
12426
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isIntersects", XS_Geo__Geos__IntersectionMatrix_isIntersects); |
|
12427
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isWithin", XS_Geo__Geos__IntersectionMatrix_isWithin); |
|
12428
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isContains", XS_Geo__Geos__IntersectionMatrix_isContains); |
|
12429
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isCovers", XS_Geo__Geos__IntersectionMatrix_isCovers); |
|
12430
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isCoveredBy", XS_Geo__Geos__IntersectionMatrix_isCoveredBy); |
|
12431
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isTouches", XS_Geo__Geos__IntersectionMatrix_isTouches); |
|
12432
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isCrosses", XS_Geo__Geos__IntersectionMatrix_isCrosses); |
|
12433
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isEquals", XS_Geo__Geos__IntersectionMatrix_isEquals); |
|
12434
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isOverlaps", XS_Geo__Geos__IntersectionMatrix_isOverlaps); |
|
12435
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::transpose", XS_Geo__Geos__IntersectionMatrix_transpose); |
|
12436
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::toString", XS_Geo__Geos__IntersectionMatrix_toString); |
|
12437
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::CLONE_SKIP", XS_Geo__Geos__IntersectionMatrix_CLONE_SKIP); |
|
12438
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangle::new", XS_Geo__Geos__Triangle_new); |
|
12439
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Triangle::p0", XS_Geo__Geos__Triangle_p0); |
|
12440
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
|
12441
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Triangle::p1", XS_Geo__Geos__Triangle_p0); |
|
12442
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
|
12443
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Triangle::p2", XS_Geo__Geos__Triangle_p0); |
|
12444
|
46
|
|
|
|
|
|
XSANY.any_i32 = 2; |
|
12445
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangle::inCentre", XS_Geo__Geos__Triangle_inCentre); |
|
12446
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangle::circumcentre", XS_Geo__Geos__Triangle_circumcentre); |
|
12447
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Triangle::isInCircleNonRobust", XS_Geo__Geos__Triangle_isInCircleNonRobust); |
|
12448
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
|
12449
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Triangle::isInCircleNormalized", XS_Geo__Geos__Triangle_isInCircleNonRobust); |
|
12450
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
|
12451
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Triangle::isInCircleRobust", XS_Geo__Geos__Triangle_isInCircleNonRobust); |
|
12452
|
46
|
|
|
|
|
|
XSANY.any_i32 = 2; |
|
12453
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangle::CLONE_SKIP", XS_Geo__Geos__Triangle_CLONE_SKIP); |
|
12454
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::new", XS_Geo__Geos__LineSegment_new); |
|
12455
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::getLength", XS_Geo__Geos__LineSegment_getLength); |
|
12456
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::isHorizontal", XS_Geo__Geos__LineSegment_isHorizontal); |
|
12457
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::isVertical", XS_Geo__Geos__LineSegment_isVertical); |
|
12458
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::setCoordinates", XS_Geo__Geos__LineSegment_setCoordinates); |
|
12459
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::orientationIndex", XS_Geo__Geos__LineSegment_orientationIndex); |
|
12460
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::reverse", XS_Geo__Geos__LineSegment_reverse); |
|
12461
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::normalize", XS_Geo__Geos__LineSegment_normalize); |
|
12462
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::angle", XS_Geo__Geos__LineSegment_angle); |
|
12463
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::midPoint", XS_Geo__Geos__LineSegment_midPoint); |
|
12464
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::distance", XS_Geo__Geos__LineSegment_distance); |
|
12465
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::distancePerpendicular", XS_Geo__Geos__LineSegment_distancePerpendicular); |
|
12466
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::pointAlong", XS_Geo__Geos__LineSegment_pointAlong); |
|
12467
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::pointAlongOffset", XS_Geo__Geos__LineSegment_pointAlongOffset); |
|
12468
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::projectionFactor", XS_Geo__Geos__LineSegment_projectionFactor); |
|
12469
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::segmentFraction", XS_Geo__Geos__LineSegment_segmentFraction); |
|
12470
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::project", XS_Geo__Geos__LineSegment_project); |
|
12471
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::closestPoint", XS_Geo__Geos__LineSegment_closestPoint); |
|
12472
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::compareTo", XS_Geo__Geos__LineSegment_compareTo); |
|
12473
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::equalsTopo", XS_Geo__Geos__LineSegment_equalsTopo); |
|
12474
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::closestPoints", XS_Geo__Geos__LineSegment_closestPoints); |
|
12475
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::intersection", XS_Geo__Geos__LineSegment_intersection); |
|
12476
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::lineIntersection", XS_Geo__Geos__LineSegment_lineIntersection); |
|
12477
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::toGeometry", XS_Geo__Geos__LineSegment_toGeometry); |
|
12478
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::toString", XS_Geo__Geos__LineSegment_toString); |
|
12479
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::LineSegment::p0", XS_Geo__Geos__LineSegment_p0); |
|
12480
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
|
12481
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::LineSegment::p1", XS_Geo__Geos__LineSegment_p0); |
|
12482
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
|
12483
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::CLONE_SKIP", XS_Geo__Geos__LineSegment_CLONE_SKIP); |
|
12484
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::create", XS_Geo__Geos__GeometryFactory_create); |
|
12485
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::getPrecisionModel", XS_Geo__Geos__GeometryFactory_getPrecisionModel); |
|
12486
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::getSRID", XS_Geo__Geos__GeometryFactory_getSRID); |
|
12487
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createGeometryCollection", XS_Geo__Geos__GeometryFactory_createGeometryCollection); |
|
12488
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createPoint", XS_Geo__Geos__GeometryFactory_createPoint); |
|
12489
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createMultiPoint", XS_Geo__Geos__GeometryFactory_createMultiPoint); |
|
12490
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createLineString", XS_Geo__Geos__GeometryFactory_createLineString); |
|
12491
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createMultiLineString", XS_Geo__Geos__GeometryFactory_createMultiLineString); |
|
12492
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createLinearRing", XS_Geo__Geos__GeometryFactory_createLinearRing); |
|
12493
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createPolygon", XS_Geo__Geos__GeometryFactory_createPolygon); |
|
12494
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createMultiPolygon", XS_Geo__Geos__GeometryFactory_createMultiPolygon); |
|
12495
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::toGeometry", XS_Geo__Geos__GeometryFactory_toGeometry); |
|
12496
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createEmptyGeometry", XS_Geo__Geos__GeometryFactory_createEmptyGeometry); |
|
12497
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::CLONE_SKIP", XS_Geo__Geos__GeometryFactory_CLONE_SKIP); |
|
12498
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getSRID", XS_Geo__Geos__Geometry_getSRID); |
|
12499
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::setSRID", XS_Geo__Geos__Geometry_setSRID); |
|
12500
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::isEmpty", XS_Geo__Geos__Geometry_isEmpty); |
|
12501
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::isSimple", XS_Geo__Geos__Geometry_isSimple); |
|
12502
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::isRectangle", XS_Geo__Geos__Geometry_isRectangle); |
|
12503
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::isValid", XS_Geo__Geos__Geometry_isValid); |
|
12504
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getNumPoints", XS_Geo__Geos__Geometry_getNumPoints); |
|
12505
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getDimension", XS_Geo__Geos__Geometry_getDimension); |
|
12506
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getCoordinateDimension", XS_Geo__Geos__Geometry_getCoordinateDimension); |
|
12507
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getBoundaryDimension", XS_Geo__Geos__Geometry_getBoundaryDimension); |
|
12508
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getNumGeometries", XS_Geo__Geos__Geometry_getNumGeometries); |
|
12509
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::reverse", XS_Geo__Geos__Geometry_reverse); |
|
12510
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getGeometryN", XS_Geo__Geos__Geometry_getGeometryN); |
|
12511
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getCoordinate", XS_Geo__Geos__Geometry_getCoordinate); |
|
12512
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getGeometryType", XS_Geo__Geos__Geometry_getGeometryType); |
|
12513
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getGeometryTypeId", XS_Geo__Geos__Geometry_getGeometryTypeId); |
|
12514
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::toString", XS_Geo__Geos__Geometry_toString); |
|
12515
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::toText", XS_Geo__Geos__Geometry_toText); |
|
12516
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::equalsExact", XS_Geo__Geos__Geometry_equalsExact); |
|
12517
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::equals", XS_Geo__Geos__Geometry_equals); |
|
12518
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::compareTo", XS_Geo__Geos__Geometry_compareTo); |
|
12519
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getBoundary", XS_Geo__Geos__Geometry_getBoundary); |
|
12520
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getArea", XS_Geo__Geos__Geometry_getArea); |
|
12521
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getLength", XS_Geo__Geos__Geometry_getLength); |
|
12522
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::distance", XS_Geo__Geos__Geometry_distance); |
|
12523
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::isWithinDistance", XS_Geo__Geos__Geometry_isWithinDistance); |
|
12524
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getCentroid", XS_Geo__Geos__Geometry_getCentroid); |
|
12525
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getInteriorPoint", XS_Geo__Geos__Geometry_getInteriorPoint); |
|
12526
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::symDifference", XS_Geo__Geos__Geometry_symDifference); |
|
12527
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::difference", XS_Geo__Geos__Geometry_difference); |
|
12528
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::Union", XS_Geo__Geos__Geometry_Union); |
|
12529
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::intersection", XS_Geo__Geos__Geometry_intersection); |
|
12530
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::convexHull", XS_Geo__Geos__Geometry_convexHull); |
|
12531
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::buffer", XS_Geo__Geos__Geometry_buffer); |
|
12532
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::coveredBy", XS_Geo__Geos__Geometry_coveredBy); |
|
12533
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::covers", XS_Geo__Geos__Geometry_covers); |
|
12534
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::overlaps", XS_Geo__Geos__Geometry_overlaps); |
|
12535
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::contains", XS_Geo__Geos__Geometry_contains); |
|
12536
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::within", XS_Geo__Geos__Geometry_within); |
|
12537
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::crosses", XS_Geo__Geos__Geometry_crosses); |
|
12538
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::intersects", XS_Geo__Geos__Geometry_intersects); |
|
12539
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::touches", XS_Geo__Geos__Geometry_touches); |
|
12540
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::disjoint", XS_Geo__Geos__Geometry_disjoint); |
|
12541
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getEnvelope", XS_Geo__Geos__Geometry_getEnvelope); |
|
12542
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::clone", XS_Geo__Geos__Geometry_clone); |
|
12543
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getPrecisionModel", XS_Geo__Geos__Geometry_getPrecisionModel); |
|
12544
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getCoordinates", XS_Geo__Geos__Geometry_getCoordinates); |
|
12545
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::relate", XS_Geo__Geos__Geometry_relate); |
|
12546
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::normalize", XS_Geo__Geos__Geometry_normalize); |
|
12547
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::CLONE_SKIP", XS_Geo__Geos__Geometry_CLONE_SKIP); |
|
12548
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::HOOK_CLONE", XS_Geo__Geos__Geometry_HOOK_CLONE); |
|
12549
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryCollection::CLONE_SKIP", XS_Geo__Geos__GeometryCollection_CLONE_SKIP); |
|
12550
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Point::getX", XS_Geo__Geos__Point_getX); |
|
12551
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Point::getY", XS_Geo__Geos__Point_getY); |
|
12552
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Point::reverse", XS_Geo__Geos__Point_reverse); |
|
12553
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::MultiPoint::CLONE_SKIP", XS_Geo__Geos__MultiPoint_CLONE_SKIP); |
|
12554
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineString::getPointN", XS_Geo__Geos__LineString_getPointN); |
|
12555
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineString::getStartPoint", XS_Geo__Geos__LineString_getStartPoint); |
|
12556
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineString::getEndPoint", XS_Geo__Geos__LineString_getEndPoint); |
|
12557
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineString::isClosed", XS_Geo__Geos__LineString_isClosed); |
|
12558
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineString::isRing", XS_Geo__Geos__LineString_isRing); |
|
12559
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::MultiLineString::isClosed", XS_Geo__Geos__MultiLineString_isClosed); |
|
12560
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LinearRing::reverse", XS_Geo__Geos__LinearRing_reverse); |
|
12561
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Polygon::getExteriorRing", XS_Geo__Geos__Polygon_getExteriorRing); |
|
12562
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Polygon::getInteriorRingN", XS_Geo__Geos__Polygon_getInteriorRingN); |
|
12563
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Polygon::getNumInteriorRing", XS_Geo__Geos__Polygon_getNumInteriorRing); |
|
12564
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Polygon::tesselate", XS_Geo__Geos__Polygon_tesselate); |
|
12565
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Polygon::CLONE_SKIP", XS_Geo__Geos__Polygon_CLONE_SKIP); |
|
12566
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::MultiPolygon::CLONE_SKIP", XS_Geo__Geos__MultiPolygon_CLONE_SKIP); |
|
12567
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBConstants::CLONE_SKIP", XS_Geo__Geos__WKBConstants_CLONE_SKIP); |
|
12568
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::new", XS_Geo__Geos__WKBWriter_new); |
|
12569
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::getOutputDimension", XS_Geo__Geos__WKBWriter_getOutputDimension); |
|
12570
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::setOutputDimension", XS_Geo__Geos__WKBWriter_setOutputDimension); |
|
12571
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::getByteOrder", XS_Geo__Geos__WKBWriter_getByteOrder); |
|
12572
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::setByteOrder", XS_Geo__Geos__WKBWriter_setByteOrder); |
|
12573
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::getIncludeSRID", XS_Geo__Geos__WKBWriter_getIncludeSRID); |
|
12574
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::setIncludeSRID", XS_Geo__Geos__WKBWriter_setIncludeSRID); |
|
12575
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::write", XS_Geo__Geos__WKBWriter_write); |
|
12576
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::writeHEX", XS_Geo__Geos__WKBWriter_writeHEX); |
|
12577
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::CLONE_SKIP", XS_Geo__Geos__WKBWriter_CLONE_SKIP); |
|
12578
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBReader::read", XS_Geo__Geos__WKBReader_read); |
|
12579
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBReader::readHEX", XS_Geo__Geos__WKBReader_readHEX); |
|
12580
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKTWriter::new", XS_Geo__Geos__WKTWriter_new); |
|
12581
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKTWriter::setTrim", XS_Geo__Geos__WKTWriter_setTrim); |
|
12582
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKTWriter::setRoundingPrecision", XS_Geo__Geos__WKTWriter_setRoundingPrecision); |
|
12583
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKTWriter::write", XS_Geo__Geos__WKTWriter_write); |
|
12584
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKTWriter::CLONE_SKIP", XS_Geo__Geos__WKTWriter_CLONE_SKIP); |
|
12585
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKTReader::read", XS_Geo__Geos__WKTReader_read); |
|
12586
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::getGeometry", XS_Geo__Geos__Prep__Geometry_getGeometry); |
|
12587
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::contains", XS_Geo__Geos__Prep__Geometry_contains); |
|
12588
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::containsProperly", XS_Geo__Geos__Prep__Geometry_containsProperly); |
|
12589
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::coveredBy", XS_Geo__Geos__Prep__Geometry_coveredBy); |
|
12590
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::covers", XS_Geo__Geos__Prep__Geometry_covers); |
|
12591
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::crosses", XS_Geo__Geos__Prep__Geometry_crosses); |
|
12592
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::disjoint", XS_Geo__Geos__Prep__Geometry_disjoint); |
|
12593
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::intersects", XS_Geo__Geos__Prep__Geometry_intersects); |
|
12594
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::overlaps", XS_Geo__Geos__Prep__Geometry_overlaps); |
|
12595
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::touches", XS_Geo__Geos__Prep__Geometry_touches); |
|
12596
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::within", XS_Geo__Geos__Prep__Geometry_within); |
|
12597
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::toString", XS_Geo__Geos__Prep__Geometry_toString); |
|
12598
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::CLONE_SKIP", XS_Geo__Geos__Prep__Geometry_CLONE_SKIP); |
|
12599
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::GeometryFactory::prepare", XS_Geo__Geos__Prep__GeometryFactory_prepare); |
|
12600
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::toDegrees", XS_Geo__Geos__Algorithm_toDegrees); |
|
12601
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::toRadians", XS_Geo__Geos__Algorithm_toRadians); |
|
12602
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::angle", XS_Geo__Geos__Algorithm_angle); |
|
12603
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::isAcute", XS_Geo__Geos__Algorithm_isAcute); |
|
12604
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::isObtuse", XS_Geo__Geos__Algorithm_isObtuse); |
|
12605
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::angleBetween", XS_Geo__Geos__Algorithm_angleBetween); |
|
12606
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::angleBetweenOriented", XS_Geo__Geos__Algorithm_angleBetweenOriented); |
|
12607
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::interiorAngle", XS_Geo__Geos__Algorithm_interiorAngle); |
|
12608
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::getTurn", XS_Geo__Geos__Algorithm_getTurn); |
|
12609
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::normalize", XS_Geo__Geos__Algorithm_normalize); |
|
12610
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::normalizePositive", XS_Geo__Geos__Algorithm_normalizePositive); |
|
12611
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::diff", XS_Geo__Geos__Algorithm_diff); |
|
12612
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::centroid", XS_Geo__Geos__Algorithm_centroid); |
|
12613
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::centroidArea", XS_Geo__Geos__Algorithm_centroidArea); |
|
12614
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::centroidLine", XS_Geo__Geos__Algorithm_centroidLine); |
|
12615
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::centroidPoint", XS_Geo__Geos__Algorithm_centroidPoint); |
|
12616
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::isPointInRing", XS_Geo__Geos__Algorithm_isPointInRing); |
|
12617
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::locatePointInRing", XS_Geo__Geos__Algorithm_locatePointInRing); |
|
12618
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::isOnLine", XS_Geo__Geos__Algorithm_isOnLine); |
|
12619
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::isCCW", XS_Geo__Geos__Algorithm_isCCW); |
|
12620
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::computeOrientation", XS_Geo__Geos__Algorithm_computeOrientation); |
|
12621
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::distancePointLine", XS_Geo__Geos__Algorithm_distancePointLine); |
|
12622
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::distancePointLinePerpendicular", XS_Geo__Geos__Algorithm_distancePointLinePerpendicular); |
|
12623
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::distanceLineLine", XS_Geo__Geos__Algorithm_distanceLineLine); |
|
12624
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::signedArea", XS_Geo__Geos__Algorithm_signedArea); |
|
12625
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::length", XS_Geo__Geos__Algorithm_length); |
|
12626
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::orientationIndex", XS_Geo__Geos__Algorithm_orientationIndex); |
|
12627
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::getIntersection", XS_Geo__Geos__Algorithm_getIntersection); |
|
12628
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::convexHull", XS_Geo__Geos__Algorithm_convexHull); |
|
12629
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::interiorPointArea", XS_Geo__Geos__Algorithm_interiorPointArea); |
|
12630
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::interiorPointLine", XS_Geo__Geos__Algorithm_interiorPointLine); |
|
12631
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::interiorPointPoint", XS_Geo__Geos__Algorithm_interiorPointPoint); |
|
12632
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::locate", XS_Geo__Geos__Algorithm_locate); |
|
12633
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::intersects", XS_Geo__Geos__Algorithm_intersects); |
|
12634
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::signOfDet2x2", XS_Geo__Geos__Algorithm_signOfDet2x2); |
|
12635
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::locateIndexedPointInArea", XS_Geo__Geos__Algorithm_locateIndexedPointInArea); |
|
12636
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::locateSimplePointInArea", XS_Geo__Geos__Algorithm_locateSimplePointInArea); |
|
12637
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::HCoordinate::new", XS_Geo__Geos__Algorithm__HCoordinate_new); |
|
12638
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Algorithm::HCoordinate::w", XS_Geo__Geos__Algorithm__HCoordinate_x); |
|
12639
|
46
|
|
|
|
|
|
XSANY.any_i32 = 2; |
|
12640
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Algorithm::HCoordinate::x", XS_Geo__Geos__Algorithm__HCoordinate_x); |
|
12641
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
|
12642
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Algorithm::HCoordinate::y", XS_Geo__Geos__Algorithm__HCoordinate_x); |
|
12643
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
|
12644
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::HCoordinate::getCoordinate", XS_Geo__Geos__Algorithm__HCoordinate_getCoordinate); |
|
12645
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::HCoordinate::intersection", XS_Geo__Geos__Algorithm__HCoordinate_intersection); |
|
12646
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::HCoordinate::toString", XS_Geo__Geos__Algorithm__HCoordinate_toString); |
|
12647
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::HCoordinate::CLONE_SKIP", XS_Geo__Geos__Algorithm__HCoordinate_CLONE_SKIP); |
|
12648
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::new", XS_Geo__Geos__Algorithm__MinimumDiameter_new); |
|
12649
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::getMinimumRectangle", XS_Geo__Geos__Algorithm__MinimumDiameter_getMinimumRectangle); |
|
12650
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::getMinimumDiameter", XS_Geo__Geos__Algorithm__MinimumDiameter_getMinimumDiameter); |
|
12651
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::getLength", XS_Geo__Geos__Algorithm__MinimumDiameter_getLength); |
|
12652
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::getWidthCoordinate", XS_Geo__Geos__Algorithm__MinimumDiameter_getWidthCoordinate); |
|
12653
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::getSupportingSegment", XS_Geo__Geos__Algorithm__MinimumDiameter_getSupportingSegment); |
|
12654
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::getDiameter", XS_Geo__Geos__Algorithm__MinimumDiameter_getDiameter); |
|
12655
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::CLONE_SKIP", XS_Geo__Geos__Algorithm__MinimumDiameter_CLONE_SKIP); |
|
12656
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::new", XS_Geo__Geos__Algorithm__LineIntersector_new); |
|
12657
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::interpolateZ", XS_Geo__Geos__Algorithm__LineIntersector_interpolateZ); |
|
12658
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::computeEdgeDistance", XS_Geo__Geos__Algorithm__LineIntersector_computeEdgeDistance); |
|
12659
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::isSameSignAndNonZero", XS_Geo__Geos__Algorithm__LineIntersector_isSameSignAndNonZero); |
|
12660
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::hasIntersection", XS_Geo__Geos__Algorithm__LineIntersector_hasIntersection); |
|
12661
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::isInteriorIntersection", XS_Geo__Geos__Algorithm__LineIntersector_isInteriorIntersection); |
|
12662
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::setPrecisionModel", XS_Geo__Geos__Algorithm__LineIntersector_setPrecisionModel); |
|
12663
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::computeIntersection", XS_Geo__Geos__Algorithm__LineIntersector_computeIntersection); |
|
12664
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::toString", XS_Geo__Geos__Algorithm__LineIntersector_toString); |
|
12665
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::getIntersectionNum", XS_Geo__Geos__Algorithm__LineIntersector_getIntersectionNum); |
|
12666
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::isProper", XS_Geo__Geos__Algorithm__LineIntersector_isProper); |
|
12667
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::getIndexAlongSegment", XS_Geo__Geos__Algorithm__LineIntersector_getIndexAlongSegment); |
|
12668
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::getEdgeDistance", XS_Geo__Geos__Algorithm__LineIntersector_getEdgeDistance); |
|
12669
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::getIntersectionAlongSegment", XS_Geo__Geos__Algorithm__LineIntersector_getIntersectionAlongSegment); |
|
12670
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::CLONE_SKIP", XS_Geo__Geos__Algorithm__LineIntersector_CLONE_SKIP); |
|
12671
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::compareOrientedCoordinateArray", XS_Geo__Geos__Noding_compareOrientedCoordinateArray); |
|
12672
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::octant", XS_Geo__Geos__Noding_octant); |
|
12673
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::checkNodingValid", XS_Geo__Geos__Noding_checkNodingValid); |
|
12674
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::fastCheckNodingValid", XS_Geo__Geos__Noding_fastCheckNodingValid); |
|
12675
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::compareSegmentPoints", XS_Geo__Geos__Noding_compareSegmentPoints); |
|
12676
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::extractSegmentStrings", XS_Geo__Geos__Noding_extractSegmentStrings); |
|
12677
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::intersects", XS_Geo__Geos__Noding_intersects); |
|
12678
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentString::size", XS_Geo__Geos__Noding__SegmentString_size); |
|
12679
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentString::getCoordinate", XS_Geo__Geos__Noding__SegmentString_getCoordinate); |
|
12680
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentString::getCoordinates", XS_Geo__Geos__Noding__SegmentString_getCoordinates); |
|
12681
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentString::isClosed", XS_Geo__Geos__Noding__SegmentString_isClosed); |
|
12682
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentString::toString", XS_Geo__Geos__Noding__SegmentString_toString); |
|
12683
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentNode::isInterior", XS_Geo__Geos__Noding__SegmentNode_isInterior); |
|
12684
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentNode::isEndPoint", XS_Geo__Geos__Noding__SegmentNode_isEndPoint); |
|
12685
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentNode::compareTo", XS_Geo__Geos__Noding__SegmentNode_compareTo); |
|
12686
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentNode::toString", XS_Geo__Geos__Noding__SegmentNode_toString); |
|
12687
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentNode::coord", XS_Geo__Geos__Noding__SegmentNode_coord); |
|
12688
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentNode::segmentIndex", XS_Geo__Geos__Noding__SegmentNode_segmentIndex); |
|
12689
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::NodedSegmentString::new", XS_Geo__Geos__Noding__NodedSegmentString_new); |
|
12690
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::NodedSegmentString::addIntersectionNode", XS_Geo__Geos__Noding__NodedSegmentString_addIntersectionNode); |
|
12691
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::NodedSegmentString::getSegmentOctant", XS_Geo__Geos__Noding__NodedSegmentString_getSegmentOctant); |
|
12692
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::NodedSegmentString::addIntersections", XS_Geo__Geos__Noding__NodedSegmentString_addIntersections); |
|
12693
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::NodedSegmentString::addIntersection", XS_Geo__Geos__Noding__NodedSegmentString_addIntersection); |
|
12694
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::NodedSegmentString::CLONE_SKIP", XS_Geo__Geos__Noding__NodedSegmentString_CLONE_SKIP); |
|
12695
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::BasicSegmentString::new", XS_Geo__Geos__Noding__BasicSegmentString_new); |
|
12696
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::BasicSegmentString::DESTROY", XS_Geo__Geos__Noding__BasicSegmentString_DESTROY); |
|
12697
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::BasicSegmentString::getSegmentOctant", XS_Geo__Geos__Noding__BasicSegmentString_getSegmentOctant); |
|
12698
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::BasicSegmentString::CLONE_SKIP", XS_Geo__Geos__Noding__BasicSegmentString_CLONE_SKIP); |
|
12699
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersector::processIntersections", XS_Geo__Geos__Noding__SegmentIntersector_processIntersections); |
|
12700
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersector::isDone", XS_Geo__Geos__Noding__SegmentIntersector_isDone); |
|
12701
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::new", XS_Geo__Geos__Noding__SegmentIntersectionDetector_new); |
|
12702
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::hasIntersection", XS_Geo__Geos__Noding__SegmentIntersectionDetector_hasIntersection); |
|
12703
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::hasProperIntersection", XS_Geo__Geos__Noding__SegmentIntersectionDetector_hasProperIntersection); |
|
12704
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::hasNonProperIntersection", XS_Geo__Geos__Noding__SegmentIntersectionDetector_hasNonProperIntersection); |
|
12705
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::setFindProper", XS_Geo__Geos__Noding__SegmentIntersectionDetector_setFindProper); |
|
12706
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::setFindAllIntersectionTypes", XS_Geo__Geos__Noding__SegmentIntersectionDetector_setFindAllIntersectionTypes); |
|
12707
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::getIntersectionSegments", XS_Geo__Geos__Noding__SegmentIntersectionDetector_getIntersectionSegments); |
|
12708
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::getIntersection", XS_Geo__Geos__Noding__SegmentIntersectionDetector_getIntersection); |
|
12709
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::CLONE_SKIP", XS_Geo__Geos__Noding__SegmentIntersectionDetector_CLONE_SKIP); |
|
12710
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SingleInteriorIntersectionFinder::new", XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_new); |
|
12711
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SingleInteriorIntersectionFinder::hasIntersection", XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_hasIntersection); |
|
12712
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SingleInteriorIntersectionFinder::getInteriorIntersection", XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_getInteriorIntersection); |
|
12713
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SingleInteriorIntersectionFinder::getIntersectionSegments", XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_getIntersectionSegments); |
|
12714
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SingleInteriorIntersectionFinder::CLONE_SKIP", XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_CLONE_SKIP); |
|
12715
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::new", XS_Geo__Geos__Noding__IntersectionAdder_new); |
|
12716
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::getLineIntersector", XS_Geo__Geos__Noding__IntersectionAdder_getLineIntersector); |
|
12717
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::hasIntersection", XS_Geo__Geos__Noding__IntersectionAdder_hasIntersection); |
|
12718
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::hasProperIntersection", XS_Geo__Geos__Noding__IntersectionAdder_hasProperIntersection); |
|
12719
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::hasProperInteriorIntersection", XS_Geo__Geos__Noding__IntersectionAdder_hasProperInteriorIntersection); |
|
12720
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::hasInteriorIntersection", XS_Geo__Geos__Noding__IntersectionAdder_hasInteriorIntersection); |
|
12721
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::CLONE_SKIP", XS_Geo__Geos__Noding__IntersectionAdder_CLONE_SKIP); |
|
12722
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionFinderAdder::new", XS_Geo__Geos__Noding__IntersectionFinderAdder_new); |
|
12723
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionFinderAdder::getInteriorIntersections", XS_Geo__Geos__Noding__IntersectionFinderAdder_getInteriorIntersections); |
|
12724
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionFinderAdder::CLONE_SKIP", XS_Geo__Geos__Noding__IntersectionFinderAdder_CLONE_SKIP); |
|
12725
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::Noder::computeNodes", XS_Geo__Geos__Noding__Noder_computeNodes); |
|
12726
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::Noder::getNodedSubstrings", XS_Geo__Geos__Noding__Noder_getNodedSubstrings); |
|
12727
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IteratedNoder::new", XS_Geo__Geos__Noding__IteratedNoder_new); |
|
12728
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IteratedNoder::setMaximumIterations", XS_Geo__Geos__Noding__IteratedNoder_setMaximumIterations); |
|
12729
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IteratedNoder::CLONE_SKIP", XS_Geo__Geos__Noding__IteratedNoder_CLONE_SKIP); |
|
12730
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::ScaledNoder::new", XS_Geo__Geos__Noding__ScaledNoder_new); |
|
12731
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::ScaledNoder::isIntegerPrecision", XS_Geo__Geos__Noding__ScaledNoder_isIntegerPrecision); |
|
12732
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::ScaledNoder::CLONE_SKIP", XS_Geo__Geos__Noding__ScaledNoder_CLONE_SKIP); |
|
12733
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SinglePassNoder::setSegmentIntersector", XS_Geo__Geos__Noding__SinglePassNoder_setSegmentIntersector); |
|
12734
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SinglePassNoder::CLONE_SKIP", XS_Geo__Geos__Noding__SinglePassNoder_CLONE_SKIP); |
|
12735
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SimpleNoder::new", XS_Geo__Geos__Noding__SimpleNoder_new); |
|
12736
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SimpleNoder::CLONE_SKIP", XS_Geo__Geos__Noding__SimpleNoder_CLONE_SKIP); |
|
12737
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SimpleSnapRounder::new", XS_Geo__Geos__Noding__SimpleSnapRounder_new); |
|
12738
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SimpleSnapRounder::computeVertexSnaps", XS_Geo__Geos__Noding__SimpleSnapRounder_computeVertexSnaps); |
|
12739
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SimpleSnapRounder::CLONE_SKIP", XS_Geo__Geos__Noding__SimpleSnapRounder_CLONE_SKIP); |
|
12740
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::new", XS_Geo__Geos__Index__MonotoneChain_new); |
|
12741
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getChains", XS_Geo__Geos__Index__MonotoneChain_getChains); |
|
12742
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getEnvelope", XS_Geo__Geos__Index__MonotoneChain_getEnvelope); |
|
12743
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getStartIndex", XS_Geo__Geos__Index__MonotoneChain_getStartIndex); |
|
12744
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getEndIndex", XS_Geo__Geos__Index__MonotoneChain_getEndIndex); |
|
12745
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getLineSegment", XS_Geo__Geos__Index__MonotoneChain_getLineSegment); |
|
12746
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getCoordinates", XS_Geo__Geos__Index__MonotoneChain_getCoordinates); |
|
12747
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::computeOverlaps", XS_Geo__Geos__Index__MonotoneChain_computeOverlaps); |
|
12748
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::setId", XS_Geo__Geos__Index__MonotoneChain_setId); |
|
12749
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getId", XS_Geo__Geos__Index__MonotoneChain_getId); |
|
12750
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChainOverlapAction::new", XS_Geo__Geos__Index__MonotoneChainOverlapAction_new); |
|
12751
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChainOverlapAction::overlap", XS_Geo__Geos__Index__MonotoneChainOverlapAction_overlap); |
|
12752
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Index::MonotoneChainOverlapAction::tempEnv1", XS_Geo__Geos__Index__MonotoneChainOverlapAction_tempEnv1); |
|
12753
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
|
12754
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Index::MonotoneChainOverlapAction::tempEnv2", XS_Geo__Geos__Index__MonotoneChainOverlapAction_tempEnv1); |
|
12755
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
|
12756
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::SpatialIndex::query", XS_Geo__Geos__Index__SpatialIndex_query); |
|
12757
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::SpatialIndex::insert", XS_Geo__Geos__Index__SpatialIndex_insert); |
|
12758
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::SpatialIndex::remove", XS_Geo__Geos__Index__SpatialIndex_remove); |
|
12759
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::Quadtree::new", XS_Geo__Geos__Index__Quadtree_new); |
|
12760
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::Quadtree::depth", XS_Geo__Geos__Index__Quadtree_depth); |
|
12761
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::Quadtree::size", XS_Geo__Geos__Index__Quadtree_size); |
|
12762
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::Quadtree::queryAll", XS_Geo__Geos__Index__Quadtree_queryAll); |
|
12763
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::Quadtree::toString", XS_Geo__Geos__Index__Quadtree_toString); |
|
12764
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::STRtree::new", XS_Geo__Geos__Index__STRtree_new); |
|
12765
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::signExpBits", XS_Geo__Geos__Precision_signExpBits); |
|
12766
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::numCommonMostSigMantissaBits", XS_Geo__Geos__Precision_numCommonMostSigMantissaBits); |
|
12767
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::zeroLowerBits", XS_Geo__Geos__Precision_zeroLowerBits); |
|
12768
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::getBit", XS_Geo__Geos__Precision_getBit); |
|
12769
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::commonIntersection", XS_Geo__Geos__Precision_commonIntersection); |
|
12770
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::commonUnion", XS_Geo__Geos__Precision_commonUnion); |
|
12771
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::commonDifference", XS_Geo__Geos__Precision_commonDifference); |
|
12772
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::commonSymDifference", XS_Geo__Geos__Precision_commonSymDifference); |
|
12773
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::commonBuffer", XS_Geo__Geos__Precision_commonBuffer); |
|
12774
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::enhancedIntersection", XS_Geo__Geos__Precision_enhancedIntersection); |
|
12775
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::enhancedUnion", XS_Geo__Geos__Precision_enhancedUnion); |
|
12776
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::enhancedDifference", XS_Geo__Geos__Precision_enhancedDifference); |
|
12777
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::enhancedSymDifference", XS_Geo__Geos__Precision_enhancedSymDifference); |
|
12778
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::enhancedBuffer", XS_Geo__Geos__Precision_enhancedBuffer); |
|
12779
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Precision::addCommonBits", XS_Geo__Geos__Precision_removeCommonBits); |
|
12780
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
|
12781
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Precision::removeCommonBits", XS_Geo__Geos__Precision_removeCommonBits); |
|
12782
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
|
12783
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::GeometryPrecisionReducer::new", XS_Geo__Geos__Precision__GeometryPrecisionReducer_new); |
|
12784
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::GeometryPrecisionReducer::setRemoveCollapsedComponents", XS_Geo__Geos__Precision__GeometryPrecisionReducer_setRemoveCollapsedComponents); |
|
12785
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::GeometryPrecisionReducer::setPointwise", XS_Geo__Geos__Precision__GeometryPrecisionReducer_setPointwise); |
|
12786
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::GeometryPrecisionReducer::reduce", XS_Geo__Geos__Precision__GeometryPrecisionReducer_reduce); |
|
12787
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::GeometryPrecisionReducer::CLONE_SKIP", XS_Geo__Geos__Precision__GeometryPrecisionReducer_CLONE_SKIP); |
|
12788
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::SimpleGeometryPrecisionReducer::new", XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_new); |
|
12789
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::SimpleGeometryPrecisionReducer::getPrecisionModel", XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_getPrecisionModel); |
|
12790
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::SimpleGeometryPrecisionReducer::setRemoveCollapsedComponents", XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_setRemoveCollapsedComponents); |
|
12791
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::SimpleGeometryPrecisionReducer::getRemoveCollapsed", XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_getRemoveCollapsed); |
|
12792
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::SimpleGeometryPrecisionReducer::reduce", XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_reduce); |
|
12793
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::SimpleGeometryPrecisionReducer::CLONE_SKIP", XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_CLONE_SKIP); |
|
12794
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::buffer", XS_Geo__Geos__Operation_buffer); |
|
12795
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::distance", XS_Geo__Geos__Operation_distance); |
|
12796
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::nearestPoints", XS_Geo__Geos__Operation_nearestPoints); |
|
12797
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::closestPoints", XS_Geo__Geos__Operation_closestPoints); |
|
12798
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::overlayOp", XS_Geo__Geos__Operation_overlayOp); |
|
12799
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::isValid", XS_Geo__Geos__Operation_isValid); |
|
12800
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::relate", XS_Geo__Geos__Operation_relate); |
|
12801
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::mergeLines", XS_Geo__Geos__Operation_mergeLines); |
|
12802
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::isSequenced", XS_Geo__Geos__Operation_isSequenced); |
|
12803
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::sequence", XS_Geo__Geos__Operation_sequence); |
|
12804
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangulate::DelaunayTriangulationBuilder::new", XS_Geo__Geos__Triangulate__DelaunayTriangulationBuilder_new); |
|
12805
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangulate::DelaunayTriangulationBuilder::getEdges", XS_Geo__Geos__Triangulate__DelaunayTriangulationBuilder_getEdges); |
|
12806
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangulate::DelaunayTriangulationBuilder::getTriangles", XS_Geo__Geos__Triangulate__DelaunayTriangulationBuilder_getTriangles); |
|
12807
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangulate::VoronoiDiagramBuilder::new", XS_Geo__Geos__Triangulate__VoronoiDiagramBuilder_new); |
|
12808
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangulate::VoronoiDiagramBuilder::getDiagramEdges", XS_Geo__Geos__Triangulate__VoronoiDiagramBuilder_getDiagramEdges); |
|
12809
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangulate::VoronoiDiagramBuilder::getDiagram", XS_Geo__Geos__Triangulate__VoronoiDiagramBuilder_getDiagram); |
|
12810
|
|
|
|
|
|
|
|
|
12811
|
|
|
|
|
|
|
/* Initialisation Section */ |
|
12812
|
|
|
|
|
|
|
|
|
12813
|
|
|
|
|
|
|
#line 14 "./xsi/Dimension.xsi" |
|
12814
|
|
|
|
|
|
|
{ |
|
12815
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::Dimension"); |
|
12816
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
|
12817
|
|
|
|
|
|
|
{"TYPE_DONTCARE", Dimension::DimensionType::DONTCARE}, |
|
12818
|
|
|
|
|
|
|
{"TYPE_True", Dimension::DimensionType::True}, |
|
12819
|
|
|
|
|
|
|
{"TYPE_False", Dimension::DimensionType::False}, |
|
12820
|
|
|
|
|
|
|
{"TYPE_P", Dimension::DimensionType::P}, |
|
12821
|
|
|
|
|
|
|
{"TYPE_L", Dimension::DimensionType::L}, |
|
12822
|
|
|
|
|
|
|
{"TYPE_A", Dimension::DimensionType::A} |
|
12823
|
|
|
|
|
|
|
}); |
|
12824
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
|
12825
|
|
|
|
|
|
|
} |
|
12826
|
|
|
|
|
|
|
|
|
12827
|
|
|
|
|
|
|
#line 42 "./xsi/PrecisionModel.xsi" |
|
12828
|
|
|
|
|
|
|
{ |
|
12829
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::PrecisionModel"); |
|
12830
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
|
12831
|
|
|
|
|
|
|
{"TYPE_FIXED", PrecisionModel::Type::FIXED}, |
|
12832
|
|
|
|
|
|
|
{"TYPE_FLOATING", PrecisionModel::Type::FLOATING}, |
|
12833
|
|
|
|
|
|
|
{"TYPE_FLOATING_SINGLE", PrecisionModel::Type::FLOATING_SINGLE} |
|
12834
|
|
|
|
|
|
|
}); |
|
12835
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
|
12836
|
|
|
|
|
|
|
} |
|
12837
|
|
|
|
|
|
|
|
|
12838
|
|
|
|
|
|
|
#line 42 "./xsi/Triangle.xsi" |
|
12839
|
|
|
|
|
|
|
{ |
|
12840
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::Triangle")); |
|
12841
|
|
|
|
|
|
|
} |
|
12842
|
|
|
|
|
|
|
|
|
12843
|
|
|
|
|
|
|
#line 123 "./xsi/GeometryFactory.xsi" |
|
12844
|
|
|
|
|
|
|
{ |
|
12845
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::GeometryFactory")); |
|
12846
|
|
|
|
|
|
|
} |
|
12847
|
|
|
|
|
|
|
|
|
12848
|
|
|
|
|
|
|
#line 139 "./xsi/Geometry.xsi" |
|
12849
|
|
|
|
|
|
|
{ |
|
12850
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::Geometry"); |
|
12851
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
|
12852
|
|
|
|
|
|
|
{"TYPE_GEOS_POINT", GeometryTypeId::GEOS_POINT}, |
|
12853
|
|
|
|
|
|
|
{"TYPE_GEOS_LINESTRING", GeometryTypeId::GEOS_LINESTRING}, |
|
12854
|
|
|
|
|
|
|
{"TYPE_GEOS_LINEARRING", GeometryTypeId::GEOS_LINEARRING}, |
|
12855
|
|
|
|
|
|
|
{"TYPE_GEOS_POLYGON", GeometryTypeId::GEOS_POLYGON}, |
|
12856
|
|
|
|
|
|
|
{"TYPE_GEOS_MULTIPOINT", GeometryTypeId::GEOS_MULTIPOINT}, |
|
12857
|
|
|
|
|
|
|
{"TYPE_GEOS_MULTILINESTRING", GeometryTypeId::GEOS_MULTILINESTRING}, |
|
12858
|
|
|
|
|
|
|
{"TYPE_GEOS_MULTIPOLYGON", GeometryTypeId::GEOS_MULTIPOLYGON}, |
|
12859
|
|
|
|
|
|
|
{"TYPE_GEOS_GEOMETRYCOLLECTION", GeometryTypeId::GEOS_GEOMETRYCOLLECTION}, |
|
12860
|
|
|
|
|
|
|
|
|
12861
|
|
|
|
|
|
|
{"TYPE_CAP_ROUND", geos::operation::buffer::BufferParameters::CAP_ROUND}, |
|
12862
|
|
|
|
|
|
|
{"TYPE_CAP_FLAT", geos::operation::buffer::BufferParameters::CAP_FLAT}, |
|
12863
|
|
|
|
|
|
|
{"TYPE_CAP_SQUARE", geos::operation::buffer::BufferParameters::CAP_SQUARE} |
|
12864
|
|
|
|
|
|
|
}); |
|
12865
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
|
12866
|
|
|
|
|
|
|
|
|
12867
|
|
|
|
|
|
|
Stash("Geo::Geos::GeometryCollection").inherit("Geo::Geos::Geometry"); |
|
12868
|
|
|
|
|
|
|
|
|
12869
|
|
|
|
|
|
|
Stash("Geo::Geos::Puntal", GV_ADD).mark_as_loaded("Geo::Geos"); |
|
12870
|
|
|
|
|
|
|
Stash("Geo::Geos::Puntal").inherit("Geo::Geos::Geometry"); |
|
12871
|
|
|
|
|
|
|
|
|
12872
|
|
|
|
|
|
|
Stash("Geo::Geos::Lineal", GV_ADD).mark_as_loaded("Geo::Geos"); |
|
12873
|
|
|
|
|
|
|
Stash("Geo::Geos::Lineal").inherit("Geo::Geos::Geometry"); |
|
12874
|
|
|
|
|
|
|
|
|
12875
|
|
|
|
|
|
|
Stash("Geo::Geos::Polygonal", GV_ADD).mark_as_loaded("Geo::Geos"); |
|
12876
|
|
|
|
|
|
|
Stash("Geo::Geos::Polygonal").inherit("Geo::Geos::Geometry"); |
|
12877
|
|
|
|
|
|
|
} |
|
12878
|
|
|
|
|
|
|
|
|
12879
|
|
|
|
|
|
|
#line 6 "./xsi/GeometryCollection.xsi" |
|
12880
|
|
|
|
|
|
|
{ |
|
12881
|
|
|
|
|
|
|
Stash("Geo::Geos::GeometryCollection").inherit("Geo::Geos::Geometry"); |
|
12882
|
|
|
|
|
|
|
} |
|
12883
|
|
|
|
|
|
|
|
|
12884
|
|
|
|
|
|
|
#line 10 "./xsi/Point.xsi" |
|
12885
|
|
|
|
|
|
|
{ |
|
12886
|
|
|
|
|
|
|
Stash("Geo::Geos::Point").inherit("Geo::Geos::Puntal"); |
|
12887
|
|
|
|
|
|
|
} |
|
12888
|
|
|
|
|
|
|
|
|
12889
|
|
|
|
|
|
|
#line 6 "./xsi/MultiPoint.xsi" |
|
12890
|
|
|
|
|
|
|
{ |
|
12891
|
|
|
|
|
|
|
Stash("Geo::Geos::MultiPoint").inherit("Geo::Geos::Puntal"); |
|
12892
|
|
|
|
|
|
|
Stash("Geo::Geos::MultiPoint").inherit("Geo::Geos::GeometryCollection"); |
|
12893
|
|
|
|
|
|
|
} |
|
12894
|
|
|
|
|
|
|
|
|
12895
|
|
|
|
|
|
|
#line 14 "./xsi/LineString.xsi" |
|
12896
|
|
|
|
|
|
|
{ |
|
12897
|
|
|
|
|
|
|
Stash("Geo::Geos::LineString").inherit("Geo::Geos::Lineal"); |
|
12898
|
|
|
|
|
|
|
} |
|
12899
|
|
|
|
|
|
|
|
|
12900
|
|
|
|
|
|
|
#line 6 "./xsi/MultiLineString.xsi" |
|
12901
|
|
|
|
|
|
|
{ |
|
12902
|
|
|
|
|
|
|
Stash("Geo::Geos::MultiLineString").inherit("Geo::Geos::Lineal"); |
|
12903
|
|
|
|
|
|
|
Stash("Geo::Geos::MultiLineString").inherit("Geo::Geos::GeometryCollection"); |
|
12904
|
|
|
|
|
|
|
} |
|
12905
|
|
|
|
|
|
|
|
|
12906
|
|
|
|
|
|
|
#line 6 "./xsi/LinearRing.xsi" |
|
12907
|
|
|
|
|
|
|
{ |
|
12908
|
|
|
|
|
|
|
Stash("Geo::Geos::LinearRing").inherit("Geo::Geos::LineString"); |
|
12909
|
|
|
|
|
|
|
} |
|
12910
|
|
|
|
|
|
|
|
|
12911
|
|
|
|
|
|
|
#line 23 "./xsi/Polygon.xsi" |
|
12912
|
|
|
|
|
|
|
{ |
|
12913
|
|
|
|
|
|
|
Stash("Geo::Geos::Polygon").inherit("Geo::Geos::Polygonal"); |
|
12914
|
|
|
|
|
|
|
} |
|
12915
|
|
|
|
|
|
|
|
|
12916
|
|
|
|
|
|
|
#line 6 "./xsi/MultiPolygon.xsi" |
|
12917
|
|
|
|
|
|
|
{ |
|
12918
|
|
|
|
|
|
|
Stash("Geo::Geos::MultiPolygon").inherit("Geo::Geos::Polygonal"); |
|
12919
|
|
|
|
|
|
|
Stash("Geo::Geos::MultiPolygon").inherit("Geo::Geos::GeometryCollection"); |
|
12920
|
|
|
|
|
|
|
} |
|
12921
|
|
|
|
|
|
|
|
|
12922
|
|
|
|
|
|
|
#line 6 "./xsi/WKBConstants.xsi" |
|
12923
|
|
|
|
|
|
|
{ |
|
12924
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::WKBConstants"); |
|
12925
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
|
12926
|
|
|
|
|
|
|
//{"TYPE_BYTEORDER_BE", WKBConstants::wkbXDR}, |
|
12927
|
|
|
|
|
|
|
//{"TYPE_BYTEORDER_LE", WKBConstants::wkbNDR}, |
|
12928
|
|
|
|
|
|
|
{"TYPE_BYTEORDER_BE", 0}, |
|
12929
|
|
|
|
|
|
|
{"TYPE_BYTEORDER_LE", 1}, |
|
12930
|
|
|
|
|
|
|
|
|
12931
|
|
|
|
|
|
|
{"TYPE_WKB_POINT", WKBConstants::wkbPoint}, |
|
12932
|
|
|
|
|
|
|
{"TYPE_WKB_LINESTRING", WKBConstants::wkbLineString}, |
|
12933
|
|
|
|
|
|
|
{"TYPE_WKB_POLYGON", WKBConstants::wkbPolygon}, |
|
12934
|
|
|
|
|
|
|
{"TYPE_WKB_MULTIPOINT", WKBConstants::wkbMultiPoint}, |
|
12935
|
|
|
|
|
|
|
{"TYPE_WKB_MULTILINESTRING", WKBConstants::wkbMultiLineString}, |
|
12936
|
|
|
|
|
|
|
{"TYPE_WKB_MULTIPOLYGON", WKBConstants::wkbMultiPolygon}, |
|
12937
|
|
|
|
|
|
|
{"TYPE_WKB_GEOMETRYCOLLECTION", WKBConstants::wkbGeometryCollection} |
|
12938
|
|
|
|
|
|
|
}); |
|
12939
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
|
12940
|
|
|
|
|
|
|
} |
|
12941
|
|
|
|
|
|
|
|
|
12942
|
|
|
|
|
|
|
#line 202 "./xsi/algorithm.xsi" |
|
12943
|
|
|
|
|
|
|
{ |
|
12944
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::Algorithm"); |
|
12945
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
|
12946
|
|
|
|
|
|
|
{"TYPE_TURN_CLOCKWISE", CGAlgorithms::CLOCKWISE}, |
|
12947
|
|
|
|
|
|
|
{"TYPE_TURN_COLLINEAR", CGAlgorithms::COLLINEAR}, |
|
12948
|
|
|
|
|
|
|
{"TYPE_TURN_COUNTERCLOCKWISE", CGAlgorithms::COUNTERCLOCKWISE}, |
|
12949
|
|
|
|
|
|
|
|
|
12950
|
|
|
|
|
|
|
{"TYPE_ORIENT_RIGHT", CGAlgorithms::RIGHT}, |
|
12951
|
|
|
|
|
|
|
{"TYPE_ORIENT_LEFT" , CGAlgorithms::LEFT}, |
|
12952
|
|
|
|
|
|
|
{"TYPE_ORIENT_STRAIGHT", CGAlgorithms::STRAIGHT} |
|
12953
|
|
|
|
|
|
|
}); |
|
12954
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
|
12955
|
|
|
|
|
|
|
} |
|
12956
|
|
|
|
|
|
|
|
|
12957
|
|
|
|
|
|
|
#line 73 "./xsi/algorithm/HCoordinate.xsi" |
|
12958
|
|
|
|
|
|
|
{ |
|
12959
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::Algorithm::HCoordinate")); |
|
12960
|
|
|
|
|
|
|
} |
|
12961
|
|
|
|
|
|
|
|
|
12962
|
|
|
|
|
|
|
#line 46 "./xsi/algorithm/MinimumDiameter.xsi" |
|
12963
|
|
|
|
|
|
|
{ |
|
12964
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::Algorithm::MinimumDiameter")); |
|
12965
|
|
|
|
|
|
|
} |
|
12966
|
|
|
|
|
|
|
|
|
12967
|
|
|
|
|
|
|
#line 70 "./xsi/algorithm/LineIntersector.xsi" |
|
12968
|
|
|
|
|
|
|
{ |
|
12969
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::Algorithm::LineIntersector"); |
|
12970
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
|
12971
|
|
|
|
|
|
|
{"TYPE_NO_INTERSECTION", LineIntersector::NO_INTERSECTION}, |
|
12972
|
|
|
|
|
|
|
{"TYPE_POINT_INTERSECTION", LineIntersector::POINT_INTERSECTION}, |
|
12973
|
|
|
|
|
|
|
{"TYPE_COLLINEAR_INTERSECTION", LineIntersector::COLLINEAR_INTERSECTION} |
|
12974
|
|
|
|
|
|
|
}); |
|
12975
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
|
12976
|
|
|
|
|
|
|
} |
|
12977
|
|
|
|
|
|
|
|
|
12978
|
|
|
|
|
|
|
#line 88 "./xsi/noding.xsi" |
|
12979
|
|
|
|
|
|
|
{ |
|
12980
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::Noding")); |
|
12981
|
|
|
|
|
|
|
} |
|
12982
|
|
|
|
|
|
|
|
|
12983
|
|
|
|
|
|
|
#line 39 "./xsi/noding/NodedSegmentString.xsi" |
|
12984
|
|
|
|
|
|
|
{ |
|
12985
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::NodedSegmentString").inherit("Geo::Geos::Noding::SegmentString"); |
|
12986
|
|
|
|
|
|
|
} |
|
12987
|
|
|
|
|
|
|
|
|
12988
|
|
|
|
|
|
|
#line 19 "./xsi/noding/BasicSegmentString.xsi" |
|
12989
|
|
|
|
|
|
|
{ |
|
12990
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::BasicSegmentString").inherit("Geo::Geos::Noding::SegmentString"); |
|
12991
|
|
|
|
|
|
|
} |
|
12992
|
|
|
|
|
|
|
|
|
12993
|
|
|
|
|
|
|
#line 35 "./xsi/noding/SegmentIntersectionDetector.xsi" |
|
12994
|
|
|
|
|
|
|
{ |
|
12995
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::SegmentIntersectionDetector").inherit("Geo::Geos::Noding::SegmentIntersector"); |
|
12996
|
|
|
|
|
|
|
} |
|
12997
|
|
|
|
|
|
|
|
|
12998
|
|
|
|
|
|
|
#line 31 "./xsi/noding/SingleInteriorIntersectionFinder.xsi" |
|
12999
|
|
|
|
|
|
|
{ |
|
13000
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::SingleInteriorIntersectionFinder").inherit("Geo::Geos::Noding::SegmentIntersector"); |
|
13001
|
|
|
|
|
|
|
} |
|
13002
|
|
|
|
|
|
|
|
|
13003
|
|
|
|
|
|
|
#line 28 "./xsi/noding/IntersectionAdder.xsi" |
|
13004
|
|
|
|
|
|
|
{ |
|
13005
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::IntersectionAdder").inherit("Geo::Geos::Noding::SegmentIntersector"); |
|
13006
|
|
|
|
|
|
|
} |
|
13007
|
|
|
|
|
|
|
|
|
13008
|
|
|
|
|
|
|
#line 36 "./xsi/noding/IntersectionFinderAdder.xsi" |
|
13009
|
|
|
|
|
|
|
{ |
|
13010
|
|
|
|
|
|
|
payload_marker_IntersectionFinderAdder.svt_free = payload_marker_IntersectionFinderAdder_free; |
|
13011
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::IntersectionFinderAdder").inherit("Geo::Geos::Noding::SegmentIntersector"); |
|
13012
|
|
|
|
|
|
|
} |
|
13013
|
|
|
|
|
|
|
|
|
13014
|
|
|
|
|
|
|
#line 37 "./xsi/noding/Noder.xsi" |
|
13015
|
|
|
|
|
|
|
{ |
|
13016
|
|
|
|
|
|
|
payload_marker_Noder.svt_free = payload_marker_Noder_free; |
|
13017
|
|
|
|
|
|
|
} |
|
13018
|
|
|
|
|
|
|
|
|
13019
|
|
|
|
|
|
|
#line 15 "./xsi/noding/IteratedNoder.xsi" |
|
13020
|
|
|
|
|
|
|
{ |
|
13021
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::IteratedNoder").inherit("Geo::Geos::Noding::Noder"); |
|
13022
|
|
|
|
|
|
|
} |
|
13023
|
|
|
|
|
|
|
|
|
13024
|
|
|
|
|
|
|
#line 15 "./xsi/noding/ScaledNoder.xsi" |
|
13025
|
|
|
|
|
|
|
{ |
|
13026
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::ScaledNoder").inherit("Geo::Geos::Noding::Noder"); |
|
13027
|
|
|
|
|
|
|
} |
|
13028
|
|
|
|
|
|
|
|
|
13029
|
|
|
|
|
|
|
#line 21 "./xsi/noding/SinglePassNoder.xsi" |
|
13030
|
|
|
|
|
|
|
{ |
|
13031
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::SinglePassNoder").inherit("Geo::Geos::Noding::Noder"); |
|
13032
|
|
|
|
|
|
|
} |
|
13033
|
|
|
|
|
|
|
|
|
13034
|
|
|
|
|
|
|
#line 16 "./xsi/noding/SimpleNoder.xsi" |
|
13035
|
|
|
|
|
|
|
{ |
|
13036
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::SimpleNoder").inherit("Geo::Geos::Noding::SinglePassNoder"); |
|
13037
|
|
|
|
|
|
|
} |
|
13038
|
|
|
|
|
|
|
|
|
13039
|
|
|
|
|
|
|
#line 25 "./xsi/noding/SimpleSnapRounder.xsi" |
|
13040
|
|
|
|
|
|
|
{ |
|
13041
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::SimpleSnapRounder").inherit("Geo::Geos::Noding::Noder"); |
|
13042
|
|
|
|
|
|
|
} |
|
13043
|
|
|
|
|
|
|
|
|
13044
|
|
|
|
|
|
|
#line 55 "./xsi/index/MonotoneChain.xsi" |
|
13045
|
|
|
|
|
|
|
{ |
|
13046
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::Index::MonotoneChain")); |
|
13047
|
|
|
|
|
|
|
payload_marker_MonotoneChain.svt_free = payload_marker_MonotoneChain_free; |
|
13048
|
|
|
|
|
|
|
} |
|
13049
|
|
|
|
|
|
|
|
|
13050
|
|
|
|
|
|
|
#line 43 "./xsi/index/SpatialIndex.xsi" |
|
13051
|
|
|
|
|
|
|
{ |
|
13052
|
|
|
|
|
|
|
payload_marker_SVs_map.svt_free = payload_marker_SVs_map_free; |
|
13053
|
|
|
|
|
|
|
} |
|
13054
|
|
|
|
|
|
|
|
|
13055
|
|
|
|
|
|
|
#line 27 "./xsi/index/Quadtree.xsi" |
|
13056
|
|
|
|
|
|
|
{ |
|
13057
|
|
|
|
|
|
|
Stash("Geo::Geos::Index::Quadtree").inherit("Geo::Geos::Index::SpatialIndex"); |
|
13058
|
|
|
|
|
|
|
} |
|
13059
|
|
|
|
|
|
|
|
|
13060
|
|
|
|
|
|
|
#line 12 "./xsi/index/STRtree.xsi" |
|
13061
|
|
|
|
|
|
|
{ |
|
13062
|
|
|
|
|
|
|
Stash("Geo::Geos::Index::STRtree").inherit("Geo::Geos::Index::SpatialIndex"); |
|
13063
|
|
|
|
|
|
|
} |
|
13064
|
|
|
|
|
|
|
|
|
13065
|
|
|
|
|
|
|
#line 73 "./xsi/precision.xsi" |
|
13066
|
|
|
|
|
|
|
{ |
|
13067
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::Precision")); |
|
13068
|
|
|
|
|
|
|
} |
|
13069
|
|
|
|
|
|
|
|
|
13070
|
|
|
|
|
|
|
#line 95 "./xsi/operation.xsi" |
|
13071
|
|
|
|
|
|
|
{ |
|
13072
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::Operation"); |
|
13073
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
|
13074
|
|
|
|
|
|
|
{"TYPE_OP_INTERSECTION", OverlayOp::OpCode::opINTERSECTION}, |
|
13075
|
|
|
|
|
|
|
{"TYPE_OP_UNION", OverlayOp::OpCode::opUNION}, |
|
13076
|
|
|
|
|
|
|
{"TYPE_OP_DIFFERENCE", OverlayOp::OpCode::opDIFFERENCE}, |
|
13077
|
|
|
|
|
|
|
{"TYPE_OP_SYMDIFFERENCE", OverlayOp::OpCode::opSYMDIFFERENCE}, |
|
13078
|
|
|
|
|
|
|
|
|
13079
|
|
|
|
|
|
|
{"TYPE_BOUNDARY_NODE_RULE_MOD2", 0}, |
|
13080
|
|
|
|
|
|
|
{"TYPE_BOUNDARY_ENDPOINT", 1}, |
|
13081
|
|
|
|
|
|
|
{"TYPE_BOUNDARY_MULTIVALENT_ENDPOINT", 2}, |
|
13082
|
|
|
|
|
|
|
{"TYPE_BOUNDARY_MONOVALENT_ENDPOINT", 3}, |
|
13083
|
|
|
|
|
|
|
{"TYPE_BOUNDARY_OGCSFS", 4} |
|
13084
|
|
|
|
|
|
|
}); |
|
13085
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
|
13086
|
|
|
|
|
|
|
} |
|
13087
|
|
|
|
|
|
|
|
|
13088
|
|
|
|
|
|
|
#line 13089 "Geos.xs.cc" |
|
13089
|
|
|
|
|
|
|
|
|
13090
|
|
|
|
|
|
|
/* End of Initialisation Section */ |
|
13091
|
|
|
|
|
|
|
|
|
13092
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
13093
|
|
|
|
|
|
|
# if PERL_VERSION_GE(5, 9, 0) |
|
13094
|
|
|
|
|
|
|
if (PL_unitcheckav) |
|
13095
|
|
|
|
|
|
|
call_list(PL_scopestack_ix, PL_unitcheckav); |
|
13096
|
|
|
|
|
|
|
# endif |
|
13097
|
|
|
|
|
|
|
XSRETURN_YES; |
|
13098
|
|
|
|
|
|
|
#else |
|
13099
|
46
|
|
|
|
|
|
Perl_xs_boot_epilog(aTHX_ ax); |
|
13100
|
|
|
|
|
|
|
#endif |
|
13101
|
276
|
50
|
|
|
|
|
}); } |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
13102
|
|
|
|
|
|
|
|