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/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(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_xsgen.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_xsgen.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(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_xsgen.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(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_xsgen.cc" |
344
|
|
|
|
|
|
|
{ |
345
|
|
|
|
|
|
|
SV * RETVALSV; |
346
|
316
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
443
|
|
|
|
|
|
|
; |
444
|
10
|
50
|
|
|
|
|
Coordinate& other = xs::in(ST(1)); |
445
|
|
|
|
|
|
|
; |
446
|
|
|
|
|
|
|
#line 31 "./xsi/Coordinate.xsi" |
447
|
|
|
|
|
|
|
RETVAL = THIS->equals(other); |
448
|
|
|
|
|
|
|
#line 449 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
464
|
|
|
|
|
|
|
; |
465
|
6
|
50
|
|
|
|
|
Coordinate& other = xs::in(ST(1)); |
466
|
|
|
|
|
|
|
; |
467
|
|
|
|
|
|
|
#line 33 "./xsi/Coordinate.xsi" |
468
|
|
|
|
|
|
|
RETVAL = THIS->equals2D(other); |
469
|
|
|
|
|
|
|
#line 470 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
485
|
|
|
|
|
|
|
; |
486
|
6
|
50
|
|
|
|
|
Coordinate& other = xs::in(ST(1)); |
487
|
|
|
|
|
|
|
; |
488
|
|
|
|
|
|
|
#line 35 "./xsi/Coordinate.xsi" |
489
|
|
|
|
|
|
|
RETVAL = THIS->equals3D(other); |
490
|
|
|
|
|
|
|
#line 491 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
507
|
|
|
|
|
|
|
; |
508
|
6
|
50
|
|
|
|
|
Coordinate& other = xs::in(ST(1)); |
509
|
|
|
|
|
|
|
; |
510
|
|
|
|
|
|
|
#line 37 "./xsi/Coordinate.xsi" |
511
|
|
|
|
|
|
|
RETVAL = THIS->compareTo(other); |
512
|
|
|
|
|
|
|
#line 513 "Geos_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
571
|
|
|
|
|
|
|
; |
572
|
6
|
50
|
|
|
|
|
Coordinate& other = xs::in(ST(1)); |
573
|
|
|
|
|
|
|
; |
574
|
|
|
|
|
|
|
#line 47 "./xsi/Coordinate.xsi" |
575
|
|
|
|
|
|
|
RETVAL = THIS->distance(other); |
576
|
|
|
|
|
|
|
#line 577 "Geos_xsgen.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(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(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_xsgen.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(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_xsgen.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(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_xsgen.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(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_xsgen.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(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_xsgen.cc" |
741
|
|
|
|
|
|
|
{ |
742
|
|
|
|
|
|
|
SV * RETVALSV; |
743
|
41
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.cc" |
1072
|
|
|
|
|
|
|
{ |
1073
|
|
|
|
|
|
|
SV * RETVALSV; |
1074
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.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(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1286
|
|
|
|
|
|
|
; |
1287
|
1
|
50
|
|
|
|
|
Envelope& other = xs::in(ST(1)); |
1288
|
|
|
|
|
|
|
; |
1289
|
|
|
|
|
|
|
#line 158 "./xsi/Envelope.xsi" |
1290
|
|
|
|
|
|
|
RETVAL = THIS->distance(&other); |
1291
|
|
|
|
|
|
|
#line 1292 "Geos_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1355
|
|
|
|
|
|
|
; |
1356
|
1
|
50
|
|
|
|
|
Envelope& other = xs::in(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_xsgen.cc" |
1364
|
|
|
|
|
|
|
{ |
1365
|
|
|
|
|
|
|
SV * RETVALSV; |
1366
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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_xsgen.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(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_xsgen.cc" |
1450
|
|
|
|
|
|
|
{ |
1451
|
|
|
|
|
|
|
SV * RETVALSV; |
1452
|
28
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1632
|
|
|
|
|
|
|
; |
1633
|
3
|
50
|
|
|
|
|
PrecisionModel& other = xs::in(ST(1)); |
1634
|
|
|
|
|
|
|
; |
1635
|
|
|
|
|
|
|
#line 40 "./xsi/PrecisionModel.xsi" |
1636
|
|
|
|
|
|
|
RETVAL = THIS->compareTo(&other); |
1637
|
|
|
|
|
|
|
#line 1638 "Geos_xsgen.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(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_xsgen.cc" |
1674
|
|
|
|
|
|
|
{ |
1675
|
|
|
|
|
|
|
SV * RETVALSV; |
1676
|
3
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1720
|
|
|
|
|
|
|
; |
1721
|
0
|
|
|
|
|
|
IntersectionMatrix& other = xs::in(ST(1)); |
1722
|
|
|
|
|
|
|
; |
1723
|
|
|
|
|
|
|
#line 14 "./xsi/IntersectionMatrix.xsi" |
1724
|
|
|
|
|
|
|
THIS->add(&other); |
1725
|
|
|
|
|
|
|
#line 1726 "Geos_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.cc" |
2120
|
|
|
|
|
|
|
PUTBACK; |
2121
|
|
|
|
|
|
|
return; |
2122
|
|
|
|
|
|
|
} |
2123
|
1
|
50
|
|
|
|
|
}); } |
2124
|
|
|
|
|
|
|
|
2125
|
|
|
|
|
|
|
|
2126
|
|
|
|
|
|
|
|
2127
|
40
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__IntersectionMatrix_toString) { xs::throw_guard(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(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_xsgen.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(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_xsgen.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(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(ST(1)); |
2178
|
|
|
|
|
|
|
; |
2179
|
1
|
50
|
|
|
|
|
Coordinate& p1 = xs::in(ST(2)); |
2180
|
|
|
|
|
|
|
; |
2181
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(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_xsgen.cc" |
2187
|
|
|
|
|
|
|
{ |
2188
|
|
|
|
|
|
|
SV * RETVALSV; |
2189
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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(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_xsgen.cc" |
2230
|
|
|
|
|
|
|
{ |
2231
|
|
|
|
|
|
|
SV * RETVALSV; |
2232
|
3
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
2257
|
|
|
|
|
|
|
{ |
2258
|
|
|
|
|
|
|
SV * RETVALSV; |
2259
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
2284
|
|
|
|
|
|
|
{ |
2285
|
|
|
|
|
|
|
SV * RETVALSV; |
2286
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(ST(0)); |
2305
|
|
|
|
|
|
|
; |
2306
|
3
|
50
|
|
|
|
|
Coordinate& b = xs::in(ST(1)); |
2307
|
|
|
|
|
|
|
; |
2308
|
3
|
50
|
|
|
|
|
Coordinate& c = xs::in(ST(2)); |
2309
|
|
|
|
|
|
|
; |
2310
|
3
|
50
|
|
|
|
|
Coordinate& p = xs::in(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_xsgen.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(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_xsgen.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(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_xsgen.cc" |
2407
|
|
|
|
|
|
|
{ |
2408
|
|
|
|
|
|
|
SV * RETVALSV; |
2409
|
17
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.cc" |
2620
|
|
|
|
|
|
|
{ |
2621
|
|
|
|
|
|
|
SV * RETVALSV; |
2622
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2671
|
|
|
|
|
|
|
; |
2672
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(ST(1)); |
2673
|
|
|
|
|
|
|
; |
2674
|
|
|
|
|
|
|
#line 75 "./xsi/LineSegment.xsi" |
2675
|
|
|
|
|
|
|
RETVAL = THIS->distancePerpendicular(p); |
2676
|
|
|
|
|
|
|
#line 2677 "Geos_xsgen.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(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(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_xsgen.cc" |
2701
|
|
|
|
|
|
|
{ |
2702
|
|
|
|
|
|
|
SV * RETVALSV; |
2703
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
2732
|
|
|
|
|
|
|
{ |
2733
|
|
|
|
|
|
|
SV * RETVALSV; |
2734
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2753
|
|
|
|
|
|
|
; |
2754
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(ST(1)); |
2755
|
|
|
|
|
|
|
; |
2756
|
|
|
|
|
|
|
#line 89 "./xsi/LineSegment.xsi" |
2757
|
|
|
|
|
|
|
RETVAL = THIS->projectionFactor(p); |
2758
|
|
|
|
|
|
|
#line 2759 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2775
|
|
|
|
|
|
|
; |
2776
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(ST(1)); |
2777
|
|
|
|
|
|
|
; |
2778
|
|
|
|
|
|
|
#line 91 "./xsi/LineSegment.xsi" |
2779
|
|
|
|
|
|
|
RETVAL = THIS->segmentFraction(p); |
2780
|
|
|
|
|
|
|
#line 2781 "Geos_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2833
|
|
|
|
|
|
|
; |
2834
|
1
|
50
|
|
|
|
|
Coordinate& p = xs::in(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_xsgen.cc" |
2842
|
|
|
|
|
|
|
{ |
2843
|
|
|
|
|
|
|
SV * RETVALSV; |
2844
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2863
|
|
|
|
|
|
|
; |
2864
|
1
|
50
|
|
|
|
|
LineSegment& other = xs::in(ST(1)); |
2865
|
|
|
|
|
|
|
; |
2866
|
|
|
|
|
|
|
#line 117 "./xsi/LineSegment.xsi" |
2867
|
|
|
|
|
|
|
RETVAL = THIS->compareTo(other); |
2868
|
|
|
|
|
|
|
#line 2869 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2884
|
|
|
|
|
|
|
; |
2885
|
1
|
50
|
|
|
|
|
LineSegment& other = xs::in(ST(1)); |
2886
|
|
|
|
|
|
|
; |
2887
|
|
|
|
|
|
|
#line 119 "./xsi/LineSegment.xsi" |
2888
|
|
|
|
|
|
|
RETVAL = THIS->equalsTopo(other); |
2889
|
|
|
|
|
|
|
#line 2890 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2905
|
|
|
|
|
|
|
; |
2906
|
1
|
50
|
|
|
|
|
LineSegment& line = xs::in(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2934
|
|
|
|
|
|
|
; |
2935
|
2
|
50
|
|
|
|
|
LineSegment& line = xs::in(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_xsgen.cc" |
2943
|
|
|
|
|
|
|
{ |
2944
|
|
|
|
|
|
|
SV * RETVALSV; |
2945
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2963
|
|
|
|
|
|
|
; |
2964
|
2
|
50
|
|
|
|
|
LineSegment& line = xs::in(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_xsgen.cc" |
2972
|
|
|
|
|
|
|
{ |
2973
|
|
|
|
|
|
|
SV * RETVALSV; |
2974
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2992
|
|
|
|
|
|
|
; |
2993
|
1
|
50
|
|
|
|
|
GeometryFactory& gf = xs::in(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_xsgen.cc" |
3000
|
|
|
|
|
|
|
{ |
3001
|
|
|
|
|
|
|
SV * RETVALSV; |
3002
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.cc" |
3065
|
|
|
|
|
|
|
{ |
3066
|
|
|
|
|
|
|
SV * RETVALSV; |
3067
|
8
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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_xsgen.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(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_xsgen.cc" |
3144
|
|
|
|
|
|
|
{ |
3145
|
|
|
|
|
|
|
SV * RETVALSV; |
3146
|
31
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
3170
|
|
|
|
|
|
|
{ |
3171
|
|
|
|
|
|
|
SV * RETVALSV; |
3172
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.cc" |
3215
|
|
|
|
|
|
|
{ |
3216
|
|
|
|
|
|
|
SV * RETVALSV; |
3217
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
3272
|
|
|
|
|
|
|
{ |
3273
|
|
|
|
|
|
|
SV * RETVALSV; |
3274
|
35
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
3319
|
|
|
|
|
|
|
{ |
3320
|
|
|
|
|
|
|
SV * RETVALSV; |
3321
|
13
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
3366
|
|
|
|
|
|
|
{ |
3367
|
|
|
|
|
|
|
SV * RETVALSV; |
3368
|
22
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
3405
|
|
|
|
|
|
|
{ |
3406
|
|
|
|
|
|
|
SV * RETVALSV; |
3407
|
3
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
3452
|
|
|
|
|
|
|
{ |
3453
|
|
|
|
|
|
|
SV * RETVALSV; |
3454
|
22
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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
|
|
|
|
|
|
|
geos::geom::Polygon * RETVAL; |
3471
|
16
|
50
|
|
|
|
|
GeometryFactory* THIS = xs::in(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_xsgen.cc" |
3498
|
|
|
|
|
|
|
{ |
3499
|
|
|
|
|
|
|
SV * RETVALSV; |
3500
|
16
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
3535
|
|
|
|
|
|
|
{ |
3536
|
|
|
|
|
|
|
SV * RETVALSV; |
3537
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
3555
|
|
|
|
|
|
|
; |
3556
|
1
|
50
|
|
|
|
|
Envelope* env = xs::in(ST(1)); |
3557
|
|
|
|
|
|
|
; |
3558
|
|
|
|
|
|
|
#line 114 "./xsi/GeometryFactory.xsi" |
3559
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->toGeometry(env)); |
3560
|
|
|
|
|
|
|
#line 3561 "Geos_xsgen.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(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(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_xsgen.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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.cc" |
3952
|
|
|
|
|
|
|
{ |
3953
|
|
|
|
|
|
|
SV * RETVALSV; |
3954
|
14
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4052
|
|
|
|
|
|
|
; |
4053
|
15
|
50
|
|
|
|
|
Geometry& other = xs::in(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4081
|
|
|
|
|
|
|
; |
4082
|
7
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4083
|
|
|
|
|
|
|
; |
4084
|
|
|
|
|
|
|
#line 53 "./xsi/Geometry.xsi" |
4085
|
|
|
|
|
|
|
RETVAL = THIS->equals(&other); |
4086
|
|
|
|
|
|
|
#line 4087 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4103
|
|
|
|
|
|
|
; |
4104
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4105
|
|
|
|
|
|
|
; |
4106
|
|
|
|
|
|
|
#line 55 "./xsi/Geometry.xsi" |
4107
|
|
|
|
|
|
|
RETVAL = THIS->compareTo(&other); |
4108
|
|
|
|
|
|
|
#line 4109 "Geos_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4200
|
|
|
|
|
|
|
; |
4201
|
7
|
50
|
|
|
|
|
Geometry& g = xs::in(ST(1)); |
4202
|
|
|
|
|
|
|
; |
4203
|
|
|
|
|
|
|
#line 63 "./xsi/Geometry.xsi" |
4204
|
|
|
|
|
|
|
RETVAL = THIS->distance(&g); |
4205
|
|
|
|
|
|
|
#line 4206 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4221
|
|
|
|
|
|
|
; |
4222
|
6
|
50
|
|
|
|
|
Geometry& g = xs::in(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_xsgen.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(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(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_xsgen.cc" |
4249
|
|
|
|
|
|
|
{ |
4250
|
|
|
|
|
|
|
SV * RETVALSV; |
4251
|
7
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
4274
|
|
|
|
|
|
|
{ |
4275
|
|
|
|
|
|
|
SV * RETVALSV; |
4276
|
6
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4294
|
|
|
|
|
|
|
; |
4295
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4296
|
|
|
|
|
|
|
; |
4297
|
|
|
|
|
|
|
#line 71 "./xsi/Geometry.xsi" |
4298
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->symDifference(&other)); |
4299
|
|
|
|
|
|
|
#line 4300 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4331
|
|
|
|
|
|
|
; |
4332
|
7
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4333
|
|
|
|
|
|
|
; |
4334
|
|
|
|
|
|
|
#line 73 "./xsi/Geometry.xsi" |
4335
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->difference(&other)); |
4336
|
|
|
|
|
|
|
#line 4337 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4368
|
|
|
|
|
|
|
; |
4369
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4370
|
|
|
|
|
|
|
; |
4371
|
|
|
|
|
|
|
#line 75 "./xsi/Geometry.xsi" |
4372
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->Union(&other)); |
4373
|
|
|
|
|
|
|
#line 4374 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4405
|
|
|
|
|
|
|
; |
4406
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4407
|
|
|
|
|
|
|
; |
4408
|
|
|
|
|
|
|
#line 77 "./xsi/Geometry.xsi" |
4409
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->intersection(&other)); |
4410
|
|
|
|
|
|
|
#line 4411 "Geos_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4541
|
|
|
|
|
|
|
; |
4542
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4543
|
|
|
|
|
|
|
; |
4544
|
|
|
|
|
|
|
#line 96 "./xsi/Geometry.xsi" |
4545
|
|
|
|
|
|
|
RETVAL = THIS->coveredBy(&other); |
4546
|
|
|
|
|
|
|
#line 4547 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4562
|
|
|
|
|
|
|
; |
4563
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4564
|
|
|
|
|
|
|
; |
4565
|
|
|
|
|
|
|
#line 98 "./xsi/Geometry.xsi" |
4566
|
|
|
|
|
|
|
RETVAL = THIS->covers(&other); |
4567
|
|
|
|
|
|
|
#line 4568 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4583
|
|
|
|
|
|
|
; |
4584
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4585
|
|
|
|
|
|
|
; |
4586
|
|
|
|
|
|
|
#line 100 "./xsi/Geometry.xsi" |
4587
|
|
|
|
|
|
|
RETVAL = THIS->overlaps(&other); |
4588
|
|
|
|
|
|
|
#line 4589 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4604
|
|
|
|
|
|
|
; |
4605
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4606
|
|
|
|
|
|
|
; |
4607
|
|
|
|
|
|
|
#line 102 "./xsi/Geometry.xsi" |
4608
|
|
|
|
|
|
|
RETVAL = THIS->contains(&other); |
4609
|
|
|
|
|
|
|
#line 4610 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4625
|
|
|
|
|
|
|
; |
4626
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4627
|
|
|
|
|
|
|
; |
4628
|
|
|
|
|
|
|
#line 104 "./xsi/Geometry.xsi" |
4629
|
|
|
|
|
|
|
RETVAL = THIS->within(&other); |
4630
|
|
|
|
|
|
|
#line 4631 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4646
|
|
|
|
|
|
|
; |
4647
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4648
|
|
|
|
|
|
|
; |
4649
|
|
|
|
|
|
|
#line 106 "./xsi/Geometry.xsi" |
4650
|
|
|
|
|
|
|
RETVAL = THIS->crosses(&other); |
4651
|
|
|
|
|
|
|
#line 4652 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4667
|
|
|
|
|
|
|
; |
4668
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4669
|
|
|
|
|
|
|
; |
4670
|
|
|
|
|
|
|
#line 108 "./xsi/Geometry.xsi" |
4671
|
|
|
|
|
|
|
RETVAL = THIS->intersects(&other); |
4672
|
|
|
|
|
|
|
#line 4673 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4688
|
|
|
|
|
|
|
; |
4689
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4690
|
|
|
|
|
|
|
; |
4691
|
|
|
|
|
|
|
#line 110 "./xsi/Geometry.xsi" |
4692
|
|
|
|
|
|
|
RETVAL = THIS->touches(&other); |
4693
|
|
|
|
|
|
|
#line 4694 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4709
|
|
|
|
|
|
|
; |
4710
|
6
|
50
|
|
|
|
|
Geometry& other = xs::in(ST(1)); |
4711
|
|
|
|
|
|
|
; |
4712
|
|
|
|
|
|
|
#line 112 "./xsi/Geometry.xsi" |
4713
|
|
|
|
|
|
|
RETVAL = THIS->disjoint(&other); |
4714
|
|
|
|
|
|
|
#line 4715 "Geos_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.cc" |
4806
|
|
|
|
|
|
|
{ |
4807
|
|
|
|
|
|
|
SV * RETVALSV; |
4808
|
6
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
4853
|
|
|
|
|
|
|
; |
4854
|
12
|
50
|
|
|
|
|
Geometry& other = xs::in(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_xsgen.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(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(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_xsgen.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(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_xsgen.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(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(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_xsgen.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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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_xsgen.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(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(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(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_xsgen.cc" |
5114
|
|
|
|
|
|
|
{ |
5115
|
|
|
|
|
|
|
SV * RETVALSV; |
5116
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
5139
|
|
|
|
|
|
|
{ |
5140
|
|
|
|
|
|
|
SV * RETVALSV; |
5141
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
5164
|
|
|
|
|
|
|
{ |
5165
|
|
|
|
|
|
|
SV * RETVALSV; |
5166
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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
|
|
|
|
|
geos::geom::Polygon* THIS = xs::in(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_xsgen.cc" |
5299
|
|
|
|
|
|
|
{ |
5300
|
|
|
|
|
|
|
SV * RETVALSV; |
5301
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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
|
|
|
|
|
geos::geom::Polygon* THIS = xs::in(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(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_xsgen.cc" |
5328
|
|
|
|
|
|
|
{ |
5329
|
|
|
|
|
|
|
SV * RETVALSV; |
5330
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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
|
|
|
|
|
geos::geom::Polygon* THIS = xs::in(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_xsgen.cc" |
5353
|
|
|
|
|
|
|
{ |
5354
|
|
|
|
|
|
|
SV * RETVALSV; |
5355
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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
|
|
|
|
|
geos::geom::Polygon* THIS = xs::in(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_xsgen.cc" |
5378
|
|
|
|
|
|
|
{ |
5379
|
|
|
|
|
|
|
SV * RETVALSV; |
5380
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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_xsgen.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(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_xsgen.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(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_xsgen.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(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_xsgen.cc" |
5494
|
|
|
|
|
|
|
{ |
5495
|
|
|
|
|
|
|
SV * RETVALSV; |
5496
|
6
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
5641
|
|
|
|
|
|
|
; |
5642
|
3
|
50
|
|
|
|
|
Geometry& g = xs::in(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
5665
|
|
|
|
|
|
|
; |
5666
|
3
|
50
|
|
|
|
|
Geometry& g = xs::in(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_xsgen.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(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_xsgen.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(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_xsgen.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(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_xsgen.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(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_xsgen.cc" |
5852
|
|
|
|
|
|
|
{ |
5853
|
|
|
|
|
|
|
SV * RETVALSV; |
5854
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
5917
|
|
|
|
|
|
|
; |
5918
|
2
|
50
|
|
|
|
|
Geometry& g = xs::in(ST(1)); |
5919
|
|
|
|
|
|
|
; |
5920
|
|
|
|
|
|
|
#line 14 "./xsi/WKTWriter.xsi" |
5921
|
|
|
|
|
|
|
RETVAL = THIS->write(&g); |
5922
|
|
|
|
|
|
|
#line 5923 "Geos_xsgen.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(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_xsgen.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(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_xsgen.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(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(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_xsgen.cc" |
6028
|
|
|
|
|
|
|
{ |
6029
|
|
|
|
|
|
|
SV * RETVALSV; |
6030
|
0
|
0
|
|
|
|
|
RETVALSV = xs::out(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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
6048
|
|
|
|
|
|
|
; |
6049
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
6050
|
|
|
|
|
|
|
; |
6051
|
|
|
|
|
|
|
#line 6 "./xsi/PrepGeometry.xsi" |
6052
|
|
|
|
|
|
|
RETVAL = THIS->contains(&geom); |
6053
|
|
|
|
|
|
|
#line 6054 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
6069
|
|
|
|
|
|
|
; |
6070
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
6071
|
|
|
|
|
|
|
; |
6072
|
|
|
|
|
|
|
#line 8 "./xsi/PrepGeometry.xsi" |
6073
|
|
|
|
|
|
|
RETVAL = THIS->containsProperly(&geom); |
6074
|
|
|
|
|
|
|
#line 6075 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
6090
|
|
|
|
|
|
|
; |
6091
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
6092
|
|
|
|
|
|
|
; |
6093
|
|
|
|
|
|
|
#line 10 "./xsi/PrepGeometry.xsi" |
6094
|
|
|
|
|
|
|
RETVAL = THIS->coveredBy(&geom); |
6095
|
|
|
|
|
|
|
#line 6096 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
6111
|
|
|
|
|
|
|
; |
6112
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
6113
|
|
|
|
|
|
|
; |
6114
|
|
|
|
|
|
|
#line 12 "./xsi/PrepGeometry.xsi" |
6115
|
|
|
|
|
|
|
RETVAL = THIS->covers(&geom); |
6116
|
|
|
|
|
|
|
#line 6117 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
6132
|
|
|
|
|
|
|
; |
6133
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
6134
|
|
|
|
|
|
|
; |
6135
|
|
|
|
|
|
|
#line 14 "./xsi/PrepGeometry.xsi" |
6136
|
|
|
|
|
|
|
RETVAL = THIS->crosses(&geom); |
6137
|
|
|
|
|
|
|
#line 6138 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
6153
|
|
|
|
|
|
|
; |
6154
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
6155
|
|
|
|
|
|
|
; |
6156
|
|
|
|
|
|
|
#line 16 "./xsi/PrepGeometry.xsi" |
6157
|
|
|
|
|
|
|
RETVAL = THIS->disjoint(&geom); |
6158
|
|
|
|
|
|
|
#line 6159 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
6174
|
|
|
|
|
|
|
; |
6175
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
6176
|
|
|
|
|
|
|
; |
6177
|
|
|
|
|
|
|
#line 18 "./xsi/PrepGeometry.xsi" |
6178
|
|
|
|
|
|
|
RETVAL = THIS->intersects(&geom); |
6179
|
|
|
|
|
|
|
#line 6180 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
6195
|
|
|
|
|
|
|
; |
6196
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
6197
|
|
|
|
|
|
|
; |
6198
|
|
|
|
|
|
|
#line 20 "./xsi/PrepGeometry.xsi" |
6199
|
|
|
|
|
|
|
RETVAL = THIS->overlaps(&geom); |
6200
|
|
|
|
|
|
|
#line 6201 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
6216
|
|
|
|
|
|
|
; |
6217
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
6218
|
|
|
|
|
|
|
; |
6219
|
|
|
|
|
|
|
#line 22 "./xsi/PrepGeometry.xsi" |
6220
|
|
|
|
|
|
|
RETVAL = THIS->touches(&geom); |
6221
|
|
|
|
|
|
|
#line 6222 "Geos_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
6237
|
|
|
|
|
|
|
; |
6238
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
6239
|
|
|
|
|
|
|
; |
6240
|
|
|
|
|
|
|
#line 24 "./xsi/PrepGeometry.xsi" |
6241
|
|
|
|
|
|
|
RETVAL = THIS->within(&geom); |
6242
|
|
|
|
|
|
|
#line 6243 "Geos_xsgen.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(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(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_xsgen.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(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_xsgen.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(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(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_xsgen.cc" |
6307
|
|
|
|
|
|
|
{ |
6308
|
|
|
|
|
|
|
SV * RETVALSV; |
6309
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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_xsgen.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(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_xsgen.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(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(ST(0)); |
6374
|
|
|
|
|
|
|
; |
6375
|
|
|
|
|
|
|
#line 8 "./xsi/algorithm.xsi" |
6376
|
|
|
|
|
|
|
RETVAL = Angle::angle(p0); |
6377
|
|
|
|
|
|
|
#line 6378 "Geos_xsgen.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(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(ST(0)); |
6393
|
|
|
|
|
|
|
; |
6394
|
1
|
50
|
|
|
|
|
Coordinate* p1 = xs::in(ST(1)); |
6395
|
|
|
|
|
|
|
; |
6396
|
1
|
50
|
|
|
|
|
Coordinate * p2 = xs::in(ST(2)); |
6397
|
|
|
|
|
|
|
; |
6398
|
|
|
|
|
|
|
#line 11 "./xsi/algorithm.xsi" |
6399
|
|
|
|
|
|
|
RETVAL = Angle::isAcute(*p0, *p1, *p2); |
6400
|
|
|
|
|
|
|
#line 6401 "Geos_xsgen.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(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(ST(0)); |
6416
|
|
|
|
|
|
|
; |
6417
|
1
|
50
|
|
|
|
|
Coordinate& p1 = xs::in(ST(1)); |
6418
|
|
|
|
|
|
|
; |
6419
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(ST(2)); |
6420
|
|
|
|
|
|
|
; |
6421
|
|
|
|
|
|
|
#line 15 "./xsi/algorithm.xsi" |
6422
|
|
|
|
|
|
|
RETVAL = Angle::isObtuse(p0, p1, p2); |
6423
|
|
|
|
|
|
|
#line 6424 "Geos_xsgen.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(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(ST(0)); |
6440
|
|
|
|
|
|
|
; |
6441
|
1
|
50
|
|
|
|
|
Coordinate& tail = xs::in(ST(1)); |
6442
|
|
|
|
|
|
|
; |
6443
|
1
|
50
|
|
|
|
|
Coordinate& tip2 = xs::in(ST(2)); |
6444
|
|
|
|
|
|
|
; |
6445
|
|
|
|
|
|
|
#line 19 "./xsi/algorithm.xsi" |
6446
|
|
|
|
|
|
|
RETVAL = Angle::angleBetween(tip1, tail, tip2); |
6447
|
|
|
|
|
|
|
#line 6448 "Geos_xsgen.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(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(ST(0)); |
6464
|
|
|
|
|
|
|
; |
6465
|
1
|
50
|
|
|
|
|
Coordinate& tail = xs::in(ST(1)); |
6466
|
|
|
|
|
|
|
; |
6467
|
1
|
50
|
|
|
|
|
Coordinate& tip2 = xs::in(ST(2)); |
6468
|
|
|
|
|
|
|
; |
6469
|
|
|
|
|
|
|
#line 23 "./xsi/algorithm.xsi" |
6470
|
|
|
|
|
|
|
RETVAL = Angle::angleBetweenOriented (tip1, tail, tip2); |
6471
|
|
|
|
|
|
|
#line 6472 "Geos_xsgen.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(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(ST(0)); |
6488
|
|
|
|
|
|
|
; |
6489
|
1
|
50
|
|
|
|
|
Coordinate& p1 = xs::in(ST(1)); |
6490
|
|
|
|
|
|
|
; |
6491
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(ST(2)); |
6492
|
|
|
|
|
|
|
; |
6493
|
|
|
|
|
|
|
#line 27 "./xsi/algorithm.xsi" |
6494
|
|
|
|
|
|
|
RETVAL = Angle::interiorAngle(p0, p1, p2); |
6495
|
|
|
|
|
|
|
#line 6496 "Geos_xsgen.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(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_xsgen.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(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_xsgen.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(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_xsgen.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(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_xsgen.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(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(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_xsgen.cc" |
6602
|
|
|
|
|
|
|
{ |
6603
|
|
|
|
|
|
|
SV * RETVALSV; |
6604
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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_xsgen.cc" |
6641
|
|
|
|
|
|
|
{ |
6642
|
|
|
|
|
|
|
SV * RETVALSV; |
6643
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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_xsgen.cc" |
6680
|
|
|
|
|
|
|
{ |
6681
|
|
|
|
|
|
|
SV * RETVALSV; |
6682
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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_xsgen.cc" |
6717
|
|
|
|
|
|
|
{ |
6718
|
|
|
|
|
|
|
SV * RETVALSV; |
6719
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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_xsgen.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(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(ST(0)); |
6829
|
|
|
|
|
|
|
; |
6830
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(ST(1)); |
6831
|
|
|
|
|
|
|
; |
6832
|
1
|
50
|
|
|
|
|
Coordinate& q = xs::in(ST(2)); |
6833
|
|
|
|
|
|
|
; |
6834
|
|
|
|
|
|
|
#line 115 "./xsi/algorithm.xsi" |
6835
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::computeOrientation(p1, p2, q); |
6836
|
|
|
|
|
|
|
#line 6837 "Geos_xsgen.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(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(ST(0)); |
6853
|
|
|
|
|
|
|
; |
6854
|
1
|
50
|
|
|
|
|
Coordinate& A = xs::in(ST(1)); |
6855
|
|
|
|
|
|
|
; |
6856
|
1
|
50
|
|
|
|
|
Coordinate& B = xs::in(ST(2)); |
6857
|
|
|
|
|
|
|
; |
6858
|
|
|
|
|
|
|
#line 119 "./xsi/algorithm.xsi" |
6859
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::distancePointLine(p, A, B); |
6860
|
|
|
|
|
|
|
#line 6861 "Geos_xsgen.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(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(ST(0)); |
6877
|
|
|
|
|
|
|
; |
6878
|
1
|
50
|
|
|
|
|
Coordinate& A = xs::in(ST(1)); |
6879
|
|
|
|
|
|
|
; |
6880
|
1
|
50
|
|
|
|
|
Coordinate& B = xs::in(ST(2)); |
6881
|
|
|
|
|
|
|
; |
6882
|
|
|
|
|
|
|
#line 123 "./xsi/algorithm.xsi" |
6883
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::distancePointLinePerpendicular(p, A, B); |
6884
|
|
|
|
|
|
|
#line 6885 "Geos_xsgen.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(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(ST(0)); |
6901
|
|
|
|
|
|
|
; |
6902
|
1
|
50
|
|
|
|
|
Coordinate& B = xs::in(ST(1)); |
6903
|
|
|
|
|
|
|
; |
6904
|
1
|
50
|
|
|
|
|
Coordinate& C = xs::in(ST(2)); |
6905
|
|
|
|
|
|
|
; |
6906
|
1
|
50
|
|
|
|
|
Coordinate& D = xs::in(ST(3)); |
6907
|
|
|
|
|
|
|
; |
6908
|
|
|
|
|
|
|
#line 127 "./xsi/algorithm.xsi" |
6909
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::distanceLineLine(A, B, C, D); |
6910
|
|
|
|
|
|
|
#line 6911 "Geos_xsgen.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(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_xsgen.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(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_xsgen.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(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(ST(0)); |
6971
|
|
|
|
|
|
|
; |
6972
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(ST(1)); |
6973
|
|
|
|
|
|
|
; |
6974
|
1
|
50
|
|
|
|
|
Coordinate& q = xs::in(ST(2)); |
6975
|
|
|
|
|
|
|
; |
6976
|
|
|
|
|
|
|
#line 141 "./xsi/algorithm.xsi" |
6977
|
|
|
|
|
|
|
RETVAL = CGAlgorithms::computeOrientation(p1, p2, q); |
6978
|
|
|
|
|
|
|
#line 6979 "Geos_xsgen.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(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(ST(0)); |
6994
|
|
|
|
|
|
|
; |
6995
|
1
|
50
|
|
|
|
|
Coordinate& p01 = xs::in(ST(1)); |
6996
|
|
|
|
|
|
|
; |
6997
|
1
|
50
|
|
|
|
|
Coordinate& p10 = xs::in(ST(2)); |
6998
|
|
|
|
|
|
|
; |
6999
|
1
|
50
|
|
|
|
|
Coordinate& p11 = xs::in(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_xsgen.cc" |
7009
|
|
|
|
|
|
|
{ |
7010
|
|
|
|
|
|
|
SV * RETVALSV; |
7011
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(ST(0)); |
7029
|
|
|
|
|
|
|
; |
7030
|
|
|
|
|
|
|
#line 153 "./xsi/algorithm.xsi" |
7031
|
|
|
|
|
|
|
auto ch = ConvexHull(&newGeometry); |
7032
|
|
|
|
|
|
|
RETVAL = Helper::uplift(ch.getConvexHull()); |
7033
|
|
|
|
|
|
|
#line 7034 "Geos_xsgen.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(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(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_xsgen.cc" |
7073
|
|
|
|
|
|
|
{ |
7074
|
|
|
|
|
|
|
SV * RETVALSV; |
7075
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
7101
|
|
|
|
|
|
|
{ |
7102
|
|
|
|
|
|
|
SV * RETVALSV; |
7103
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
7129
|
|
|
|
|
|
|
{ |
7130
|
|
|
|
|
|
|
SV * RETVALSV; |
7131
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(ST(0)); |
7150
|
|
|
|
|
|
|
; |
7151
|
2
|
100
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
7152
|
|
|
|
|
|
|
; |
7153
|
|
|
|
|
|
|
#line 179 "./xsi/algorithm.xsi" |
7154
|
|
|
|
|
|
|
PointLocator pl; |
7155
|
|
|
|
|
|
|
RETVAL = pl.locate(p, &geom); |
7156
|
|
|
|
|
|
|
#line 7157 "Geos_xsgen.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(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(ST(0)); |
7172
|
|
|
|
|
|
|
; |
7173
|
2
|
100
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
7174
|
|
|
|
|
|
|
; |
7175
|
|
|
|
|
|
|
#line 184 "./xsi/algorithm.xsi" |
7176
|
|
|
|
|
|
|
PointLocator pl; |
7177
|
|
|
|
|
|
|
RETVAL = pl.intersects(p, &geom); |
7178
|
|
|
|
|
|
|
#line 7179 "Geos_xsgen.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(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_xsgen.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(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(ST(0)); |
7221
|
|
|
|
|
|
|
; |
7222
|
1
|
50
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
7223
|
|
|
|
|
|
|
; |
7224
|
|
|
|
|
|
|
#line 193 "./xsi/algorithm.xsi" |
7225
|
|
|
|
|
|
|
locate::IndexedPointInAreaLocator locator(geom); |
7226
|
|
|
|
|
|
|
RETVAL = locator.locate(&p); |
7227
|
|
|
|
|
|
|
#line 7228 "Geos_xsgen.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(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(ST(0)); |
7244
|
|
|
|
|
|
|
; |
7245
|
2
|
100
|
|
|
|
|
Geometry& geom = xs::in(ST(1)); |
7246
|
|
|
|
|
|
|
; |
7247
|
|
|
|
|
|
|
#line 198 "./xsi/algorithm.xsi" |
7248
|
|
|
|
|
|
|
locate::SimplePointInAreaLocator locator(&geom); |
7249
|
|
|
|
|
|
|
RETVAL = locator.locate(&p); |
7250
|
|
|
|
|
|
|
#line 7251 "Geos_xsgen.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(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_xsgen.cc" |
7332
|
|
|
|
|
|
|
{ |
7333
|
|
|
|
|
|
|
SV * RETVALSV; |
7334
|
5
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.cc" |
7397
|
|
|
|
|
|
|
{ |
7398
|
|
|
|
|
|
|
SV * RETVALSV; |
7399
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(ST(0)); |
7417
|
|
|
|
|
|
|
; |
7418
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(ST(1)); |
7419
|
|
|
|
|
|
|
; |
7420
|
1
|
50
|
|
|
|
|
Coordinate& q1 = xs::in(ST(2)); |
7421
|
|
|
|
|
|
|
; |
7422
|
1
|
50
|
|
|
|
|
Coordinate& q2 = xs::in(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_xsgen.cc" |
7430
|
|
|
|
|
|
|
{ |
7431
|
|
|
|
|
|
|
SV * RETVALSV; |
7432
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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_xsgen.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(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(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_xsgen.cc" |
7512
|
|
|
|
|
|
|
{ |
7513
|
|
|
|
|
|
|
SV * RETVALSV; |
7514
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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_xsgen.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(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(ST(0)); |
7577
|
|
|
|
|
|
|
; |
7578
|
|
|
|
|
|
|
#line 26 "./xsi/algorithm/MinimumDiameter.xsi" |
7579
|
|
|
|
|
|
|
RETVAL = Helper::uplift(MinimumDiameter::getMinimumDiameter(&g)); |
7580
|
|
|
|
|
|
|
#line 7581 "Geos_xsgen.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(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(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_xsgen.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(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(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_xsgen.cc" |
7637
|
|
|
|
|
|
|
{ |
7638
|
|
|
|
|
|
|
SV * RETVALSV; |
7639
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
7662
|
|
|
|
|
|
|
{ |
7663
|
|
|
|
|
|
|
SV * RETVALSV; |
7664
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.cc" |
7687
|
|
|
|
|
|
|
{ |
7688
|
|
|
|
|
|
|
SV * RETVALSV; |
7689
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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_xsgen.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(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_xsgen.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(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(ST(0)); |
7775
|
|
|
|
|
|
|
; |
7776
|
1
|
50
|
|
|
|
|
Coordinate * p0 = xs::in(ST(1)); |
7777
|
|
|
|
|
|
|
; |
7778
|
1
|
50
|
|
|
|
|
Coordinate * p1 = xs::in(ST(2)); |
7779
|
|
|
|
|
|
|
; |
7780
|
|
|
|
|
|
|
#line 11 "./xsi/algorithm/LineIntersector.xsi" |
7781
|
|
|
|
|
|
|
RETVAL = LineIntersector::interpolateZ(*p, *p0, *p1); |
7782
|
|
|
|
|
|
|
#line 7783 "Geos_xsgen.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(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(ST(0)); |
7799
|
|
|
|
|
|
|
; |
7800
|
1
|
50
|
|
|
|
|
Coordinate * p0 = xs::in(ST(1)); |
7801
|
|
|
|
|
|
|
; |
7802
|
1
|
50
|
|
|
|
|
Coordinate * p1 = xs::in(ST(2)); |
7803
|
|
|
|
|
|
|
; |
7804
|
|
|
|
|
|
|
#line 13 "./xsi/algorithm/LineIntersector.xsi" |
7805
|
|
|
|
|
|
|
RETVAL = LineIntersector::computeEdgeDistance(*p, *p0, *p1); |
7806
|
|
|
|
|
|
|
#line 7807 "Geos_xsgen.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(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_xsgen.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(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(ST(1)); |
7852
|
|
|
|
|
|
|
; |
7853
|
|
|
|
|
|
|
} |
7854
|
|
|
|
|
|
|
|
7855
|
6
|
100
|
|
|
|
|
if (items < 3) |
7856
|
5
|
|
|
|
|
|
p2 = NULL; |
7857
|
|
|
|
|
|
|
else { |
7858
|
1
|
50
|
|
|
|
|
p2 = xs::in(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
7945
|
|
|
|
|
|
|
; |
7946
|
5
|
|
|
|
|
|
Coordinate& p1 = xs::in(ST(1)); |
7947
|
|
|
|
|
|
|
; |
7948
|
5
|
|
|
|
|
|
Coordinate& p2 = xs::in(ST(2)); |
7949
|
|
|
|
|
|
|
; |
7950
|
5
|
|
|
|
|
|
Coordinate& p3 = xs::in(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.cc" |
8098
|
|
|
|
|
|
|
{ |
8099
|
|
|
|
|
|
|
SV * RETVALSV; |
8100
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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_xsgen.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(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_xsgen.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(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_xsgen.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(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_xsgen.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(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_xsgen.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(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(ST(1)); |
8269
|
|
|
|
|
|
|
; |
8270
|
1
|
50
|
|
|
|
|
Coordinate& p2 = xs::in(ST(2)); |
8271
|
|
|
|
|
|
|
; |
8272
|
|
|
|
|
|
|
#line 58 "./xsi/noding.xsi" |
8273
|
|
|
|
|
|
|
RETVAL = SegmentPointComparator::compare(octant, p1, p2); |
8274
|
|
|
|
|
|
|
#line 8275 "Geos_xsgen.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(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(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_xsgen.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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.cc" |
8399
|
|
|
|
|
|
|
{ |
8400
|
|
|
|
|
|
|
SV * RETVALSV; |
8401
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
8534
|
|
|
|
|
|
|
; |
8535
|
1
|
50
|
|
|
|
|
SegmentNode& other = xs::in(ST(1)); |
8536
|
|
|
|
|
|
|
; |
8537
|
|
|
|
|
|
|
#line 8 "./xsi/noding/SegmentNode.xsi" |
8538
|
|
|
|
|
|
|
RETVAL = THIS->compareTo(other); |
8539
|
|
|
|
|
|
|
#line 8540 "Geos_xsgen.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(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(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_xsgen.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(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(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_xsgen.cc" |
8582
|
|
|
|
|
|
|
{ |
8583
|
|
|
|
|
|
|
SV * RETVALSV; |
8584
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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_xsgen.cc" |
8636
|
|
|
|
|
|
|
{ |
8637
|
|
|
|
|
|
|
SV * RETVALSV; |
8638
|
15
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
8656
|
|
|
|
|
|
|
; |
8657
|
3
|
50
|
|
|
|
|
Coordinate& c = xs::in(ST(1)); |
8658
|
|
|
|
|
|
|
; |
8659
|
3
|
50
|
|
|
|
|
std::size_t segmentIndex = xs::in(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_xsgen.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(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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
8722
|
|
|
|
|
|
|
; |
8723
|
1
|
|
|
|
|
|
LineIntersector& li = xs::in(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_xsgen.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(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(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_xsgen.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(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_xsgen.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(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_xsgen.cc" |
8828
|
|
|
|
|
|
|
{ |
8829
|
|
|
|
|
|
|
SV * RETVALSV; |
8830
|
5
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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(THIS, SvRV(ST(0))); |
8853
|
|
|
|
|
|
|
#line 8854 "Geos_xsgen.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(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(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_xsgen.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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
8915
|
|
|
|
|
|
|
; |
8916
|
3
|
|
|
|
|
|
SegmentString& e0 = xs::in(ST(1)); |
8917
|
|
|
|
|
|
|
; |
8918
|
3
|
50
|
|
|
|
|
int segIndex0 = (int)SvIV(ST(2)) |
8919
|
|
|
|
|
|
|
; |
8920
|
3
|
|
|
|
|
|
SegmentString& e1 = xs::in(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_xsgen.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(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(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_xsgen.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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.cc" |
9139
|
|
|
|
|
|
|
{ |
9140
|
|
|
|
|
|
|
SV * RETVALSV; |
9141
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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_xsgen.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(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_xsgen.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(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(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_xsgen.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(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(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_xsgen.cc" |
9244
|
|
|
|
|
|
|
{ |
9245
|
|
|
|
|
|
|
SV * RETVALSV; |
9246
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(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(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(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_xsgen.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(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_xsgen.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(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_xsgen.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(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(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
9357
|
|
|
|
|
|
|
; |
9358
|
|
|
|
|
|
|
#line 12 "./xsi/noding/IntersectionAdder.xsi" |
9359
|
|
|
|
|
|
|
(void)THIS; |
9360
|
|
|
|
|
|
|
Object me{ST(0)}; |
9361
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker); |
9362
|
|
|
|
|
|
|
Object li{payload.obj}; |
9363
|
|
|
|
|
|
|
RETVAL = li.ref(); |
9364
|
|
|
|
|
|
|
#line 9365 "Geos_xsgen.cc" |
9365
|
|
|
|
|
|
|
{ |
9366
|
|
|
|
|
|
|
SV * RETVALSV; |
9367
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
9368
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
9369
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
9370
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
9371
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
9372
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
9373
|
|
|
|
|
|
|
case SVt_PVCV: |
9374
|
|
|
|
|
|
|
case SVt_PVIO: |
9375
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
9376
|
0
|
|
|
|
|
|
break; |
9377
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
9378
|
|
|
|
|
|
|
} |
9379
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
9380
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
9381
|
|
|
|
|
|
|
} |
9382
|
|
|
|
|
|
|
} |
9383
|
1
|
|
|
|
|
|
XSRETURN(1); |
9384
|
1
|
50
|
|
|
|
|
}); } |
9385
|
|
|
|
|
|
|
|
9386
|
|
|
|
|
|
|
|
9387
|
|
|
|
|
|
|
|
9388
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionAdder_hasIntersection) { xs::throw_guard(cv, [=]() |
9389
|
|
|
|
|
|
|
{ |
9390
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
9391
|
1
|
50
|
|
|
|
|
if (items != 1) |
9392
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
9393
|
|
|
|
|
|
|
{ |
9394
|
|
|
|
|
|
|
bool RETVAL; |
9395
|
1
|
50
|
|
|
|
|
IntersectionAdder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
9396
|
|
|
|
|
|
|
; |
9397
|
|
|
|
|
|
|
#line 19 "./xsi/noding/IntersectionAdder.xsi" |
9398
|
|
|
|
|
|
|
RETVAL = THIS->hasIntersection(); |
9399
|
|
|
|
|
|
|
#line 9400 "Geos_xsgen.cc" |
9400
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
9401
|
|
|
|
|
|
|
} |
9402
|
1
|
|
|
|
|
|
XSRETURN(1); |
9403
|
1
|
50
|
|
|
|
|
}); } |
9404
|
|
|
|
|
|
|
|
9405
|
|
|
|
|
|
|
|
9406
|
|
|
|
|
|
|
|
9407
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionAdder_hasProperIntersection) { xs::throw_guard(cv, [=]() |
9408
|
|
|
|
|
|
|
{ |
9409
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
9410
|
1
|
50
|
|
|
|
|
if (items != 1) |
9411
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
9412
|
|
|
|
|
|
|
{ |
9413
|
|
|
|
|
|
|
bool RETVAL; |
9414
|
1
|
50
|
|
|
|
|
IntersectionAdder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
9415
|
|
|
|
|
|
|
; |
9416
|
|
|
|
|
|
|
#line 21 "./xsi/noding/IntersectionAdder.xsi" |
9417
|
|
|
|
|
|
|
RETVAL = THIS->hasProperIntersection(); |
9418
|
|
|
|
|
|
|
#line 9419 "Geos_xsgen.cc" |
9419
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
9420
|
|
|
|
|
|
|
} |
9421
|
1
|
|
|
|
|
|
XSRETURN(1); |
9422
|
1
|
50
|
|
|
|
|
}); } |
9423
|
|
|
|
|
|
|
|
9424
|
|
|
|
|
|
|
|
9425
|
|
|
|
|
|
|
|
9426
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionAdder_hasProperInteriorIntersection) { xs::throw_guard(cv, [=]() |
9427
|
|
|
|
|
|
|
{ |
9428
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
9429
|
1
|
50
|
|
|
|
|
if (items != 1) |
9430
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
9431
|
|
|
|
|
|
|
{ |
9432
|
|
|
|
|
|
|
bool RETVAL; |
9433
|
1
|
50
|
|
|
|
|
IntersectionAdder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
9434
|
|
|
|
|
|
|
; |
9435
|
|
|
|
|
|
|
#line 23 "./xsi/noding/IntersectionAdder.xsi" |
9436
|
|
|
|
|
|
|
RETVAL = THIS->hasProperInteriorIntersection(); |
9437
|
|
|
|
|
|
|
#line 9438 "Geos_xsgen.cc" |
9438
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
9439
|
|
|
|
|
|
|
} |
9440
|
1
|
|
|
|
|
|
XSRETURN(1); |
9441
|
1
|
50
|
|
|
|
|
}); } |
9442
|
|
|
|
|
|
|
|
9443
|
|
|
|
|
|
|
|
9444
|
|
|
|
|
|
|
|
9445
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionAdder_hasInteriorIntersection) { xs::throw_guard(cv, [=]() |
9446
|
|
|
|
|
|
|
{ |
9447
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
9448
|
1
|
50
|
|
|
|
|
if (items != 1) |
9449
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
9450
|
|
|
|
|
|
|
{ |
9451
|
|
|
|
|
|
|
bool RETVAL; |
9452
|
1
|
50
|
|
|
|
|
IntersectionAdder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
9453
|
|
|
|
|
|
|
; |
9454
|
|
|
|
|
|
|
#line 25 "./xsi/noding/IntersectionAdder.xsi" |
9455
|
|
|
|
|
|
|
RETVAL = THIS->hasInteriorIntersection(); |
9456
|
|
|
|
|
|
|
#line 9457 "Geos_xsgen.cc" |
9457
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
9458
|
|
|
|
|
|
|
} |
9459
|
1
|
|
|
|
|
|
XSRETURN(1); |
9460
|
1
|
50
|
|
|
|
|
}); } |
9461
|
|
|
|
|
|
|
|
9462
|
|
|
|
|
|
|
|
9463
|
|
|
|
|
|
|
|
9464
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionAdder_CLONE_SKIP) { xs::throw_guard(cv, [=]() |
9465
|
|
|
|
|
|
|
{ |
9466
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
9467
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
9468
|
|
|
|
|
|
|
{ |
9469
|
|
|
|
|
|
|
int RETVAL; |
9470
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
9471
|
|
|
|
|
|
|
#line 27 "./xsi/noding/IntersectionAdder.xsi" |
9472
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
9473
|
|
|
|
|
|
|
#line 9474 "Geos_xsgen.cc" |
9474
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
0
|
|
|
|
|
|
9475
|
|
|
|
|
|
|
} |
9476
|
0
|
|
|
|
|
|
XSRETURN(1); |
9477
|
0
|
0
|
|
|
|
|
}); } |
9478
|
|
|
|
|
|
|
|
9479
|
|
|
|
|
|
|
|
9480
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/IntersectionAdder.xsi' */ |
9481
|
|
|
|
|
|
|
|
9482
|
|
|
|
|
|
|
|
9483
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/IntersectionFinderAdder.xsi' from 'Geos.xs' */ |
9484
|
|
|
|
|
|
|
|
9485
|
|
|
|
|
|
|
|
9486
|
|
|
|
|
|
|
|
9487
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionFinderAdder_new) { xs::throw_guard(cv, [=]() |
9488
|
|
|
|
|
|
|
{ |
9489
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
9490
|
1
|
50
|
|
|
|
|
if (items != 3) |
9491
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, liObj, coords"); |
9492
|
|
|
|
|
|
|
{ |
9493
|
2
|
|
|
|
|
|
Sv RETVAL; |
9494
|
1
|
|
|
|
|
|
SV* liObj = ST(1) |
9495
|
|
|
|
|
|
|
; |
9496
|
2
|
50
|
|
|
|
|
Array coords = ST(2); |
|
|
50
|
|
|
|
|
|
9497
|
1
|
50
|
|
|
|
|
if (!coords && SvOK(ST(2))) throw "arg is not a 'Array' reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
9498
|
0
|
|
|
|
|
|
; |
9499
|
|
|
|
|
|
|
#line 5 "./xsi/noding/IntersectionFinderAdder.xsi" |
9500
|
|
|
|
|
|
|
LineIntersector& li = xs::in(liObj); |
9501
|
|
|
|
|
|
|
auto* payload = new IntersectionFinderAdder_payload{SvRV(liObj), {}}; |
9502
|
|
|
|
|
|
|
|
9503
|
|
|
|
|
|
|
auto* v = &payload->coords; |
9504
|
|
|
|
|
|
|
v->reserve(coords.size()); |
9505
|
|
|
|
|
|
|
for(auto it: coords) { |
9506
|
|
|
|
|
|
|
Coordinate& c = xs::in(it); |
9507
|
|
|
|
|
|
|
v->emplace_back(c); |
9508
|
|
|
|
|
|
|
} |
9509
|
|
|
|
|
|
|
|
9510
|
|
|
|
|
|
|
Object wrapped = xs::out<>(new IntersectionFinderAdder(li, *v)); |
9511
|
|
|
|
|
|
|
wrapped.payload_attach(payload, &payload_marker_IntersectionFinderAdder); |
9512
|
|
|
|
|
|
|
|
9513
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
9514
|
|
|
|
|
|
|
#line 9515 "Geos_xsgen.cc" |
9515
|
|
|
|
|
|
|
{ |
9516
|
|
|
|
|
|
|
SV * RETVALSV; |
9517
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
9518
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
9519
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
9520
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
9521
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
9522
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
9523
|
|
|
|
|
|
|
case SVt_PVCV: |
9524
|
|
|
|
|
|
|
case SVt_PVIO: |
9525
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
9526
|
0
|
|
|
|
|
|
break; |
9527
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
9528
|
|
|
|
|
|
|
} |
9529
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
9530
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
9531
|
|
|
|
|
|
|
} |
9532
|
|
|
|
|
|
|
} |
9533
|
1
|
|
|
|
|
|
XSRETURN(1); |
9534
|
1
|
50
|
|
|
|
|
}); } |
9535
|
|
|
|
|
|
|
|
9536
|
|
|
|
|
|
|
|
9537
|
|
|
|
|
|
|
|
9538
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionFinderAdder_getInteriorIntersections) { xs::throw_guard(cv, [=]() |
9539
|
|
|
|
|
|
|
{ |
9540
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
9541
|
1
|
50
|
|
|
|
|
if (items != 1) |
9542
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
9543
|
|
|
|
|
|
|
{ |
9544
|
2
|
|
|
|
|
|
xs::Array RETVAL; |
9545
|
1
|
50
|
|
|
|
|
IntersectionFinderAdder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
9546
|
|
|
|
|
|
|
; |
9547
|
|
|
|
|
|
|
#line 22 "./xsi/noding/IntersectionFinderAdder.xsi" |
9548
|
|
|
|
|
|
|
(void)THIS; |
9549
|
|
|
|
|
|
|
Object me{ST(0)}; |
9550
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker_IntersectionFinderAdder); |
9551
|
|
|
|
|
|
|
auto* real_payload = static_cast(payload.ptr); |
9552
|
|
|
|
|
|
|
auto* v = &real_payload->coords; |
9553
|
|
|
|
|
|
|
|
9554
|
|
|
|
|
|
|
auto result = xs::Array::create(v->size()); |
9555
|
|
|
|
|
|
|
for(auto& c: *v) { |
9556
|
|
|
|
|
|
|
result.push(xs::out(new Coordinate(c))); |
9557
|
|
|
|
|
|
|
} |
9558
|
|
|
|
|
|
|
RETVAL = result; |
9559
|
|
|
|
|
|
|
#line 9560 "Geos_xsgen.cc" |
9560
|
|
|
|
|
|
|
{ |
9561
|
|
|
|
|
|
|
SV * RETVALSV; |
9562
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
9563
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
9564
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
9565
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
9566
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
9567
|
|
|
|
|
|
|
} |
9568
|
|
|
|
|
|
|
} |
9569
|
1
|
|
|
|
|
|
XSRETURN(1); |
9570
|
1
|
50
|
|
|
|
|
}); } |
9571
|
|
|
|
|
|
|
|
9572
|
|
|
|
|
|
|
|
9573
|
|
|
|
|
|
|
|
9574
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IntersectionFinderAdder_CLONE_SKIP) { xs::throw_guard(cv, [=]() |
9575
|
|
|
|
|
|
|
{ |
9576
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
9577
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
9578
|
|
|
|
|
|
|
{ |
9579
|
|
|
|
|
|
|
int RETVAL; |
9580
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
9581
|
|
|
|
|
|
|
#line 35 "./xsi/noding/IntersectionFinderAdder.xsi" |
9582
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
9583
|
|
|
|
|
|
|
#line 9584 "Geos_xsgen.cc" |
9584
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
0
|
|
|
|
|
|
9585
|
|
|
|
|
|
|
} |
9586
|
0
|
|
|
|
|
|
XSRETURN(1); |
9587
|
0
|
0
|
|
|
|
|
}); } |
9588
|
|
|
|
|
|
|
|
9589
|
|
|
|
|
|
|
|
9590
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/IntersectionFinderAdder.xsi' */ |
9591
|
|
|
|
|
|
|
|
9592
|
|
|
|
|
|
|
|
9593
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/Noder.xsi' from 'Geos.xs' */ |
9594
|
|
|
|
|
|
|
|
9595
|
|
|
|
|
|
|
|
9596
|
|
|
|
|
|
|
|
9597
|
10
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__Noder_computeNodes) { xs::throw_guard(cv, [=]() |
9598
|
|
|
|
|
|
|
{ |
9599
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
9600
|
5
|
50
|
|
|
|
|
if (items != 2) |
9601
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, segStrings"); |
9602
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
9603
|
5
|
|
|
|
|
|
SP -= items; |
9604
|
|
|
|
|
|
|
{ |
9605
|
5
|
50
|
|
|
|
|
Noder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
9606
|
|
|
|
|
|
|
; |
9607
|
10
|
50
|
|
|
|
|
Array segStrings = ST(1); |
9608
|
5
|
50
|
|
|
|
|
if (!segStrings && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
9609
|
0
|
|
|
|
|
|
; |
9610
|
|
|
|
|
|
|
#line 5 "./xsi/noding/Noder.xsi" |
9611
|
|
|
|
|
|
|
auto segments = Noder_payload::vector_t(); |
9612
|
|
|
|
|
|
|
segments.reserve(segStrings.size()); |
9613
|
|
|
|
|
|
|
|
9614
|
|
|
|
|
|
|
for(auto it: segStrings) { |
9615
|
|
|
|
|
|
|
SegmentString& ss = xs::in(it); |
9616
|
|
|
|
|
|
|
segments.push_back(&ss); |
9617
|
|
|
|
|
|
|
} |
9618
|
|
|
|
|
|
|
|
9619
|
|
|
|
|
|
|
auto payload = new Noder_payload(); |
9620
|
|
|
|
|
|
|
payload->array_ref = xs::Ref::create(segStrings); |
9621
|
|
|
|
|
|
|
payload->segments = std::move(segments); |
9622
|
|
|
|
|
|
|
|
9623
|
|
|
|
|
|
|
|
9624
|
|
|
|
|
|
|
Object self{ST(0)}; |
9625
|
|
|
|
|
|
|
self.payload_attach(payload, &payload_marker_Noder); |
9626
|
|
|
|
|
|
|
|
9627
|
|
|
|
|
|
|
THIS->computeNodes(&payload->segments); |
9628
|
|
|
|
|
|
|
#line 9629 "Geos_xsgen.cc" |
9629
|
5
|
|
|
|
|
|
PUTBACK; |
9630
|
10
|
|
|
|
|
|
return; |
9631
|
|
|
|
|
|
|
} |
9632
|
5
|
50
|
|
|
|
|
}); } |
9633
|
|
|
|
|
|
|
|
9634
|
|
|
|
|
|
|
|
9635
|
|
|
|
|
|
|
|
9636
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__Noder_getNodedSubstrings) { xs::throw_guard(cv, [=]() |
9637
|
|
|
|
|
|
|
{ |
9638
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
9639
|
6
|
50
|
|
|
|
|
if (items != 1) |
9640
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
9641
|
|
|
|
|
|
|
{ |
9642
|
12
|
|
|
|
|
|
Sv RETVAL; |
9643
|
6
|
50
|
|
|
|
|
Noder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
9644
|
|
|
|
|
|
|
; |
9645
|
|
|
|
|
|
|
#line 25 "./xsi/noding/Noder.xsi" |
9646
|
|
|
|
|
|
|
auto items = THIS->getNodedSubstrings(); |
9647
|
|
|
|
|
|
|
if (!items) XSRETURN_UNDEF; |
9648
|
|
|
|
|
|
|
else { |
9649
|
|
|
|
|
|
|
xs::Array result = xs::Array::create(items->size()); |
9650
|
|
|
|
|
|
|
for(auto it: *items) { |
9651
|
|
|
|
|
|
|
result.push(xs::out(it)); |
9652
|
|
|
|
|
|
|
} |
9653
|
|
|
|
|
|
|
delete items; |
9654
|
|
|
|
|
|
|
RETVAL = xs::Ref::create(result); |
9655
|
|
|
|
|
|
|
} |
9656
|
|
|
|
|
|
|
#line 9657 "Geos_xsgen.cc" |
9657
|
|
|
|
|
|
|
{ |
9658
|
|
|
|
|
|
|
SV * RETVALSV; |
9659
|
6
|
|
|
|
|
|
RETVALSV = NULL; |
9660
|
6
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
9661
|
6
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
9662
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
9663
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
9664
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
9665
|
|
|
|
|
|
|
case SVt_PVCV: |
9666
|
|
|
|
|
|
|
case SVt_PVIO: |
9667
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
9668
|
0
|
|
|
|
|
|
break; |
9669
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
9670
|
|
|
|
|
|
|
} |
9671
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
9672
|
6
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
9673
|
|
|
|
|
|
|
} |
9674
|
|
|
|
|
|
|
} |
9675
|
6
|
|
|
|
|
|
XSRETURN(1); |
9676
|
6
|
50
|
|
|
|
|
}); } |
9677
|
|
|
|
|
|
|
|
9678
|
|
|
|
|
|
|
|
9679
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/Noder.xsi' */ |
9680
|
|
|
|
|
|
|
|
9681
|
|
|
|
|
|
|
|
9682
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/IteratedNoder.xsi' from 'Geos.xs' */ |
9683
|
|
|
|
|
|
|
|
9684
|
|
|
|
|
|
|
|
9685
|
|
|
|
|
|
|
|
9686
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IteratedNoder_new) { xs::throw_guard(cv, [=]() |
9687
|
|
|
|
|
|
|
{ |
9688
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
9689
|
2
|
50
|
|
|
|
|
if (items != 2) |
9690
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, precisionModel"); |
9691
|
|
|
|
|
|
|
{ |
9692
|
4
|
|
|
|
|
|
Sv RETVAL; |
9693
|
2
|
|
|
|
|
|
SV* precisionModel = ST(1) |
9694
|
|
|
|
|
|
|
; |
9695
|
|
|
|
|
|
|
#line 5 "./xsi/noding/IteratedNoder.xsi" |
9696
|
|
|
|
|
|
|
PrecisionModel& pm = xs::in(precisionModel); |
9697
|
|
|
|
|
|
|
Object wrapped = xs::out(new IteratedNoder(&pm)); |
9698
|
|
|
|
|
|
|
wrapped.payload_attach(precisionModel, &payload_marker); |
9699
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
9700
|
|
|
|
|
|
|
#line 9701 "Geos_xsgen.cc" |
9701
|
|
|
|
|
|
|
{ |
9702
|
|
|
|
|
|
|
SV * RETVALSV; |
9703
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
9704
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
9705
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
9706
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
9707
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
9708
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
9709
|
|
|
|
|
|
|
case SVt_PVCV: |
9710
|
|
|
|
|
|
|
case SVt_PVIO: |
9711
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
9712
|
0
|
|
|
|
|
|
break; |
9713
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
9714
|
|
|
|
|
|
|
} |
9715
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
9716
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
9717
|
|
|
|
|
|
|
} |
9718
|
|
|
|
|
|
|
} |
9719
|
2
|
|
|
|
|
|
XSRETURN(1); |
9720
|
2
|
50
|
|
|
|
|
}); } |
9721
|
|
|
|
|
|
|
|
9722
|
|
|
|
|
|
|
|
9723
|
|
|
|
|
|
|
|
9724
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IteratedNoder_setMaximumIterations) { xs::throw_guard(cv, [=]() |
9725
|
|
|
|
|
|
|
{ |
9726
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
9727
|
1
|
50
|
|
|
|
|
if (items != 2) |
9728
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, n"); |
9729
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
9730
|
1
|
|
|
|
|
|
SP -= items; |
9731
|
|
|
|
|
|
|
{ |
9732
|
1
|
50
|
|
|
|
|
IteratedNoder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
9733
|
|
|
|
|
|
|
; |
9734
|
1
|
50
|
|
|
|
|
int n = (int)SvIV(ST(1)) |
9735
|
|
|
|
|
|
|
; |
9736
|
|
|
|
|
|
|
#line 11 "./xsi/noding/IteratedNoder.xsi" |
9737
|
|
|
|
|
|
|
THIS->setMaximumIterations(n); |
9738
|
|
|
|
|
|
|
#line 9739 "Geos_xsgen.cc" |
9739
|
1
|
|
|
|
|
|
PUTBACK; |
9740
|
1
|
|
|
|
|
|
return; |
9741
|
|
|
|
|
|
|
} |
9742
|
1
|
50
|
|
|
|
|
}); } |
9743
|
|
|
|
|
|
|
|
9744
|
|
|
|
|
|
|
|
9745
|
|
|
|
|
|
|
|
9746
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__IteratedNoder_CLONE_SKIP) { xs::throw_guard(cv, [=]() |
9747
|
|
|
|
|
|
|
{ |
9748
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
9749
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
9750
|
|
|
|
|
|
|
{ |
9751
|
|
|
|
|
|
|
int RETVAL; |
9752
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
9753
|
|
|
|
|
|
|
#line 13 "./xsi/noding/IteratedNoder.xsi" |
9754
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
9755
|
|
|
|
|
|
|
#line 9756 "Geos_xsgen.cc" |
9756
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
0
|
|
|
|
|
|
9757
|
|
|
|
|
|
|
} |
9758
|
0
|
|
|
|
|
|
XSRETURN(1); |
9759
|
0
|
0
|
|
|
|
|
}); } |
9760
|
|
|
|
|
|
|
|
9761
|
|
|
|
|
|
|
|
9762
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/IteratedNoder.xsi' */ |
9763
|
|
|
|
|
|
|
|
9764
|
|
|
|
|
|
|
|
9765
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/ScaledNoder.xsi' from 'Geos.xs' */ |
9766
|
|
|
|
|
|
|
|
9767
|
|
|
|
|
|
|
|
9768
|
|
|
|
|
|
|
|
9769
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__ScaledNoder_new) { xs::throw_guard(cv, [=]() |
9770
|
|
|
|
|
|
|
{ |
9771
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
9772
|
1
|
50
|
|
|
|
|
if (items < 3 || items > 5) |
|
|
50
|
|
|
|
|
|
9773
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, noder, nScaleFactor, nOffsetX= 0.0, nOffsetY= 0.0"); |
9774
|
|
|
|
|
|
|
{ |
9775
|
2
|
|
|
|
|
|
Sv RETVAL; |
9776
|
1
|
|
|
|
|
|
SV* noder = ST(1) |
9777
|
|
|
|
|
|
|
; |
9778
|
1
|
50
|
|
|
|
|
double nScaleFactor = (double)SvNV(ST(2)) |
|
|
50
|
|
|
|
|
|
9779
|
|
|
|
|
|
|
; |
9780
|
|
|
|
|
|
|
double nOffsetX; |
9781
|
|
|
|
|
|
|
double nOffsetY; |
9782
|
|
|
|
|
|
|
|
9783
|
1
|
50
|
|
|
|
|
if (items < 4) |
9784
|
0
|
|
|
|
|
|
nOffsetX = 0.0; |
9785
|
|
|
|
|
|
|
else { |
9786
|
2
|
|
|
|
|
|
nOffsetX = (double)SvNV(ST(3)) |
9787
|
1
|
50
|
|
|
|
|
; |
|
|
50
|
|
|
|
|
|
9788
|
|
|
|
|
|
|
} |
9789
|
|
|
|
|
|
|
|
9790
|
1
|
50
|
|
|
|
|
if (items < 5) |
9791
|
0
|
|
|
|
|
|
nOffsetY = 0.0; |
9792
|
|
|
|
|
|
|
else { |
9793
|
2
|
|
|
|
|
|
nOffsetY = (double)SvNV(ST(4)) |
9794
|
1
|
50
|
|
|
|
|
; |
|
|
50
|
|
|
|
|
|
9795
|
|
|
|
|
|
|
} |
9796
|
|
|
|
|
|
|
#line 5 "./xsi/noding/ScaledNoder.xsi" |
9797
|
|
|
|
|
|
|
Noder& n = xs::in(noder); |
9798
|
|
|
|
|
|
|
Object wrapped = xs::out<>(new ScaledNoder(n, nScaleFactor, nOffsetX, nOffsetY)); |
9799
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(noder), &payload_marker); |
9800
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
9801
|
|
|
|
|
|
|
#line 9802 "Geos_xsgen.cc" |
9802
|
|
|
|
|
|
|
{ |
9803
|
|
|
|
|
|
|
SV * RETVALSV; |
9804
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
9805
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
9806
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
9807
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
9808
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
9809
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
9810
|
|
|
|
|
|
|
case SVt_PVCV: |
9811
|
|
|
|
|
|
|
case SVt_PVIO: |
9812
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
9813
|
0
|
|
|
|
|
|
break; |
9814
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
9815
|
|
|
|
|
|
|
} |
9816
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
9817
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
9818
|
|
|
|
|
|
|
} |
9819
|
|
|
|
|
|
|
} |
9820
|
1
|
|
|
|
|
|
XSRETURN(1); |
9821
|
1
|
50
|
|
|
|
|
}); } |
9822
|
|
|
|
|
|
|
|
9823
|
|
|
|
|
|
|
|
9824
|
|
|
|
|
|
|
|
9825
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__ScaledNoder_isIntegerPrecision) { xs::throw_guard(cv, [=]() |
9826
|
|
|
|
|
|
|
{ |
9827
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
9828
|
1
|
50
|
|
|
|
|
if (items != 1) |
9829
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
9830
|
|
|
|
|
|
|
{ |
9831
|
|
|
|
|
|
|
bool RETVAL; |
9832
|
1
|
50
|
|
|
|
|
ScaledNoder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
9833
|
|
|
|
|
|
|
; |
9834
|
|
|
|
|
|
|
#line 11 "./xsi/noding/ScaledNoder.xsi" |
9835
|
|
|
|
|
|
|
RETVAL = THIS->isIntegerPrecision(); |
9836
|
|
|
|
|
|
|
#line 9837 "Geos_xsgen.cc" |
9837
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
9838
|
|
|
|
|
|
|
} |
9839
|
1
|
|
|
|
|
|
XSRETURN(1); |
9840
|
1
|
50
|
|
|
|
|
}); } |
9841
|
|
|
|
|
|
|
|
9842
|
|
|
|
|
|
|
|
9843
|
|
|
|
|
|
|
|
9844
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__ScaledNoder_CLONE_SKIP) { xs::throw_guard(cv, [=]() |
9845
|
|
|
|
|
|
|
{ |
9846
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
9847
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
9848
|
|
|
|
|
|
|
{ |
9849
|
|
|
|
|
|
|
int RETVAL; |
9850
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
9851
|
|
|
|
|
|
|
#line 13 "./xsi/noding/ScaledNoder.xsi" |
9852
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
9853
|
|
|
|
|
|
|
#line 9854 "Geos_xsgen.cc" |
9854
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
0
|
|
|
|
|
|
9855
|
|
|
|
|
|
|
} |
9856
|
0
|
|
|
|
|
|
XSRETURN(1); |
9857
|
0
|
0
|
|
|
|
|
}); } |
9858
|
|
|
|
|
|
|
|
9859
|
|
|
|
|
|
|
|
9860
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/ScaledNoder.xsi' */ |
9861
|
|
|
|
|
|
|
|
9862
|
|
|
|
|
|
|
|
9863
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/SinglePassNoder.xsi' from 'Geos.xs' */ |
9864
|
|
|
|
|
|
|
|
9865
|
|
|
|
|
|
|
|
9866
|
|
|
|
|
|
|
|
9867
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SinglePassNoder_setSegmentIntersector) { xs::throw_guard(cv, [=]() |
9868
|
|
|
|
|
|
|
{ |
9869
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
9870
|
0
|
0
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
0
|
|
|
|
|
|
9871
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newSegInt= NULL"); |
9872
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
9873
|
0
|
|
|
|
|
|
SP -= items; |
9874
|
|
|
|
|
|
|
{ |
9875
|
0
|
0
|
|
|
|
|
SinglePassNoder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
9876
|
|
|
|
|
|
|
; |
9877
|
|
|
|
|
|
|
SV * newSegInt; |
9878
|
|
|
|
|
|
|
|
9879
|
0
|
0
|
|
|
|
|
if (items < 2) |
9880
|
0
|
|
|
|
|
|
newSegInt = NULL; |
9881
|
|
|
|
|
|
|
else { |
9882
|
0
|
|
|
|
|
|
newSegInt = ST(1) |
9883
|
0
|
|
|
|
|
|
; |
9884
|
|
|
|
|
|
|
} |
9885
|
|
|
|
|
|
|
#line 5 "./xsi/noding/SinglePassNoder.xsi" |
9886
|
|
|
|
|
|
|
Object self{ST(0)}; |
9887
|
|
|
|
|
|
|
|
9888
|
|
|
|
|
|
|
SegmentIntersector* si = newSegInt ? xs::in(newSegInt) : NULL; |
9889
|
|
|
|
|
|
|
if (si) { |
9890
|
|
|
|
|
|
|
self.payload_attach(SvRV(newSegInt), &payload_marker); |
9891
|
|
|
|
|
|
|
} |
9892
|
|
|
|
|
|
|
else if (self.payload_exists(&payload_marker)) { |
9893
|
|
|
|
|
|
|
self.payload_detach(&payload_marker); |
9894
|
|
|
|
|
|
|
} |
9895
|
|
|
|
|
|
|
|
9896
|
|
|
|
|
|
|
THIS->setSegmentIntersector(si); |
9897
|
|
|
|
|
|
|
#line 9898 "Geos_xsgen.cc" |
9898
|
0
|
|
|
|
|
|
PUTBACK; |
9899
|
0
|
|
|
|
|
|
return; |
9900
|
|
|
|
|
|
|
} |
9901
|
0
|
0
|
|
|
|
|
}); } |
9902
|
|
|
|
|
|
|
|
9903
|
|
|
|
|
|
|
|
9904
|
|
|
|
|
|
|
|
9905
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SinglePassNoder_CLONE_SKIP) { xs::throw_guard(cv, [=]() |
9906
|
|
|
|
|
|
|
{ |
9907
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
9908
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
9909
|
|
|
|
|
|
|
{ |
9910
|
|
|
|
|
|
|
int RETVAL; |
9911
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
9912
|
|
|
|
|
|
|
#line 19 "./xsi/noding/SinglePassNoder.xsi" |
9913
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
9914
|
|
|
|
|
|
|
#line 9915 "Geos_xsgen.cc" |
9915
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
0
|
|
|
|
|
|
9916
|
|
|
|
|
|
|
} |
9917
|
0
|
|
|
|
|
|
XSRETURN(1); |
9918
|
0
|
0
|
|
|
|
|
}); } |
9919
|
|
|
|
|
|
|
|
9920
|
|
|
|
|
|
|
|
9921
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/SinglePassNoder.xsi' */ |
9922
|
|
|
|
|
|
|
|
9923
|
|
|
|
|
|
|
|
9924
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/SimpleNoder.xsi' from 'Geos.xs' */ |
9925
|
|
|
|
|
|
|
|
9926
|
|
|
|
|
|
|
|
9927
|
|
|
|
|
|
|
|
9928
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SimpleNoder_new) { xs::throw_guard(cv, [=]() |
9929
|
|
|
|
|
|
|
{ |
9930
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
9931
|
1
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
9932
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, newSegInt= NULL"); |
9933
|
|
|
|
|
|
|
{ |
9934
|
2
|
|
|
|
|
|
Sv RETVAL; |
9935
|
|
|
|
|
|
|
SV * newSegInt; |
9936
|
|
|
|
|
|
|
|
9937
|
1
|
50
|
|
|
|
|
if (items < 2) |
9938
|
0
|
|
|
|
|
|
newSegInt = NULL; |
9939
|
|
|
|
|
|
|
else { |
9940
|
1
|
|
|
|
|
|
newSegInt = ST(1) |
9941
|
1
|
|
|
|
|
|
; |
9942
|
|
|
|
|
|
|
} |
9943
|
|
|
|
|
|
|
#line 5 "./xsi/noding/SimpleNoder.xsi" |
9944
|
|
|
|
|
|
|
SegmentIntersector* si = newSegInt ? xs::in(newSegInt) : NULL; |
9945
|
|
|
|
|
|
|
Object self{xs::out(new SimpleNoder(si))}; |
9946
|
|
|
|
|
|
|
if (si) { |
9947
|
|
|
|
|
|
|
self.payload_attach(SvRV(newSegInt), &payload_marker); |
9948
|
|
|
|
|
|
|
} |
9949
|
|
|
|
|
|
|
RETVAL = self.ref(); |
9950
|
|
|
|
|
|
|
#line 9951 "Geos_xsgen.cc" |
9951
|
|
|
|
|
|
|
{ |
9952
|
|
|
|
|
|
|
SV * RETVALSV; |
9953
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
9954
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
9955
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
9956
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
9957
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
9958
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
9959
|
|
|
|
|
|
|
case SVt_PVCV: |
9960
|
|
|
|
|
|
|
case SVt_PVIO: |
9961
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
9962
|
0
|
|
|
|
|
|
break; |
9963
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
9964
|
|
|
|
|
|
|
} |
9965
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
9966
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
9967
|
|
|
|
|
|
|
} |
9968
|
|
|
|
|
|
|
} |
9969
|
1
|
|
|
|
|
|
XSRETURN(1); |
9970
|
1
|
50
|
|
|
|
|
}); } |
9971
|
|
|
|
|
|
|
|
9972
|
|
|
|
|
|
|
|
9973
|
|
|
|
|
|
|
|
9974
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SimpleNoder_CLONE_SKIP) { xs::throw_guard(cv, [=]() |
9975
|
|
|
|
|
|
|
{ |
9976
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
9977
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
9978
|
|
|
|
|
|
|
{ |
9979
|
|
|
|
|
|
|
int RETVAL; |
9980
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
9981
|
|
|
|
|
|
|
#line 14 "./xsi/noding/SimpleNoder.xsi" |
9982
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
9983
|
|
|
|
|
|
|
#line 9984 "Geos_xsgen.cc" |
9984
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
0
|
|
|
|
|
|
9985
|
|
|
|
|
|
|
} |
9986
|
0
|
|
|
|
|
|
XSRETURN(1); |
9987
|
0
|
0
|
|
|
|
|
}); } |
9988
|
|
|
|
|
|
|
|
9989
|
|
|
|
|
|
|
|
9990
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/SimpleNoder.xsi' */ |
9991
|
|
|
|
|
|
|
|
9992
|
|
|
|
|
|
|
|
9993
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/noding/SimpleSnapRounder.xsi' from 'Geos.xs' */ |
9994
|
|
|
|
|
|
|
|
9995
|
|
|
|
|
|
|
|
9996
|
|
|
|
|
|
|
|
9997
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SimpleSnapRounder_new) { xs::throw_guard(cv, [=]() |
9998
|
|
|
|
|
|
|
{ |
9999
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
10000
|
2
|
50
|
|
|
|
|
if (items != 2) |
10001
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, precisionModel"); |
10002
|
|
|
|
|
|
|
{ |
10003
|
4
|
|
|
|
|
|
Sv RETVAL; |
10004
|
2
|
|
|
|
|
|
SV* precisionModel = ST(1) |
10005
|
|
|
|
|
|
|
; |
10006
|
|
|
|
|
|
|
#line 5 "./xsi/noding/SimpleSnapRounder.xsi" |
10007
|
|
|
|
|
|
|
auto& pm = xs::in(precisionModel); |
10008
|
|
|
|
|
|
|
Object wrapped = xs::out(new SimpleSnapRounder(pm)); |
10009
|
|
|
|
|
|
|
wrapped.payload_attach(precisionModel, &payload_marker); |
10010
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
10011
|
|
|
|
|
|
|
#line 10012 "Geos_xsgen.cc" |
10012
|
|
|
|
|
|
|
{ |
10013
|
|
|
|
|
|
|
SV * RETVALSV; |
10014
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
10015
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
10016
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
10017
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
10018
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
10019
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
10020
|
|
|
|
|
|
|
case SVt_PVCV: |
10021
|
|
|
|
|
|
|
case SVt_PVIO: |
10022
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
10023
|
0
|
|
|
|
|
|
break; |
10024
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
10025
|
|
|
|
|
|
|
} |
10026
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10027
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
10028
|
|
|
|
|
|
|
} |
10029
|
|
|
|
|
|
|
} |
10030
|
2
|
|
|
|
|
|
XSRETURN(1); |
10031
|
2
|
50
|
|
|
|
|
}); } |
10032
|
|
|
|
|
|
|
|
10033
|
|
|
|
|
|
|
|
10034
|
|
|
|
|
|
|
|
10035
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SimpleSnapRounder_computeVertexSnaps) { xs::throw_guard(cv, [=]() |
10036
|
|
|
|
|
|
|
{ |
10037
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
10038
|
2
|
50
|
|
|
|
|
if (items != 2) |
10039
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, edges"); |
10040
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
10041
|
2
|
|
|
|
|
|
SP -= items; |
10042
|
|
|
|
|
|
|
{ |
10043
|
2
|
50
|
|
|
|
|
SimpleSnapRounder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10044
|
|
|
|
|
|
|
; |
10045
|
4
|
50
|
|
|
|
|
Array edges = ST(1); |
10046
|
2
|
50
|
|
|
|
|
if (!edges && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
10047
|
0
|
|
|
|
|
|
; |
10048
|
|
|
|
|
|
|
#line 12 "./xsi/noding/SimpleSnapRounder.xsi" |
10049
|
|
|
|
|
|
|
std::vector v; |
10050
|
|
|
|
|
|
|
v.reserve(edges.size()); |
10051
|
|
|
|
|
|
|
|
10052
|
|
|
|
|
|
|
for(auto it: edges) { |
10053
|
|
|
|
|
|
|
auto& ss = xs::in(it); |
10054
|
|
|
|
|
|
|
v.push_back(&ss); |
10055
|
|
|
|
|
|
|
} |
10056
|
|
|
|
|
|
|
THIS->computeVertexSnaps(v); |
10057
|
|
|
|
|
|
|
#line 10058 "Geos_xsgen.cc" |
10058
|
2
|
|
|
|
|
|
PUTBACK; |
10059
|
4
|
|
|
|
|
|
return; |
10060
|
|
|
|
|
|
|
} |
10061
|
2
|
50
|
|
|
|
|
}); } |
10062
|
|
|
|
|
|
|
|
10063
|
|
|
|
|
|
|
|
10064
|
|
|
|
|
|
|
|
10065
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Noding__SimpleSnapRounder_CLONE_SKIP) { xs::throw_guard(cv, [=]() |
10066
|
|
|
|
|
|
|
{ |
10067
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
10068
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
10069
|
|
|
|
|
|
|
{ |
10070
|
|
|
|
|
|
|
int RETVAL; |
10071
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
10072
|
|
|
|
|
|
|
#line 23 "./xsi/noding/SimpleSnapRounder.xsi" |
10073
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
10074
|
|
|
|
|
|
|
#line 10075 "Geos_xsgen.cc" |
10075
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
0
|
|
|
|
|
|
10076
|
|
|
|
|
|
|
} |
10077
|
0
|
|
|
|
|
|
XSRETURN(1); |
10078
|
0
|
0
|
|
|
|
|
}); } |
10079
|
|
|
|
|
|
|
|
10080
|
|
|
|
|
|
|
|
10081
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/noding/SimpleSnapRounder.xsi' */ |
10082
|
|
|
|
|
|
|
|
10083
|
|
|
|
|
|
|
|
10084
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/index/MonotoneChain.xsi' from 'Geos.xs' */ |
10085
|
|
|
|
|
|
|
|
10086
|
|
|
|
|
|
|
|
10087
|
|
|
|
|
|
|
|
10088
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_new) { xs::throw_guard(cv, [=]() |
10089
|
|
|
|
|
|
|
{ |
10090
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
10091
|
2
|
50
|
|
|
|
|
if (items != 4) |
10092
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, pts, start, end"); |
10093
|
|
|
|
|
|
|
{ |
10094
|
4
|
|
|
|
|
|
Sv RETVAL; |
10095
|
4
|
50
|
|
|
|
|
Array pts = ST(1); |
|
|
50
|
|
|
|
|
|
10096
|
2
|
50
|
|
|
|
|
if (!pts && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
10097
|
0
|
|
|
|
|
|
; |
10098
|
2
|
50
|
|
|
|
|
std::size_t start = xs::in(ST(2)); |
10099
|
|
|
|
|
|
|
; |
10100
|
2
|
50
|
|
|
|
|
std::size_t end = xs::in(ST(3)); |
10101
|
|
|
|
|
|
|
; |
10102
|
|
|
|
|
|
|
#line 5 "./xsi/index/MonotoneChain.xsi" |
10103
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(pts); |
10104
|
|
|
|
|
|
|
auto seq_ptr = seq.clone(); |
10105
|
|
|
|
|
|
|
auto payload = new MonotoneChain_payload(); |
10106
|
|
|
|
|
|
|
payload->seq.reset(seq_ptr); |
10107
|
|
|
|
|
|
|
|
10108
|
|
|
|
|
|
|
Object wrapped = xs::out<>(new MonotoneChain(*seq_ptr, start, end, NULL)); |
10109
|
|
|
|
|
|
|
wrapped.payload_attach(payload, &payload_marker_MonotoneChain); |
10110
|
|
|
|
|
|
|
|
10111
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
10112
|
|
|
|
|
|
|
#line 10113 "Geos_xsgen.cc" |
10113
|
|
|
|
|
|
|
{ |
10114
|
|
|
|
|
|
|
SV * RETVALSV; |
10115
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
10116
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
10117
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
10118
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
10119
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
10120
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
10121
|
|
|
|
|
|
|
case SVt_PVCV: |
10122
|
|
|
|
|
|
|
case SVt_PVIO: |
10123
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
10124
|
0
|
|
|
|
|
|
break; |
10125
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
10126
|
|
|
|
|
|
|
} |
10127
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10128
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
10129
|
|
|
|
|
|
|
} |
10130
|
|
|
|
|
|
|
} |
10131
|
2
|
|
|
|
|
|
XSRETURN(1); |
10132
|
2
|
50
|
|
|
|
|
}); } |
10133
|
|
|
|
|
|
|
|
10134
|
|
|
|
|
|
|
|
10135
|
|
|
|
|
|
|
|
10136
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getChains) { xs::throw_guard(cv, [=]() |
10137
|
|
|
|
|
|
|
{ |
10138
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10139
|
1
|
50
|
|
|
|
|
if (items != 1) |
10140
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "pts"); |
10141
|
|
|
|
|
|
|
{ |
10142
|
2
|
|
|
|
|
|
Array RETVAL; |
10143
|
2
|
50
|
|
|
|
|
Array pts = ST(0); |
|
|
50
|
|
|
|
|
|
10144
|
1
|
50
|
|
|
|
|
if (!pts && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
10145
|
0
|
|
|
|
|
|
; |
10146
|
|
|
|
|
|
|
#line 17 "./xsi/index/MonotoneChain.xsi" |
10147
|
|
|
|
|
|
|
auto seq = Helper::convert_coords(pts); |
10148
|
|
|
|
|
|
|
std::vector v; |
10149
|
|
|
|
|
|
|
MonotoneChainBuilder::getChains(&seq, NULL, v); |
10150
|
|
|
|
|
|
|
|
10151
|
|
|
|
|
|
|
Array result = Array::create(v.size()); |
10152
|
|
|
|
|
|
|
for(auto mc: v) { |
10153
|
|
|
|
|
|
|
result.push(xs::out(mc)); |
10154
|
|
|
|
|
|
|
} |
10155
|
|
|
|
|
|
|
RETVAL = result; |
10156
|
|
|
|
|
|
|
#line 10157 "Geos_xsgen.cc" |
10157
|
|
|
|
|
|
|
{ |
10158
|
|
|
|
|
|
|
SV * RETVALSV; |
10159
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
10160
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
10161
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
10162
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10163
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
10164
|
|
|
|
|
|
|
} |
10165
|
|
|
|
|
|
|
} |
10166
|
1
|
|
|
|
|
|
XSRETURN(1); |
10167
|
1
|
50
|
|
|
|
|
}); } |
10168
|
|
|
|
|
|
|
|
10169
|
|
|
|
|
|
|
|
10170
|
|
|
|
|
|
|
|
10171
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getEnvelope) { xs::throw_guard(cv, [=]() |
10172
|
|
|
|
|
|
|
{ |
10173
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10174
|
1
|
50
|
|
|
|
|
if (items != 1) |
10175
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
10176
|
|
|
|
|
|
|
{ |
10177
|
|
|
|
|
|
|
Envelope * RETVAL; |
10178
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10179
|
|
|
|
|
|
|
; |
10180
|
|
|
|
|
|
|
#line 29 "./xsi/index/MonotoneChain.xsi" |
10181
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
10182
|
|
|
|
|
|
|
RETVAL = new Envelope(THIS->getEnvelope()); |
10183
|
|
|
|
|
|
|
#line 10184 "Geos_xsgen.cc" |
10184
|
|
|
|
|
|
|
{ |
10185
|
|
|
|
|
|
|
SV * RETVALSV; |
10186
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
10187
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10188
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
10189
|
|
|
|
|
|
|
} |
10190
|
|
|
|
|
|
|
} |
10191
|
1
|
|
|
|
|
|
XSRETURN(1); |
10192
|
1
|
50
|
|
|
|
|
}); } |
10193
|
|
|
|
|
|
|
|
10194
|
|
|
|
|
|
|
|
10195
|
|
|
|
|
|
|
|
10196
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getStartIndex) { xs::throw_guard(cv, [=]() |
10197
|
|
|
|
|
|
|
{ |
10198
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10199
|
1
|
50
|
|
|
|
|
if (items != 1) |
10200
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
10201
|
|
|
|
|
|
|
{ |
10202
|
|
|
|
|
|
|
size_t RETVAL; |
10203
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
10204
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10205
|
|
|
|
|
|
|
; |
10206
|
|
|
|
|
|
|
#line 32 "./xsi/index/MonotoneChain.xsi" |
10207
|
|
|
|
|
|
|
RETVAL = THIS->getStartIndex(); |
10208
|
|
|
|
|
|
|
#line 10209 "Geos_xsgen.cc" |
10209
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
50
|
|
|
|
|
|
10210
|
|
|
|
|
|
|
} |
10211
|
1
|
|
|
|
|
|
XSRETURN(1); |
10212
|
1
|
50
|
|
|
|
|
}); } |
10213
|
|
|
|
|
|
|
|
10214
|
|
|
|
|
|
|
|
10215
|
|
|
|
|
|
|
|
10216
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getEndIndex) { xs::throw_guard(cv, [=]() |
10217
|
|
|
|
|
|
|
{ |
10218
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10219
|
1
|
50
|
|
|
|
|
if (items != 1) |
10220
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
10221
|
|
|
|
|
|
|
{ |
10222
|
|
|
|
|
|
|
size_t RETVAL; |
10223
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
10224
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10225
|
|
|
|
|
|
|
; |
10226
|
|
|
|
|
|
|
#line 34 "./xsi/index/MonotoneChain.xsi" |
10227
|
|
|
|
|
|
|
RETVAL = THIS->getEndIndex(); |
10228
|
|
|
|
|
|
|
#line 10229 "Geos_xsgen.cc" |
10229
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
50
|
|
|
|
|
|
10230
|
|
|
|
|
|
|
} |
10231
|
1
|
|
|
|
|
|
XSRETURN(1); |
10232
|
1
|
50
|
|
|
|
|
}); } |
10233
|
|
|
|
|
|
|
|
10234
|
|
|
|
|
|
|
|
10235
|
|
|
|
|
|
|
|
10236
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getLineSegment) { xs::throw_guard(cv, [=]() |
10237
|
|
|
|
|
|
|
{ |
10238
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
10239
|
2
|
50
|
|
|
|
|
if (items != 2) |
10240
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, index"); |
10241
|
|
|
|
|
|
|
{ |
10242
|
|
|
|
|
|
|
LineSegment * RETVAL; |
10243
|
2
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10244
|
|
|
|
|
|
|
; |
10245
|
2
|
50
|
|
|
|
|
std::size_t index = xs::in(ST(1)); |
10246
|
|
|
|
|
|
|
; |
10247
|
|
|
|
|
|
|
#line 37 "./xsi/index/MonotoneChain.xsi" |
10248
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
10249
|
|
|
|
|
|
|
LineSegment ls; |
10250
|
|
|
|
|
|
|
THIS->getLineSegment(index, ls); |
10251
|
|
|
|
|
|
|
RETVAL = new LineSegment(ls); |
10252
|
|
|
|
|
|
|
#line 10253 "Geos_xsgen.cc" |
10253
|
|
|
|
|
|
|
{ |
10254
|
|
|
|
|
|
|
SV * RETVALSV; |
10255
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
10256
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10257
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
10258
|
|
|
|
|
|
|
} |
10259
|
|
|
|
|
|
|
} |
10260
|
2
|
|
|
|
|
|
XSRETURN(1); |
10261
|
2
|
50
|
|
|
|
|
}); } |
10262
|
|
|
|
|
|
|
|
10263
|
|
|
|
|
|
|
|
10264
|
|
|
|
|
|
|
|
10265
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getCoordinates) { xs::throw_guard(cv, [=]() |
10266
|
|
|
|
|
|
|
{ |
10267
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10268
|
1
|
50
|
|
|
|
|
if (items != 1) |
10269
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
10270
|
|
|
|
|
|
|
{ |
10271
|
2
|
|
|
|
|
|
Array RETVAL; |
10272
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10273
|
|
|
|
|
|
|
; |
10274
|
|
|
|
|
|
|
#line 43 "./xsi/index/MonotoneChain.xsi" |
10275
|
|
|
|
|
|
|
auto smart_ptr = THIS->getCoordinates(); |
10276
|
|
|
|
|
|
|
RETVAL = Helper::convert_copy(smart_ptr.get()); |
10277
|
|
|
|
|
|
|
#line 10278 "Geos_xsgen.cc" |
10278
|
|
|
|
|
|
|
{ |
10279
|
|
|
|
|
|
|
SV * RETVALSV; |
10280
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
10281
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
10282
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
10283
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10284
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
10285
|
|
|
|
|
|
|
} |
10286
|
|
|
|
|
|
|
} |
10287
|
1
|
|
|
|
|
|
XSRETURN(1); |
10288
|
1
|
50
|
|
|
|
|
}); } |
10289
|
|
|
|
|
|
|
|
10290
|
|
|
|
|
|
|
|
10291
|
|
|
|
|
|
|
|
10292
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_computeOverlaps) { xs::throw_guard(cv, [=]() |
10293
|
|
|
|
|
|
|
{ |
10294
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10295
|
1
|
50
|
|
|
|
|
if (items != 3) |
10296
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, mc, mco"); |
10297
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
10298
|
1
|
|
|
|
|
|
SP -= items; |
10299
|
|
|
|
|
|
|
{ |
10300
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10301
|
|
|
|
|
|
|
; |
10302
|
1
|
|
|
|
|
|
MonotoneChain & mc = xs::in(ST(1)); |
10303
|
|
|
|
|
|
|
; |
10304
|
1
|
|
|
|
|
|
MonotoneChainOverlapAction & mco = xs::in(ST(2)); |
10305
|
|
|
|
|
|
|
; |
10306
|
|
|
|
|
|
|
#line 48 "./xsi/index/MonotoneChain.xsi" |
10307
|
|
|
|
|
|
|
THIS->computeOverlaps(&mc, &mco); |
10308
|
|
|
|
|
|
|
#line 10309 "Geos_xsgen.cc" |
10309
|
1
|
|
|
|
|
|
PUTBACK; |
10310
|
1
|
|
|
|
|
|
return; |
10311
|
|
|
|
|
|
|
} |
10312
|
1
|
50
|
|
|
|
|
}); } |
10313
|
|
|
|
|
|
|
|
10314
|
|
|
|
|
|
|
|
10315
|
|
|
|
|
|
|
|
10316
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_setId) { xs::throw_guard(cv, [=]() |
10317
|
|
|
|
|
|
|
{ |
10318
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10319
|
1
|
50
|
|
|
|
|
if (items != 2) |
10320
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, nId"); |
10321
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
10322
|
1
|
|
|
|
|
|
SP -= items; |
10323
|
|
|
|
|
|
|
{ |
10324
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10325
|
|
|
|
|
|
|
; |
10326
|
1
|
50
|
|
|
|
|
int nId = (int)SvIV(ST(1)) |
10327
|
|
|
|
|
|
|
; |
10328
|
|
|
|
|
|
|
#line 51 "./xsi/index/MonotoneChain.xsi" |
10329
|
|
|
|
|
|
|
THIS->setId(nId); |
10330
|
|
|
|
|
|
|
#line 10331 "Geos_xsgen.cc" |
10331
|
1
|
|
|
|
|
|
PUTBACK; |
10332
|
1
|
|
|
|
|
|
return; |
10333
|
|
|
|
|
|
|
} |
10334
|
1
|
50
|
|
|
|
|
}); } |
10335
|
|
|
|
|
|
|
|
10336
|
|
|
|
|
|
|
|
10337
|
|
|
|
|
|
|
|
10338
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChain_getId) { xs::throw_guard(cv, [=]() |
10339
|
|
|
|
|
|
|
{ |
10340
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10341
|
1
|
50
|
|
|
|
|
if (items != 1) |
10342
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
10343
|
|
|
|
|
|
|
{ |
10344
|
|
|
|
|
|
|
int RETVAL; |
10345
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
10346
|
1
|
50
|
|
|
|
|
MonotoneChain* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10347
|
|
|
|
|
|
|
; |
10348
|
|
|
|
|
|
|
#line 53 "./xsi/index/MonotoneChain.xsi" |
10349
|
|
|
|
|
|
|
RETVAL = THIS->getId(); |
10350
|
|
|
|
|
|
|
#line 10351 "Geos_xsgen.cc" |
10351
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
50
|
|
|
|
|
|
10352
|
|
|
|
|
|
|
} |
10353
|
1
|
|
|
|
|
|
XSRETURN(1); |
10354
|
1
|
50
|
|
|
|
|
}); } |
10355
|
|
|
|
|
|
|
|
10356
|
|
|
|
|
|
|
|
10357
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/index/MonotoneChain.xsi' */ |
10358
|
|
|
|
|
|
|
|
10359
|
|
|
|
|
|
|
|
10360
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/index/MonotoneChainOverlapAction.xsi' from 'Geos.xs' */ |
10361
|
|
|
|
|
|
|
|
10362
|
|
|
|
|
|
|
|
10363
|
|
|
|
|
|
|
|
10364
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChainOverlapAction_new) { xs::throw_guard(cv, [=]() |
10365
|
|
|
|
|
|
|
{ |
10366
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10367
|
1
|
50
|
|
|
|
|
if (items != 1) |
10368
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*"); |
10369
|
|
|
|
|
|
|
{ |
10370
|
|
|
|
|
|
|
MonotoneChainOverlapAction * RETVAL; |
10371
|
|
|
|
|
|
|
#line 4 "./xsi/index/MonotoneChainOverlapAction.xsi" |
10372
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
10373
|
|
|
|
|
|
|
RETVAL = new MonotoneChainOverlapAction(); |
10374
|
|
|
|
|
|
|
#line 10375 "Geos_xsgen.cc" |
10375
|
|
|
|
|
|
|
{ |
10376
|
|
|
|
|
|
|
SV * RETVALSV; |
10377
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
10378
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10379
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
10380
|
|
|
|
|
|
|
} |
10381
|
|
|
|
|
|
|
} |
10382
|
1
|
|
|
|
|
|
XSRETURN(1); |
10383
|
1
|
50
|
|
|
|
|
}); } |
10384
|
|
|
|
|
|
|
|
10385
|
|
|
|
|
|
|
|
10386
|
|
|
|
|
|
|
|
10387
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChainOverlapAction_overlap) { xs::throw_guard(cv, [=]() |
10388
|
|
|
|
|
|
|
{ |
10389
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
10390
|
2
|
50
|
|
|
|
|
if (items < 3 || items > 5) |
|
|
50
|
|
|
|
|
|
10391
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, arg1, arg2, arg3= NULL, arg4= NULL"); |
10392
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
10393
|
2
|
|
|
|
|
|
SP -= items; |
10394
|
|
|
|
|
|
|
{ |
10395
|
2
|
50
|
|
|
|
|
MonotoneChainOverlapAction* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10396
|
|
|
|
|
|
|
; |
10397
|
4
|
50
|
|
|
|
|
Object arg1 = ST(1); |
10398
|
2
|
50
|
|
|
|
|
if (!arg1 && SvOK(ST(1))) throw "arg is not a blessed reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
10399
|
0
|
|
|
|
|
|
; |
10400
|
2
|
|
|
|
|
|
SV* arg2 = ST(2) |
10401
|
|
|
|
|
|
|
; |
10402
|
|
|
|
|
|
|
SV* arg3; |
10403
|
|
|
|
|
|
|
SV* arg4; |
10404
|
|
|
|
|
|
|
|
10405
|
2
|
100
|
|
|
|
|
if (items < 4) |
10406
|
1
|
|
|
|
|
|
arg3 = NULL; |
10407
|
|
|
|
|
|
|
else { |
10408
|
1
|
|
|
|
|
|
arg3 = ST(3) |
10409
|
1
|
|
|
|
|
|
; |
10410
|
|
|
|
|
|
|
} |
10411
|
|
|
|
|
|
|
|
10412
|
2
|
100
|
|
|
|
|
if (items < 5) |
10413
|
1
|
|
|
|
|
|
arg4 = NULL; |
10414
|
|
|
|
|
|
|
else { |
10415
|
1
|
|
|
|
|
|
arg4 = ST(4) |
10416
|
1
|
|
|
|
|
|
; |
10417
|
|
|
|
|
|
|
} |
10418
|
|
|
|
|
|
|
#line 7 "./xsi/index/MonotoneChainOverlapAction.xsi" |
10419
|
|
|
|
|
|
|
if (arg1.stash().name() == "Geo::Geos::LineSegment") { |
10420
|
|
|
|
|
|
|
auto& ls1 = xs::in(arg1); |
10421
|
|
|
|
|
|
|
auto& ls2 = xs::in(arg2); |
10422
|
|
|
|
|
|
|
THIS->overlap(ls1, ls2); |
10423
|
|
|
|
|
|
|
} |
10424
|
|
|
|
|
|
|
else { |
10425
|
|
|
|
|
|
|
if(!arg2) throw("undef not allowed"); |
10426
|
|
|
|
|
|
|
if(!arg4) throw("undef not allowed"); |
10427
|
|
|
|
|
|
|
auto& mc1 = xs::in(arg1); |
10428
|
|
|
|
|
|
|
auto& mc2 = xs::in(arg3); |
10429
|
|
|
|
|
|
|
std::size_t start1 = SvUV(arg2); |
10430
|
|
|
|
|
|
|
std::size_t start2 = SvUV(arg4); |
10431
|
|
|
|
|
|
|
THIS->overlap(mc1, start1, mc2, start2); |
10432
|
|
|
|
|
|
|
} |
10433
|
|
|
|
|
|
|
#line 10434 "Geos_xsgen.cc" |
10434
|
2
|
|
|
|
|
|
PUTBACK; |
10435
|
4
|
|
|
|
|
|
return; |
10436
|
|
|
|
|
|
|
} |
10437
|
2
|
50
|
|
|
|
|
}); } |
10438
|
|
|
|
|
|
|
|
10439
|
|
|
|
|
|
|
|
10440
|
|
|
|
|
|
|
|
10441
|
8
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__MonotoneChainOverlapAction_tempEnv1) { xs::throw_guard(cv, [=]() |
10442
|
|
|
|
|
|
|
{ |
10443
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
10444
|
4
|
|
|
|
|
|
dXSI32; |
10445
|
4
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
10446
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
10447
|
|
|
|
|
|
|
{ |
10448
|
|
|
|
|
|
|
Envelope * RETVAL; |
10449
|
4
|
50
|
|
|
|
|
MonotoneChainOverlapAction* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10450
|
|
|
|
|
|
|
; |
10451
|
|
|
|
|
|
|
SV* newval; |
10452
|
|
|
|
|
|
|
|
10453
|
4
|
50
|
|
|
|
|
if (items < 2) |
10454
|
4
|
|
|
|
|
|
newval = NULL; |
10455
|
|
|
|
|
|
|
else { |
10456
|
0
|
|
|
|
|
|
newval = ST(1) |
10457
|
0
|
|
|
|
|
|
; |
10458
|
|
|
|
|
|
|
} |
10459
|
|
|
|
|
|
|
#line 24 "./xsi/index/MonotoneChainOverlapAction.xsi" |
10460
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
10461
|
|
|
|
|
|
|
Envelope* val; |
10462
|
|
|
|
|
|
|
switch (ix) { |
10463
|
|
|
|
|
|
|
case 0: val = &THIS->tempEnv1; break; |
10464
|
|
|
|
|
|
|
default: val = &THIS->tempEnv2; break; |
10465
|
|
|
|
|
|
|
} |
10466
|
|
|
|
|
|
|
if (newval) { |
10467
|
|
|
|
|
|
|
auto e = xs::in(newval); |
10468
|
|
|
|
|
|
|
*val = *e; |
10469
|
|
|
|
|
|
|
} |
10470
|
|
|
|
|
|
|
RETVAL = new Envelope(*val); |
10471
|
|
|
|
|
|
|
#line 10472 "Geos_xsgen.cc" |
10472
|
|
|
|
|
|
|
{ |
10473
|
|
|
|
|
|
|
SV * RETVALSV; |
10474
|
4
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
10475
|
4
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10476
|
4
|
|
|
|
|
|
ST(0) = RETVALSV; |
10477
|
|
|
|
|
|
|
} |
10478
|
|
|
|
|
|
|
} |
10479
|
4
|
|
|
|
|
|
XSRETURN(1); |
10480
|
4
|
50
|
|
|
|
|
}); } |
10481
|
|
|
|
|
|
|
|
10482
|
|
|
|
|
|
|
|
10483
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/index/MonotoneChainOverlapAction.xsi' */ |
10484
|
|
|
|
|
|
|
|
10485
|
|
|
|
|
|
|
|
10486
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/index/SpatialIndex.xsi' from 'Geos.xs' */ |
10487
|
|
|
|
|
|
|
|
10488
|
|
|
|
|
|
|
|
10489
|
|
|
|
|
|
|
|
10490
|
14
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__SpatialIndex_query) { xs::throw_guard(cv, [=]() |
10491
|
|
|
|
|
|
|
{ |
10492
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
10493
|
7
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
50
|
|
|
|
|
|
10494
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, env, arg= NULL"); |
10495
|
|
|
|
|
|
|
{ |
10496
|
12
|
|
|
|
|
|
Array RETVAL; |
10497
|
7
|
50
|
|
|
|
|
SpatialIndex* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10498
|
|
|
|
|
|
|
; |
10499
|
7
|
50
|
|
|
|
|
Envelope& env = xs::in(ST(1)); |
10500
|
|
|
|
|
|
|
; |
10501
|
|
|
|
|
|
|
SV* arg; |
10502
|
|
|
|
|
|
|
|
10503
|
7
|
100
|
|
|
|
|
if (items < 3) |
10504
|
5
|
|
|
|
|
|
arg = NULL; |
10505
|
|
|
|
|
|
|
else { |
10506
|
2
|
|
|
|
|
|
arg = ST(2) |
10507
|
2
|
|
|
|
|
|
; |
10508
|
|
|
|
|
|
|
} |
10509
|
|
|
|
|
|
|
#line 5 "./xsi/index/SpatialIndex.xsi" |
10510
|
|
|
|
|
|
|
Object me {ST(0)}; |
10511
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker_SVs_map); |
10512
|
|
|
|
|
|
|
auto real_payload = static_cast(payload.ptr); |
10513
|
|
|
|
|
|
|
|
10514
|
|
|
|
|
|
|
if (!arg) { |
10515
|
|
|
|
|
|
|
std::vector v; |
10516
|
|
|
|
|
|
|
THIS->query(&env, v); |
10517
|
|
|
|
|
|
|
RETVAL = Helper::wrap_inc_SVs(&v, real_payload->map); |
10518
|
|
|
|
|
|
|
} |
10519
|
|
|
|
|
|
|
else { |
10520
|
|
|
|
|
|
|
Sub visitor {arg}; |
10521
|
|
|
|
|
|
|
if (!visitor) throw "Unsupported argument"; |
10522
|
|
|
|
|
|
|
SubItemVisitor v{visitor, real_payload->map}; |
10523
|
|
|
|
|
|
|
THIS->query(&env, v); |
10524
|
|
|
|
|
|
|
XSRETURN_UNDEF; |
10525
|
|
|
|
|
|
|
} |
10526
|
|
|
|
|
|
|
#line 10527 "Geos_xsgen.cc" |
10527
|
|
|
|
|
|
|
{ |
10528
|
|
|
|
|
|
|
SV * RETVALSV; |
10529
|
5
|
|
|
|
|
|
RETVALSV = NULL; |
10530
|
5
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
10531
|
5
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
10532
|
5
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10533
|
7
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
10534
|
|
|
|
|
|
|
} |
10535
|
|
|
|
|
|
|
} |
10536
|
7
|
|
|
|
|
|
XSRETURN(1); |
10537
|
7
|
50
|
|
|
|
|
}); } |
10538
|
|
|
|
|
|
|
|
10539
|
|
|
|
|
|
|
|
10540
|
|
|
|
|
|
|
|
10541
|
32
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__SpatialIndex_insert) { xs::throw_guard(cv, [=]() |
10542
|
|
|
|
|
|
|
{ |
10543
|
16
|
|
|
|
|
|
dVAR; dXSARGS; |
10544
|
16
|
50
|
|
|
|
|
if (items != 3) |
10545
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, env, item"); |
10546
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
10547
|
16
|
|
|
|
|
|
SP -= items; |
10548
|
|
|
|
|
|
|
{ |
10549
|
16
|
50
|
|
|
|
|
SpatialIndex* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10550
|
|
|
|
|
|
|
; |
10551
|
16
|
50
|
|
|
|
|
Envelope& env = xs::in(ST(1)); |
10552
|
|
|
|
|
|
|
; |
10553
|
16
|
|
|
|
|
|
SV* item = ST(2) |
10554
|
|
|
|
|
|
|
; |
10555
|
|
|
|
|
|
|
#line 24 "./xsi/index/SpatialIndex.xsi" |
10556
|
|
|
|
|
|
|
Object me{ST(0)}; |
10557
|
|
|
|
|
|
|
|
10558
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker_SVs_map); |
10559
|
|
|
|
|
|
|
auto real_payload = static_cast(payload.ptr); |
10560
|
|
|
|
|
|
|
SV* value = Helper::store_sv(item, real_payload->map); |
10561
|
|
|
|
|
|
|
THIS->insert(&env, value); |
10562
|
|
|
|
|
|
|
#line 10563 "Geos_xsgen.cc" |
10563
|
16
|
|
|
|
|
|
PUTBACK; |
10564
|
32
|
|
|
|
|
|
return; |
10565
|
|
|
|
|
|
|
} |
10566
|
16
|
50
|
|
|
|
|
}); } |
10567
|
|
|
|
|
|
|
|
10568
|
|
|
|
|
|
|
|
10569
|
|
|
|
|
|
|
|
10570
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__SpatialIndex_remove) { xs::throw_guard(cv, [=]() |
10571
|
|
|
|
|
|
|
{ |
10572
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
10573
|
3
|
50
|
|
|
|
|
if (items != 3) |
10574
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, env, item"); |
10575
|
|
|
|
|
|
|
{ |
10576
|
|
|
|
|
|
|
bool RETVAL; |
10577
|
3
|
50
|
|
|
|
|
SpatialIndex* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10578
|
|
|
|
|
|
|
; |
10579
|
3
|
50
|
|
|
|
|
Envelope& env = xs::in(ST(1)); |
10580
|
|
|
|
|
|
|
; |
10581
|
3
|
|
|
|
|
|
SV * item = ST(2) |
10582
|
|
|
|
|
|
|
; |
10583
|
|
|
|
|
|
|
#line 33 "./xsi/index/SpatialIndex.xsi" |
10584
|
|
|
|
|
|
|
Object me{ST(0)}; |
10585
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker_SVs_map); |
10586
|
|
|
|
|
|
|
auto real_payload = static_cast(payload.ptr); |
10587
|
|
|
|
|
|
|
|
10588
|
|
|
|
|
|
|
SV* value = hv_delete_ent(real_payload->map, item, 0, 0); |
10589
|
|
|
|
|
|
|
if (!value) throw "value is n/a in hash"; |
10590
|
|
|
|
|
|
|
|
10591
|
|
|
|
|
|
|
RETVAL = THIS->remove(&env, value); |
10592
|
|
|
|
|
|
|
#line 10593 "Geos_xsgen.cc" |
10593
|
3
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
10594
|
|
|
|
|
|
|
} |
10595
|
3
|
|
|
|
|
|
XSRETURN(1); |
10596
|
3
|
50
|
|
|
|
|
}); } |
10597
|
|
|
|
|
|
|
|
10598
|
|
|
|
|
|
|
|
10599
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/index/SpatialIndex.xsi' */ |
10600
|
|
|
|
|
|
|
|
10601
|
|
|
|
|
|
|
|
10602
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/index/Quadtree.xsi' from 'Geos.xs' */ |
10603
|
|
|
|
|
|
|
|
10604
|
|
|
|
|
|
|
|
10605
|
|
|
|
|
|
|
|
10606
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__Quadtree_new) { xs::throw_guard(cv, [=]() |
10607
|
|
|
|
|
|
|
{ |
10608
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
10609
|
6
|
50
|
|
|
|
|
if (items != 1) |
10610
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV"); |
10611
|
|
|
|
|
|
|
{ |
10612
|
12
|
|
|
|
|
|
Sv RETVAL; |
10613
|
|
|
|
|
|
|
#line 5 "./xsi/index/Quadtree.xsi" |
10614
|
|
|
|
|
|
|
Object wrapped = xs::out(new quadtree::Quadtree()); |
10615
|
|
|
|
|
|
|
auto payload = new SVs_map_payload(); |
10616
|
|
|
|
|
|
|
wrapped.payload_attach(payload, &payload_marker_SVs_map); |
10617
|
|
|
|
|
|
|
|
10618
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
10619
|
|
|
|
|
|
|
#line 10620 "Geos_xsgen.cc" |
10620
|
|
|
|
|
|
|
{ |
10621
|
|
|
|
|
|
|
SV * RETVALSV; |
10622
|
6
|
|
|
|
|
|
RETVALSV = NULL; |
10623
|
6
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
10624
|
6
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
10625
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
10626
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
10627
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
10628
|
|
|
|
|
|
|
case SVt_PVCV: |
10629
|
|
|
|
|
|
|
case SVt_PVIO: |
10630
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
10631
|
0
|
|
|
|
|
|
break; |
10632
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
10633
|
|
|
|
|
|
|
} |
10634
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10635
|
6
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
10636
|
|
|
|
|
|
|
} |
10637
|
|
|
|
|
|
|
} |
10638
|
6
|
|
|
|
|
|
XSRETURN(1); |
10639
|
6
|
50
|
|
|
|
|
}); } |
10640
|
|
|
|
|
|
|
|
10641
|
|
|
|
|
|
|
|
10642
|
|
|
|
|
|
|
|
10643
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__Quadtree_depth) { xs::throw_guard(cv, [=]() |
10644
|
|
|
|
|
|
|
{ |
10645
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10646
|
1
|
50
|
|
|
|
|
if (items != 1) |
10647
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
10648
|
|
|
|
|
|
|
{ |
10649
|
|
|
|
|
|
|
int RETVAL; |
10650
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
10651
|
1
|
50
|
|
|
|
|
quadtree::Quadtree* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10652
|
|
|
|
|
|
|
; |
10653
|
|
|
|
|
|
|
#line 12 "./xsi/index/Quadtree.xsi" |
10654
|
|
|
|
|
|
|
RETVAL = THIS->depth(); |
10655
|
|
|
|
|
|
|
#line 10656 "Geos_xsgen.cc" |
10656
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
50
|
|
|
|
|
|
10657
|
|
|
|
|
|
|
} |
10658
|
1
|
|
|
|
|
|
XSRETURN(1); |
10659
|
1
|
50
|
|
|
|
|
}); } |
10660
|
|
|
|
|
|
|
|
10661
|
|
|
|
|
|
|
|
10662
|
|
|
|
|
|
|
|
10663
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__Quadtree_size) { xs::throw_guard(cv, [=]() |
10664
|
|
|
|
|
|
|
{ |
10665
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10666
|
1
|
50
|
|
|
|
|
if (items != 1) |
10667
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
10668
|
|
|
|
|
|
|
{ |
10669
|
|
|
|
|
|
|
int RETVAL; |
10670
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
10671
|
1
|
50
|
|
|
|
|
quadtree::Quadtree* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10672
|
|
|
|
|
|
|
; |
10673
|
|
|
|
|
|
|
#line 14 "./xsi/index/Quadtree.xsi" |
10674
|
|
|
|
|
|
|
RETVAL = THIS->size(); |
10675
|
|
|
|
|
|
|
#line 10676 "Geos_xsgen.cc" |
10676
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
50
|
|
|
|
|
|
10677
|
|
|
|
|
|
|
} |
10678
|
1
|
|
|
|
|
|
XSRETURN(1); |
10679
|
1
|
50
|
|
|
|
|
}); } |
10680
|
|
|
|
|
|
|
|
10681
|
|
|
|
|
|
|
|
10682
|
|
|
|
|
|
|
|
10683
|
12
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__Quadtree_queryAll) { xs::throw_guard(cv, [=]() |
10684
|
|
|
|
|
|
|
{ |
10685
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
10686
|
6
|
50
|
|
|
|
|
if (items != 1) |
10687
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
10688
|
|
|
|
|
|
|
{ |
10689
|
12
|
|
|
|
|
|
Array RETVAL; |
10690
|
6
|
50
|
|
|
|
|
quadtree::Quadtree* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10691
|
|
|
|
|
|
|
; |
10692
|
|
|
|
|
|
|
#line 17 "./xsi/index/Quadtree.xsi" |
10693
|
|
|
|
|
|
|
Object me{ST(0)}; |
10694
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker_SVs_map); |
10695
|
|
|
|
|
|
|
auto real_payload = static_cast(payload.ptr); |
10696
|
|
|
|
|
|
|
|
10697
|
|
|
|
|
|
|
std::unique_ptr> holder {THIS->queryAll()}; |
10698
|
|
|
|
|
|
|
RETVAL = Helper::wrap_inc_SVs(holder.get(), real_payload->map); |
10699
|
|
|
|
|
|
|
#line 10700 "Geos_xsgen.cc" |
10700
|
|
|
|
|
|
|
{ |
10701
|
|
|
|
|
|
|
SV * RETVALSV; |
10702
|
6
|
|
|
|
|
|
RETVALSV = NULL; |
10703
|
6
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
10704
|
6
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
10705
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10706
|
6
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
10707
|
|
|
|
|
|
|
} |
10708
|
|
|
|
|
|
|
} |
10709
|
6
|
|
|
|
|
|
XSRETURN(1); |
10710
|
6
|
50
|
|
|
|
|
}); } |
10711
|
|
|
|
|
|
|
|
10712
|
|
|
|
|
|
|
|
10713
|
|
|
|
|
|
|
|
10714
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__Quadtree_toString) { xs::throw_guard(cv, [=]() |
10715
|
|
|
|
|
|
|
{ |
10716
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
10717
|
2
|
50
|
|
|
|
|
if (items < 1) |
10718
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
10719
|
|
|
|
|
|
|
{ |
10720
|
4
|
|
|
|
|
|
std::string RETVAL; |
10721
|
2
|
100
|
|
|
|
|
dXSTARG; |
|
|
50
|
|
|
|
|
|
10722
|
2
|
50
|
|
|
|
|
quadtree::Quadtree* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10723
|
|
|
|
|
|
|
; |
10724
|
|
|
|
|
|
|
#line 25 "./xsi/index/Quadtree.xsi" |
10725
|
|
|
|
|
|
|
RETVAL = THIS->toString(); |
10726
|
|
|
|
|
|
|
#line 10727 "Geos_xsgen.cc" |
10727
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10728
|
|
|
|
|
|
|
} |
10729
|
2
|
|
|
|
|
|
XSRETURN(1); |
10730
|
2
|
50
|
|
|
|
|
}); } |
10731
|
|
|
|
|
|
|
|
10732
|
|
|
|
|
|
|
|
10733
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/index/Quadtree.xsi' */ |
10734
|
|
|
|
|
|
|
|
10735
|
|
|
|
|
|
|
|
10736
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/index/STRtree.xsi' from 'Geos.xs' */ |
10737
|
|
|
|
|
|
|
|
10738
|
|
|
|
|
|
|
|
10739
|
|
|
|
|
|
|
|
10740
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Index__STRtree_new) { xs::throw_guard(cv, [=]() |
10741
|
|
|
|
|
|
|
{ |
10742
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
10743
|
2
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
50
|
|
|
|
|
|
10744
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV, nodeCapacity= 10"); |
10745
|
|
|
|
|
|
|
{ |
10746
|
4
|
|
|
|
|
|
Sv RETVAL; |
10747
|
|
|
|
|
|
|
std::size_t nodeCapacity; |
10748
|
|
|
|
|
|
|
|
10749
|
2
|
50
|
|
|
|
|
if (items < 2) |
10750
|
2
|
|
|
|
|
|
nodeCapacity = 10; |
10751
|
|
|
|
|
|
|
else { |
10752
|
0
|
0
|
|
|
|
|
nodeCapacity = xs::in(ST(1)); |
10753
|
|
|
|
|
|
|
; |
10754
|
|
|
|
|
|
|
} |
10755
|
|
|
|
|
|
|
#line 5 "./xsi/index/STRtree.xsi" |
10756
|
|
|
|
|
|
|
Object wrapped = xs::out(new strtree::STRtree(nodeCapacity)); |
10757
|
|
|
|
|
|
|
auto payload = new SVs_map_payload(); |
10758
|
|
|
|
|
|
|
wrapped.payload_attach(payload, &payload_marker_SVs_map); |
10759
|
|
|
|
|
|
|
|
10760
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
10761
|
|
|
|
|
|
|
#line 10762 "Geos_xsgen.cc" |
10762
|
|
|
|
|
|
|
{ |
10763
|
|
|
|
|
|
|
SV * RETVALSV; |
10764
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
10765
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
10766
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
10767
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
10768
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
10769
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
10770
|
|
|
|
|
|
|
case SVt_PVCV: |
10771
|
|
|
|
|
|
|
case SVt_PVIO: |
10772
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
10773
|
0
|
|
|
|
|
|
break; |
10774
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
10775
|
|
|
|
|
|
|
} |
10776
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10777
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
10778
|
|
|
|
|
|
|
} |
10779
|
|
|
|
|
|
|
} |
10780
|
2
|
|
|
|
|
|
XSRETURN(1); |
10781
|
2
|
50
|
|
|
|
|
}); } |
10782
|
|
|
|
|
|
|
|
10783
|
|
|
|
|
|
|
|
10784
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/index/STRtree.xsi' */ |
10785
|
|
|
|
|
|
|
|
10786
|
|
|
|
|
|
|
|
10787
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/precision.xsi' from 'Geos.xs' */ |
10788
|
|
|
|
|
|
|
|
10789
|
|
|
|
|
|
|
|
10790
|
|
|
|
|
|
|
|
10791
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_signExpBits) { xs::throw_guard(cv, [=]() |
10792
|
|
|
|
|
|
|
{ |
10793
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10794
|
1
|
50
|
|
|
|
|
if (items != 1) |
10795
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "num"); |
10796
|
|
|
|
|
|
|
{ |
10797
|
|
|
|
|
|
|
int64 RETVAL; |
10798
|
1
|
50
|
|
|
|
|
int64 num = xs::in(ST(0)); |
10799
|
|
|
|
|
|
|
; |
10800
|
|
|
|
|
|
|
#line 5 "./xsi/precision.xsi" |
10801
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
10802
|
|
|
|
|
|
|
RETVAL = CommonBits::signExpBits(num); |
10803
|
|
|
|
|
|
|
#line 10804 "Geos_xsgen.cc" |
10804
|
|
|
|
|
|
|
{ |
10805
|
|
|
|
|
|
|
SV * RETVALSV; |
10806
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
10807
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10808
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
10809
|
|
|
|
|
|
|
} |
10810
|
|
|
|
|
|
|
} |
10811
|
1
|
|
|
|
|
|
XSRETURN(1); |
10812
|
1
|
50
|
|
|
|
|
}); } |
10813
|
|
|
|
|
|
|
|
10814
|
|
|
|
|
|
|
|
10815
|
|
|
|
|
|
|
|
10816
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_numCommonMostSigMantissaBits) { xs::throw_guard(cv, [=]() |
10817
|
|
|
|
|
|
|
{ |
10818
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10819
|
1
|
50
|
|
|
|
|
if (items != 2) |
10820
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "num1, num2"); |
10821
|
|
|
|
|
|
|
{ |
10822
|
|
|
|
|
|
|
int RETVAL; |
10823
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
10824
|
1
|
50
|
|
|
|
|
int64 num1 = xs::in(ST(0)); |
10825
|
|
|
|
|
|
|
; |
10826
|
1
|
50
|
|
|
|
|
int64 num2 = xs::in(ST(1)); |
10827
|
|
|
|
|
|
|
; |
10828
|
|
|
|
|
|
|
#line 9 "./xsi/precision.xsi" |
10829
|
|
|
|
|
|
|
RETVAL = CommonBits::numCommonMostSigMantissaBits(num1, num2); |
10830
|
|
|
|
|
|
|
#line 10831 "Geos_xsgen.cc" |
10831
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
50
|
|
|
|
|
|
10832
|
|
|
|
|
|
|
} |
10833
|
1
|
|
|
|
|
|
XSRETURN(1); |
10834
|
1
|
50
|
|
|
|
|
}); } |
10835
|
|
|
|
|
|
|
|
10836
|
|
|
|
|
|
|
|
10837
|
|
|
|
|
|
|
|
10838
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_zeroLowerBits) { xs::throw_guard(cv, [=]() |
10839
|
|
|
|
|
|
|
{ |
10840
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10841
|
1
|
50
|
|
|
|
|
if (items != 2) |
10842
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "bits, nBits"); |
10843
|
|
|
|
|
|
|
{ |
10844
|
|
|
|
|
|
|
int64 RETVAL; |
10845
|
1
|
50
|
|
|
|
|
int64 bits = xs::in(ST(0)); |
10846
|
|
|
|
|
|
|
; |
10847
|
1
|
50
|
|
|
|
|
int nBits = (int)SvIV(ST(1)) |
|
|
0
|
|
|
|
|
|
10848
|
|
|
|
|
|
|
; |
10849
|
|
|
|
|
|
|
#line 13 "./xsi/precision.xsi" |
10850
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
10851
|
|
|
|
|
|
|
RETVAL = CommonBits::zeroLowerBits(bits, nBits); |
10852
|
|
|
|
|
|
|
#line 10853 "Geos_xsgen.cc" |
10853
|
|
|
|
|
|
|
{ |
10854
|
|
|
|
|
|
|
SV * RETVALSV; |
10855
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
10856
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10857
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
10858
|
|
|
|
|
|
|
} |
10859
|
|
|
|
|
|
|
} |
10860
|
1
|
|
|
|
|
|
XSRETURN(1); |
10861
|
1
|
50
|
|
|
|
|
}); } |
10862
|
|
|
|
|
|
|
|
10863
|
|
|
|
|
|
|
|
10864
|
|
|
|
|
|
|
|
10865
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_getBit) { xs::throw_guard(cv, [=]() |
10866
|
|
|
|
|
|
|
{ |
10867
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
10868
|
1
|
50
|
|
|
|
|
if (items != 2) |
10869
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "bits, i"); |
10870
|
|
|
|
|
|
|
{ |
10871
|
|
|
|
|
|
|
int RETVAL; |
10872
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
10873
|
1
|
50
|
|
|
|
|
int64 bits = xs::in(ST(0)); |
10874
|
|
|
|
|
|
|
; |
10875
|
1
|
50
|
|
|
|
|
int i = (int)SvIV(ST(1)) |
|
|
0
|
|
|
|
|
|
10876
|
|
|
|
|
|
|
; |
10877
|
|
|
|
|
|
|
#line 17 "./xsi/precision.xsi" |
10878
|
|
|
|
|
|
|
RETVAL = CommonBits::getBit (bits, i); |
10879
|
|
|
|
|
|
|
#line 10880 "Geos_xsgen.cc" |
10880
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
50
|
|
|
|
|
|
10881
|
|
|
|
|
|
|
} |
10882
|
1
|
|
|
|
|
|
XSRETURN(1); |
10883
|
1
|
50
|
|
|
|
|
}); } |
10884
|
|
|
|
|
|
|
|
10885
|
|
|
|
|
|
|
|
10886
|
|
|
|
|
|
|
|
10887
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_commonIntersection) { xs::throw_guard(cv, [=]() |
10888
|
|
|
|
|
|
|
{ |
10889
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
10890
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
50
|
|
|
|
|
|
10891
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1, nReturnToOriginalPrecision= false"); |
10892
|
|
|
|
|
|
|
{ |
10893
|
4
|
|
|
|
|
|
Sv RETVAL; |
10894
|
2
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
10895
|
|
|
|
|
|
|
; |
10896
|
2
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
10897
|
|
|
|
|
|
|
; |
10898
|
|
|
|
|
|
|
bool nReturnToOriginalPrecision; |
10899
|
|
|
|
|
|
|
|
10900
|
2
|
100
|
|
|
|
|
if (items < 3) |
10901
|
1
|
|
|
|
|
|
nReturnToOriginalPrecision = false; |
10902
|
|
|
|
|
|
|
else { |
10903
|
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
|
|
|
|
|
|
10904
|
1
|
|
|
|
|
|
; |
10905
|
|
|
|
|
|
|
} |
10906
|
|
|
|
|
|
|
#line 21 "./xsi/precision.xsi" |
10907
|
|
|
|
|
|
|
RETVAL = Helper::uplift(CommonBitsOp(nReturnToOriginalPrecision).intersection(&g0, &g1)); |
10908
|
|
|
|
|
|
|
#line 10909 "Geos_xsgen.cc" |
10909
|
|
|
|
|
|
|
{ |
10910
|
|
|
|
|
|
|
SV * RETVALSV; |
10911
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
10912
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
10913
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
10914
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
10915
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
10916
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
10917
|
|
|
|
|
|
|
case SVt_PVCV: |
10918
|
|
|
|
|
|
|
case SVt_PVIO: |
10919
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
10920
|
0
|
|
|
|
|
|
break; |
10921
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
10922
|
|
|
|
|
|
|
} |
10923
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10924
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
10925
|
|
|
|
|
|
|
} |
10926
|
|
|
|
|
|
|
} |
10927
|
2
|
|
|
|
|
|
XSRETURN(1); |
10928
|
2
|
50
|
|
|
|
|
}); } |
10929
|
|
|
|
|
|
|
|
10930
|
|
|
|
|
|
|
|
10931
|
|
|
|
|
|
|
|
10932
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_commonUnion) { xs::throw_guard(cv, [=]() |
10933
|
|
|
|
|
|
|
{ |
10934
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
10935
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
50
|
|
|
|
|
|
10936
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1, nReturnToOriginalPrecision= false"); |
10937
|
|
|
|
|
|
|
{ |
10938
|
4
|
|
|
|
|
|
Sv RETVAL; |
10939
|
2
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
10940
|
|
|
|
|
|
|
; |
10941
|
2
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
10942
|
|
|
|
|
|
|
; |
10943
|
|
|
|
|
|
|
bool nReturnToOriginalPrecision; |
10944
|
|
|
|
|
|
|
|
10945
|
2
|
100
|
|
|
|
|
if (items < 3) |
10946
|
1
|
|
|
|
|
|
nReturnToOriginalPrecision = false; |
10947
|
|
|
|
|
|
|
else { |
10948
|
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
|
|
|
|
|
|
10949
|
1
|
|
|
|
|
|
; |
10950
|
|
|
|
|
|
|
} |
10951
|
|
|
|
|
|
|
#line 25 "./xsi/precision.xsi" |
10952
|
|
|
|
|
|
|
RETVAL = Helper::uplift(CommonBitsOp(nReturnToOriginalPrecision).Union(&g0, &g1)); |
10953
|
|
|
|
|
|
|
#line 10954 "Geos_xsgen.cc" |
10954
|
|
|
|
|
|
|
{ |
10955
|
|
|
|
|
|
|
SV * RETVALSV; |
10956
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
10957
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
10958
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
10959
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
10960
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
10961
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
10962
|
|
|
|
|
|
|
case SVt_PVCV: |
10963
|
|
|
|
|
|
|
case SVt_PVIO: |
10964
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
10965
|
0
|
|
|
|
|
|
break; |
10966
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
10967
|
|
|
|
|
|
|
} |
10968
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
10969
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
10970
|
|
|
|
|
|
|
} |
10971
|
|
|
|
|
|
|
} |
10972
|
2
|
|
|
|
|
|
XSRETURN(1); |
10973
|
2
|
50
|
|
|
|
|
}); } |
10974
|
|
|
|
|
|
|
|
10975
|
|
|
|
|
|
|
|
10976
|
|
|
|
|
|
|
|
10977
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_commonDifference) { xs::throw_guard(cv, [=]() |
10978
|
|
|
|
|
|
|
{ |
10979
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
10980
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
50
|
|
|
|
|
|
10981
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1, nReturnToOriginalPrecision= false"); |
10982
|
|
|
|
|
|
|
{ |
10983
|
4
|
|
|
|
|
|
Sv RETVAL; |
10984
|
2
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
10985
|
|
|
|
|
|
|
; |
10986
|
2
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
10987
|
|
|
|
|
|
|
; |
10988
|
|
|
|
|
|
|
bool nReturnToOriginalPrecision; |
10989
|
|
|
|
|
|
|
|
10990
|
2
|
100
|
|
|
|
|
if (items < 3) |
10991
|
1
|
|
|
|
|
|
nReturnToOriginalPrecision = false; |
10992
|
|
|
|
|
|
|
else { |
10993
|
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
|
|
|
|
|
|
10994
|
1
|
|
|
|
|
|
; |
10995
|
|
|
|
|
|
|
} |
10996
|
|
|
|
|
|
|
#line 29 "./xsi/precision.xsi" |
10997
|
|
|
|
|
|
|
RETVAL = Helper::uplift(CommonBitsOp(nReturnToOriginalPrecision).difference(&g0, &g1)); |
10998
|
|
|
|
|
|
|
#line 10999 "Geos_xsgen.cc" |
10999
|
|
|
|
|
|
|
{ |
11000
|
|
|
|
|
|
|
SV * RETVALSV; |
11001
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
11002
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11003
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11004
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11005
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11006
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11007
|
|
|
|
|
|
|
case SVt_PVCV: |
11008
|
|
|
|
|
|
|
case SVt_PVIO: |
11009
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11010
|
0
|
|
|
|
|
|
break; |
11011
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11012
|
|
|
|
|
|
|
} |
11013
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11014
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11015
|
|
|
|
|
|
|
} |
11016
|
|
|
|
|
|
|
} |
11017
|
2
|
|
|
|
|
|
XSRETURN(1); |
11018
|
2
|
50
|
|
|
|
|
}); } |
11019
|
|
|
|
|
|
|
|
11020
|
|
|
|
|
|
|
|
11021
|
|
|
|
|
|
|
|
11022
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_commonSymDifference) { xs::throw_guard(cv, [=]() |
11023
|
|
|
|
|
|
|
{ |
11024
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
11025
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
50
|
|
|
|
|
|
11026
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1, nReturnToOriginalPrecision= false"); |
11027
|
|
|
|
|
|
|
{ |
11028
|
4
|
|
|
|
|
|
Sv RETVAL; |
11029
|
2
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
11030
|
|
|
|
|
|
|
; |
11031
|
2
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
11032
|
|
|
|
|
|
|
; |
11033
|
|
|
|
|
|
|
bool nReturnToOriginalPrecision; |
11034
|
|
|
|
|
|
|
|
11035
|
2
|
100
|
|
|
|
|
if (items < 3) |
11036
|
1
|
|
|
|
|
|
nReturnToOriginalPrecision = false; |
11037
|
|
|
|
|
|
|
else { |
11038
|
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
|
|
|
|
|
|
11039
|
1
|
|
|
|
|
|
; |
11040
|
|
|
|
|
|
|
} |
11041
|
|
|
|
|
|
|
#line 33 "./xsi/precision.xsi" |
11042
|
|
|
|
|
|
|
RETVAL = Helper::uplift(CommonBitsOp(nReturnToOriginalPrecision).symDifference(&g0, &g1)); |
11043
|
|
|
|
|
|
|
#line 11044 "Geos_xsgen.cc" |
11044
|
|
|
|
|
|
|
{ |
11045
|
|
|
|
|
|
|
SV * RETVALSV; |
11046
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
11047
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11048
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11049
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11050
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11051
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11052
|
|
|
|
|
|
|
case SVt_PVCV: |
11053
|
|
|
|
|
|
|
case SVt_PVIO: |
11054
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11055
|
0
|
|
|
|
|
|
break; |
11056
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11057
|
|
|
|
|
|
|
} |
11058
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11059
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11060
|
|
|
|
|
|
|
} |
11061
|
|
|
|
|
|
|
} |
11062
|
2
|
|
|
|
|
|
XSRETURN(1); |
11063
|
2
|
50
|
|
|
|
|
}); } |
11064
|
|
|
|
|
|
|
|
11065
|
|
|
|
|
|
|
|
11066
|
|
|
|
|
|
|
|
11067
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_commonBuffer) { xs::throw_guard(cv, [=]() |
11068
|
|
|
|
|
|
|
{ |
11069
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
11070
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
50
|
|
|
|
|
|
11071
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, distance, nReturnToOriginalPrecision= false"); |
11072
|
|
|
|
|
|
|
{ |
11073
|
4
|
|
|
|
|
|
Sv RETVAL; |
11074
|
2
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
11075
|
|
|
|
|
|
|
; |
11076
|
2
|
50
|
|
|
|
|
double distance = (double)SvNV(ST(1)) |
|
|
0
|
|
|
|
|
|
11077
|
|
|
|
|
|
|
; |
11078
|
|
|
|
|
|
|
bool nReturnToOriginalPrecision; |
11079
|
|
|
|
|
|
|
|
11080
|
2
|
100
|
|
|
|
|
if (items < 3) |
11081
|
1
|
|
|
|
|
|
nReturnToOriginalPrecision = false; |
11082
|
|
|
|
|
|
|
else { |
11083
|
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
|
|
|
|
|
|
11084
|
1
|
|
|
|
|
|
; |
11085
|
|
|
|
|
|
|
} |
11086
|
|
|
|
|
|
|
#line 37 "./xsi/precision.xsi" |
11087
|
|
|
|
|
|
|
RETVAL = Helper::uplift(CommonBitsOp(nReturnToOriginalPrecision).buffer(&g0, distance)); |
11088
|
|
|
|
|
|
|
#line 11089 "Geos_xsgen.cc" |
11089
|
|
|
|
|
|
|
{ |
11090
|
|
|
|
|
|
|
SV * RETVALSV; |
11091
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
11092
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11093
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11094
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11095
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11096
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11097
|
|
|
|
|
|
|
case SVt_PVCV: |
11098
|
|
|
|
|
|
|
case SVt_PVIO: |
11099
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11100
|
0
|
|
|
|
|
|
break; |
11101
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11102
|
|
|
|
|
|
|
} |
11103
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11104
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11105
|
|
|
|
|
|
|
} |
11106
|
|
|
|
|
|
|
} |
11107
|
2
|
|
|
|
|
|
XSRETURN(1); |
11108
|
2
|
50
|
|
|
|
|
}); } |
11109
|
|
|
|
|
|
|
|
11110
|
|
|
|
|
|
|
|
11111
|
|
|
|
|
|
|
|
11112
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_enhancedIntersection) { xs::throw_guard(cv, [=]() |
11113
|
|
|
|
|
|
|
{ |
11114
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11115
|
1
|
50
|
|
|
|
|
if (items != 2) |
11116
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
11117
|
|
|
|
|
|
|
{ |
11118
|
2
|
|
|
|
|
|
Sv RETVAL; |
11119
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
11120
|
|
|
|
|
|
|
; |
11121
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
11122
|
|
|
|
|
|
|
; |
11123
|
|
|
|
|
|
|
#line 41 "./xsi/precision.xsi" |
11124
|
|
|
|
|
|
|
RETVAL = Helper::uplift(EnhancedPrecisionOp().intersection(&g0, &g1)); |
11125
|
|
|
|
|
|
|
#line 11126 "Geos_xsgen.cc" |
11126
|
|
|
|
|
|
|
{ |
11127
|
|
|
|
|
|
|
SV * RETVALSV; |
11128
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11129
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11130
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11131
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11132
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11133
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11134
|
|
|
|
|
|
|
case SVt_PVCV: |
11135
|
|
|
|
|
|
|
case SVt_PVIO: |
11136
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11137
|
0
|
|
|
|
|
|
break; |
11138
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11139
|
|
|
|
|
|
|
} |
11140
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11141
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11142
|
|
|
|
|
|
|
} |
11143
|
|
|
|
|
|
|
} |
11144
|
1
|
|
|
|
|
|
XSRETURN(1); |
11145
|
1
|
50
|
|
|
|
|
}); } |
11146
|
|
|
|
|
|
|
|
11147
|
|
|
|
|
|
|
|
11148
|
|
|
|
|
|
|
|
11149
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_enhancedUnion) { xs::throw_guard(cv, [=]() |
11150
|
|
|
|
|
|
|
{ |
11151
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11152
|
1
|
50
|
|
|
|
|
if (items != 2) |
11153
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
11154
|
|
|
|
|
|
|
{ |
11155
|
2
|
|
|
|
|
|
Sv RETVAL; |
11156
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
11157
|
|
|
|
|
|
|
; |
11158
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
11159
|
|
|
|
|
|
|
; |
11160
|
|
|
|
|
|
|
#line 45 "./xsi/precision.xsi" |
11161
|
|
|
|
|
|
|
RETVAL = Helper::uplift(EnhancedPrecisionOp().Union(&g0, &g1)); |
11162
|
|
|
|
|
|
|
#line 11163 "Geos_xsgen.cc" |
11163
|
|
|
|
|
|
|
{ |
11164
|
|
|
|
|
|
|
SV * RETVALSV; |
11165
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11166
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11167
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11168
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11169
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11170
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11171
|
|
|
|
|
|
|
case SVt_PVCV: |
11172
|
|
|
|
|
|
|
case SVt_PVIO: |
11173
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11174
|
0
|
|
|
|
|
|
break; |
11175
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11176
|
|
|
|
|
|
|
} |
11177
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11178
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11179
|
|
|
|
|
|
|
} |
11180
|
|
|
|
|
|
|
} |
11181
|
1
|
|
|
|
|
|
XSRETURN(1); |
11182
|
1
|
50
|
|
|
|
|
}); } |
11183
|
|
|
|
|
|
|
|
11184
|
|
|
|
|
|
|
|
11185
|
|
|
|
|
|
|
|
11186
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_enhancedDifference) { xs::throw_guard(cv, [=]() |
11187
|
|
|
|
|
|
|
{ |
11188
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11189
|
1
|
50
|
|
|
|
|
if (items != 2) |
11190
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
11191
|
|
|
|
|
|
|
{ |
11192
|
2
|
|
|
|
|
|
Sv RETVAL; |
11193
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
11194
|
|
|
|
|
|
|
; |
11195
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
11196
|
|
|
|
|
|
|
; |
11197
|
|
|
|
|
|
|
#line 49 "./xsi/precision.xsi" |
11198
|
|
|
|
|
|
|
RETVAL = Helper::uplift(EnhancedPrecisionOp().difference(&g0, &g1)); |
11199
|
|
|
|
|
|
|
#line 11200 "Geos_xsgen.cc" |
11200
|
|
|
|
|
|
|
{ |
11201
|
|
|
|
|
|
|
SV * RETVALSV; |
11202
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11203
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11204
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11205
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11206
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11207
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11208
|
|
|
|
|
|
|
case SVt_PVCV: |
11209
|
|
|
|
|
|
|
case SVt_PVIO: |
11210
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11211
|
0
|
|
|
|
|
|
break; |
11212
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11213
|
|
|
|
|
|
|
} |
11214
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11215
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11216
|
|
|
|
|
|
|
} |
11217
|
|
|
|
|
|
|
} |
11218
|
1
|
|
|
|
|
|
XSRETURN(1); |
11219
|
1
|
50
|
|
|
|
|
}); } |
11220
|
|
|
|
|
|
|
|
11221
|
|
|
|
|
|
|
|
11222
|
|
|
|
|
|
|
|
11223
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_enhancedSymDifference) { xs::throw_guard(cv, [=]() |
11224
|
|
|
|
|
|
|
{ |
11225
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11226
|
1
|
50
|
|
|
|
|
if (items != 2) |
11227
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
11228
|
|
|
|
|
|
|
{ |
11229
|
2
|
|
|
|
|
|
Sv RETVAL; |
11230
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
11231
|
|
|
|
|
|
|
; |
11232
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
11233
|
|
|
|
|
|
|
; |
11234
|
|
|
|
|
|
|
#line 53 "./xsi/precision.xsi" |
11235
|
|
|
|
|
|
|
RETVAL = Helper::uplift(EnhancedPrecisionOp().symDifference(&g0, &g1)); |
11236
|
|
|
|
|
|
|
#line 11237 "Geos_xsgen.cc" |
11237
|
|
|
|
|
|
|
{ |
11238
|
|
|
|
|
|
|
SV * RETVALSV; |
11239
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11240
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11241
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11242
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11243
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11244
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11245
|
|
|
|
|
|
|
case SVt_PVCV: |
11246
|
|
|
|
|
|
|
case SVt_PVIO: |
11247
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11248
|
0
|
|
|
|
|
|
break; |
11249
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11250
|
|
|
|
|
|
|
} |
11251
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11252
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11253
|
|
|
|
|
|
|
} |
11254
|
|
|
|
|
|
|
} |
11255
|
1
|
|
|
|
|
|
XSRETURN(1); |
11256
|
1
|
50
|
|
|
|
|
}); } |
11257
|
|
|
|
|
|
|
|
11258
|
|
|
|
|
|
|
|
11259
|
|
|
|
|
|
|
|
11260
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_enhancedBuffer) { xs::throw_guard(cv, [=]() |
11261
|
|
|
|
|
|
|
{ |
11262
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11263
|
1
|
50
|
|
|
|
|
if (items != 2) |
11264
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g, distance"); |
11265
|
|
|
|
|
|
|
{ |
11266
|
2
|
|
|
|
|
|
Sv RETVAL; |
11267
|
1
|
50
|
|
|
|
|
Geometry& g = xs::in(ST(0)); |
11268
|
|
|
|
|
|
|
; |
11269
|
1
|
50
|
|
|
|
|
double distance = (double)SvNV(ST(1)) |
|
|
0
|
|
|
|
|
|
11270
|
|
|
|
|
|
|
; |
11271
|
|
|
|
|
|
|
#line 57 "./xsi/precision.xsi" |
11272
|
|
|
|
|
|
|
RETVAL = Helper::uplift(EnhancedPrecisionOp().buffer(&g, distance)); |
11273
|
|
|
|
|
|
|
#line 11274 "Geos_xsgen.cc" |
11274
|
|
|
|
|
|
|
{ |
11275
|
|
|
|
|
|
|
SV * RETVALSV; |
11276
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11277
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11278
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11279
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11280
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11281
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11282
|
|
|
|
|
|
|
case SVt_PVCV: |
11283
|
|
|
|
|
|
|
case SVt_PVIO: |
11284
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11285
|
0
|
|
|
|
|
|
break; |
11286
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11287
|
|
|
|
|
|
|
} |
11288
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11289
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11290
|
|
|
|
|
|
|
} |
11291
|
|
|
|
|
|
|
} |
11292
|
1
|
|
|
|
|
|
XSRETURN(1); |
11293
|
1
|
50
|
|
|
|
|
}); } |
11294
|
|
|
|
|
|
|
|
11295
|
|
|
|
|
|
|
|
11296
|
|
|
|
|
|
|
|
11297
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision_removeCommonBits) { xs::throw_guard(cv, [=]() |
11298
|
|
|
|
|
|
|
{ |
11299
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
11300
|
2
|
|
|
|
|
|
dXSI32; |
11301
|
2
|
50
|
|
|
|
|
if (items != 2) |
11302
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "target, sources"); |
11303
|
|
|
|
|
|
|
{ |
11304
|
|
|
|
|
|
|
Coordinate * RETVAL; |
11305
|
2
|
50
|
|
|
|
|
Geometry& target = xs::in(ST(0)); |
11306
|
|
|
|
|
|
|
; |
11307
|
4
|
50
|
|
|
|
|
Array sources = ST(1); |
11308
|
2
|
50
|
|
|
|
|
if (!sources && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
11309
|
0
|
|
|
|
|
|
; |
11310
|
|
|
|
|
|
|
#line 61 "./xsi/precision.xsi" |
11311
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
11312
|
|
|
|
|
|
|
CommonBitsRemover cbr; |
11313
|
|
|
|
|
|
|
for(const auto& it: sources) { |
11314
|
|
|
|
|
|
|
cbr.add(&xs::in(it)); |
11315
|
|
|
|
|
|
|
} |
11316
|
|
|
|
|
|
|
|
11317
|
|
|
|
|
|
|
switch (ix) { |
11318
|
|
|
|
|
|
|
case 0: cbr.removeCommonBits(&target); break; |
11319
|
|
|
|
|
|
|
default: cbr.addCommonBits(&target); break; |
11320
|
|
|
|
|
|
|
} |
11321
|
|
|
|
|
|
|
RETVAL = new Coordinate(cbr.getCommonCoordinate()); |
11322
|
|
|
|
|
|
|
#line 11323 "Geos_xsgen.cc" |
11323
|
|
|
|
|
|
|
{ |
11324
|
|
|
|
|
|
|
SV * RETVALSV; |
11325
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
11326
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11327
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
11328
|
|
|
|
|
|
|
} |
11329
|
|
|
|
|
|
|
} |
11330
|
2
|
|
|
|
|
|
XSRETURN(1); |
11331
|
2
|
50
|
|
|
|
|
}); } |
11332
|
|
|
|
|
|
|
|
11333
|
|
|
|
|
|
|
|
11334
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/precision.xsi' */ |
11335
|
|
|
|
|
|
|
|
11336
|
|
|
|
|
|
|
|
11337
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/precision/GeometryPrecisionReducer.xsi' from 'Geos.xs' */ |
11338
|
|
|
|
|
|
|
|
11339
|
|
|
|
|
|
|
|
11340
|
|
|
|
|
|
|
|
11341
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__GeometryPrecisionReducer_new) { xs::throw_guard(cv, [=]() |
11342
|
|
|
|
|
|
|
{ |
11343
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11344
|
1
|
50
|
|
|
|
|
if (items != 2) |
11345
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg0"); |
11346
|
|
|
|
|
|
|
{ |
11347
|
2
|
|
|
|
|
|
Sv RETVAL; |
11348
|
1
|
|
|
|
|
|
SV* arg0 = ST(1) |
11349
|
|
|
|
|
|
|
; |
11350
|
|
|
|
|
|
|
#line 5 "./xsi/precision/GeometryPrecisionReducer.xsi" |
11351
|
|
|
|
|
|
|
GeometryPrecisionReducer* self; |
11352
|
|
|
|
|
|
|
Object arg{arg0}; |
11353
|
|
|
|
|
|
|
if (arg.stash().name() == "Geo::Geos::PrecisionModel") { |
11354
|
|
|
|
|
|
|
PrecisionModel& pm = xs::in(arg); |
11355
|
|
|
|
|
|
|
self = new GeometryPrecisionReducer(pm); |
11356
|
|
|
|
|
|
|
} |
11357
|
|
|
|
|
|
|
else { |
11358
|
|
|
|
|
|
|
GeometryFactory& gf = xs::in(arg); |
11359
|
|
|
|
|
|
|
self = new GeometryPrecisionReducer(gf); |
11360
|
|
|
|
|
|
|
} |
11361
|
|
|
|
|
|
|
Object wrapped = xs::out(self); |
11362
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(arg0), &payload_marker); |
11363
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
11364
|
|
|
|
|
|
|
#line 11365 "Geos_xsgen.cc" |
11365
|
|
|
|
|
|
|
{ |
11366
|
|
|
|
|
|
|
SV * RETVALSV; |
11367
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11368
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11369
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11370
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11371
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11372
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11373
|
|
|
|
|
|
|
case SVt_PVCV: |
11374
|
|
|
|
|
|
|
case SVt_PVIO: |
11375
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11376
|
0
|
|
|
|
|
|
break; |
11377
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11378
|
|
|
|
|
|
|
} |
11379
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11380
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11381
|
|
|
|
|
|
|
} |
11382
|
|
|
|
|
|
|
} |
11383
|
1
|
|
|
|
|
|
XSRETURN(1); |
11384
|
1
|
50
|
|
|
|
|
}); } |
11385
|
|
|
|
|
|
|
|
11386
|
|
|
|
|
|
|
|
11387
|
|
|
|
|
|
|
|
11388
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__GeometryPrecisionReducer_setRemoveCollapsedComponents) { xs::throw_guard(cv, [=]() |
11389
|
|
|
|
|
|
|
{ |
11390
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11391
|
1
|
50
|
|
|
|
|
if (items != 2) |
11392
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, remove"); |
11393
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
11394
|
1
|
|
|
|
|
|
SP -= items; |
11395
|
|
|
|
|
|
|
{ |
11396
|
1
|
50
|
|
|
|
|
GeometryPrecisionReducer* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
11397
|
|
|
|
|
|
|
; |
11398
|
1
|
50
|
|
|
|
|
bool remove = (bool)SvTRUE(ST(1)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
11399
|
|
|
|
|
|
|
; |
11400
|
|
|
|
|
|
|
#line 20 "./xsi/precision/GeometryPrecisionReducer.xsi" |
11401
|
|
|
|
|
|
|
THIS->setRemoveCollapsedComponents(remove); |
11402
|
|
|
|
|
|
|
#line 11403 "Geos_xsgen.cc" |
11403
|
1
|
|
|
|
|
|
PUTBACK; |
11404
|
1
|
|
|
|
|
|
return; |
11405
|
|
|
|
|
|
|
} |
11406
|
1
|
50
|
|
|
|
|
}); } |
11407
|
|
|
|
|
|
|
|
11408
|
|
|
|
|
|
|
|
11409
|
|
|
|
|
|
|
|
11410
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__GeometryPrecisionReducer_setPointwise) { xs::throw_guard(cv, [=]() |
11411
|
|
|
|
|
|
|
{ |
11412
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11413
|
1
|
50
|
|
|
|
|
if (items != 2) |
11414
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, pointwise"); |
11415
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
11416
|
1
|
|
|
|
|
|
SP -= items; |
11417
|
|
|
|
|
|
|
{ |
11418
|
1
|
50
|
|
|
|
|
GeometryPrecisionReducer* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
11419
|
|
|
|
|
|
|
; |
11420
|
1
|
50
|
|
|
|
|
bool pointwise = (bool)SvTRUE(ST(1)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
11421
|
|
|
|
|
|
|
; |
11422
|
|
|
|
|
|
|
#line 22 "./xsi/precision/GeometryPrecisionReducer.xsi" |
11423
|
|
|
|
|
|
|
THIS->setPointwise(pointwise); |
11424
|
|
|
|
|
|
|
#line 11425 "Geos_xsgen.cc" |
11425
|
1
|
|
|
|
|
|
PUTBACK; |
11426
|
1
|
|
|
|
|
|
return; |
11427
|
|
|
|
|
|
|
} |
11428
|
1
|
50
|
|
|
|
|
}); } |
11429
|
|
|
|
|
|
|
|
11430
|
|
|
|
|
|
|
|
11431
|
|
|
|
|
|
|
|
11432
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__GeometryPrecisionReducer_reduce) { xs::throw_guard(cv, [=]() |
11433
|
|
|
|
|
|
|
{ |
11434
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11435
|
1
|
50
|
|
|
|
|
if (items != 2) |
11436
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, g"); |
11437
|
|
|
|
|
|
|
{ |
11438
|
2
|
|
|
|
|
|
Sv RETVAL; |
11439
|
1
|
50
|
|
|
|
|
GeometryPrecisionReducer* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
11440
|
|
|
|
|
|
|
; |
11441
|
1
|
50
|
|
|
|
|
Geometry& g = xs::in(ST(1)); |
11442
|
|
|
|
|
|
|
; |
11443
|
|
|
|
|
|
|
#line 25 "./xsi/precision/GeometryPrecisionReducer.xsi" |
11444
|
|
|
|
|
|
|
auto ptr = THIS->reduce(g); |
11445
|
|
|
|
|
|
|
RETVAL = Helper::uplift(ptr.release()); |
11446
|
|
|
|
|
|
|
#line 11447 "Geos_xsgen.cc" |
11447
|
|
|
|
|
|
|
{ |
11448
|
|
|
|
|
|
|
SV * RETVALSV; |
11449
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11450
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11451
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11452
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11453
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11454
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11455
|
|
|
|
|
|
|
case SVt_PVCV: |
11456
|
|
|
|
|
|
|
case SVt_PVIO: |
11457
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11458
|
0
|
|
|
|
|
|
break; |
11459
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11460
|
|
|
|
|
|
|
} |
11461
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11462
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11463
|
|
|
|
|
|
|
} |
11464
|
|
|
|
|
|
|
} |
11465
|
1
|
|
|
|
|
|
XSRETURN(1); |
11466
|
1
|
50
|
|
|
|
|
}); } |
11467
|
|
|
|
|
|
|
|
11468
|
|
|
|
|
|
|
|
11469
|
|
|
|
|
|
|
|
11470
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__GeometryPrecisionReducer_CLONE_SKIP) { xs::throw_guard(cv, [=]() |
11471
|
|
|
|
|
|
|
{ |
11472
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
11473
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
11474
|
|
|
|
|
|
|
{ |
11475
|
|
|
|
|
|
|
int RETVAL; |
11476
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
11477
|
|
|
|
|
|
|
#line 29 "./xsi/precision/GeometryPrecisionReducer.xsi" |
11478
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
11479
|
|
|
|
|
|
|
#line 11480 "Geos_xsgen.cc" |
11480
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
0
|
|
|
|
|
|
11481
|
|
|
|
|
|
|
} |
11482
|
0
|
|
|
|
|
|
XSRETURN(1); |
11483
|
0
|
0
|
|
|
|
|
}); } |
11484
|
|
|
|
|
|
|
|
11485
|
|
|
|
|
|
|
|
11486
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/precision/GeometryPrecisionReducer.xsi' */ |
11487
|
|
|
|
|
|
|
|
11488
|
|
|
|
|
|
|
|
11489
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/precision/SimpleGeometryPrecisionReducer.xsi' from 'Geos.xs' */ |
11490
|
|
|
|
|
|
|
|
11491
|
|
|
|
|
|
|
|
11492
|
|
|
|
|
|
|
|
11493
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_new) { xs::throw_guard(cv, [=]() |
11494
|
|
|
|
|
|
|
{ |
11495
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11496
|
1
|
50
|
|
|
|
|
if (items != 2) |
11497
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg"); |
11498
|
|
|
|
|
|
|
{ |
11499
|
2
|
|
|
|
|
|
Sv RETVAL; |
11500
|
1
|
|
|
|
|
|
SV* arg = ST(1) |
11501
|
|
|
|
|
|
|
; |
11502
|
|
|
|
|
|
|
#line 5 "./xsi/precision/SimpleGeometryPrecisionReducer.xsi" |
11503
|
|
|
|
|
|
|
PrecisionModel& pm = xs::in(arg); |
11504
|
|
|
|
|
|
|
auto self = new SimpleGeometryPrecisionReducer(&pm); |
11505
|
|
|
|
|
|
|
Object wrapped = xs::out(self); |
11506
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(arg), &payload_marker); |
11507
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
11508
|
|
|
|
|
|
|
#line 11509 "Geos_xsgen.cc" |
11509
|
|
|
|
|
|
|
{ |
11510
|
|
|
|
|
|
|
SV * RETVALSV; |
11511
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11512
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11513
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11514
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11515
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11516
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11517
|
|
|
|
|
|
|
case SVt_PVCV: |
11518
|
|
|
|
|
|
|
case SVt_PVIO: |
11519
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11520
|
0
|
|
|
|
|
|
break; |
11521
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11522
|
|
|
|
|
|
|
} |
11523
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11524
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11525
|
|
|
|
|
|
|
} |
11526
|
|
|
|
|
|
|
} |
11527
|
1
|
|
|
|
|
|
XSRETURN(1); |
11528
|
1
|
50
|
|
|
|
|
}); } |
11529
|
|
|
|
|
|
|
|
11530
|
|
|
|
|
|
|
|
11531
|
|
|
|
|
|
|
|
11532
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_getPrecisionModel) { xs::throw_guard(cv, [=]() |
11533
|
|
|
|
|
|
|
{ |
11534
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11535
|
1
|
50
|
|
|
|
|
if (items != 1) |
11536
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
11537
|
|
|
|
|
|
|
{ |
11538
|
2
|
|
|
|
|
|
Sv RETVAL; |
11539
|
1
|
50
|
|
|
|
|
SimpleGeometryPrecisionReducer* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
11540
|
|
|
|
|
|
|
; |
11541
|
|
|
|
|
|
|
#line 13 "./xsi/precision/SimpleGeometryPrecisionReducer.xsi" |
11542
|
|
|
|
|
|
|
(void)THIS; |
11543
|
|
|
|
|
|
|
Object me{ST(0)}; |
11544
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker); |
11545
|
|
|
|
|
|
|
Object obj { payload.obj }; |
11546
|
|
|
|
|
|
|
RETVAL = obj.ref(); |
11547
|
|
|
|
|
|
|
#line 11548 "Geos_xsgen.cc" |
11548
|
|
|
|
|
|
|
{ |
11549
|
|
|
|
|
|
|
SV * RETVALSV; |
11550
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11551
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11552
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11553
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11554
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11555
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11556
|
|
|
|
|
|
|
case SVt_PVCV: |
11557
|
|
|
|
|
|
|
case SVt_PVIO: |
11558
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11559
|
0
|
|
|
|
|
|
break; |
11560
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11561
|
|
|
|
|
|
|
} |
11562
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11563
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11564
|
|
|
|
|
|
|
} |
11565
|
|
|
|
|
|
|
} |
11566
|
1
|
|
|
|
|
|
XSRETURN(1); |
11567
|
1
|
50
|
|
|
|
|
}); } |
11568
|
|
|
|
|
|
|
|
11569
|
|
|
|
|
|
|
|
11570
|
|
|
|
|
|
|
|
11571
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_setRemoveCollapsedComponents) { xs::throw_guard(cv, [=]() |
11572
|
|
|
|
|
|
|
{ |
11573
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11574
|
1
|
50
|
|
|
|
|
if (items != 2) |
11575
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, nRemoveCollapsed"); |
11576
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
11577
|
1
|
|
|
|
|
|
SP -= items; |
11578
|
|
|
|
|
|
|
{ |
11579
|
1
|
50
|
|
|
|
|
SimpleGeometryPrecisionReducer* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
11580
|
|
|
|
|
|
|
; |
11581
|
1
|
50
|
|
|
|
|
bool nRemoveCollapsed = (bool)SvTRUE(ST(1)) |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
11582
|
|
|
|
|
|
|
; |
11583
|
|
|
|
|
|
|
#line 20 "./xsi/precision/SimpleGeometryPrecisionReducer.xsi" |
11584
|
|
|
|
|
|
|
THIS->setRemoveCollapsedComponents(nRemoveCollapsed); |
11585
|
|
|
|
|
|
|
#line 11586 "Geos_xsgen.cc" |
11586
|
1
|
|
|
|
|
|
PUTBACK; |
11587
|
1
|
|
|
|
|
|
return; |
11588
|
|
|
|
|
|
|
} |
11589
|
1
|
50
|
|
|
|
|
}); } |
11590
|
|
|
|
|
|
|
|
11591
|
|
|
|
|
|
|
|
11592
|
|
|
|
|
|
|
|
11593
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_getRemoveCollapsed) { xs::throw_guard(cv, [=]() |
11594
|
|
|
|
|
|
|
{ |
11595
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11596
|
1
|
50
|
|
|
|
|
if (items != 1) |
11597
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
11598
|
|
|
|
|
|
|
{ |
11599
|
|
|
|
|
|
|
bool RETVAL; |
11600
|
1
|
50
|
|
|
|
|
SimpleGeometryPrecisionReducer* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
11601
|
|
|
|
|
|
|
; |
11602
|
|
|
|
|
|
|
#line 22 "./xsi/precision/SimpleGeometryPrecisionReducer.xsi" |
11603
|
|
|
|
|
|
|
RETVAL = THIS->getRemoveCollapsed(); |
11604
|
|
|
|
|
|
|
#line 11605 "Geos_xsgen.cc" |
11605
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
11606
|
|
|
|
|
|
|
} |
11607
|
1
|
|
|
|
|
|
XSRETURN(1); |
11608
|
1
|
50
|
|
|
|
|
}); } |
11609
|
|
|
|
|
|
|
|
11610
|
|
|
|
|
|
|
|
11611
|
|
|
|
|
|
|
|
11612
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_reduce) { xs::throw_guard(cv, [=]() |
11613
|
|
|
|
|
|
|
{ |
11614
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11615
|
1
|
50
|
|
|
|
|
if (items != 2) |
11616
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, g"); |
11617
|
|
|
|
|
|
|
{ |
11618
|
2
|
|
|
|
|
|
Sv RETVAL; |
11619
|
1
|
50
|
|
|
|
|
SimpleGeometryPrecisionReducer* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
11620
|
|
|
|
|
|
|
; |
11621
|
1
|
50
|
|
|
|
|
Geometry& g = xs::in(ST(1)); |
11622
|
|
|
|
|
|
|
; |
11623
|
|
|
|
|
|
|
#line 25 "./xsi/precision/SimpleGeometryPrecisionReducer.xsi" |
11624
|
|
|
|
|
|
|
RETVAL = Helper::uplift(THIS->reduce(&g)); |
11625
|
|
|
|
|
|
|
#line 11626 "Geos_xsgen.cc" |
11626
|
|
|
|
|
|
|
{ |
11627
|
|
|
|
|
|
|
SV * RETVALSV; |
11628
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11629
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11630
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11631
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11632
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11633
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11634
|
|
|
|
|
|
|
case SVt_PVCV: |
11635
|
|
|
|
|
|
|
case SVt_PVIO: |
11636
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11637
|
0
|
|
|
|
|
|
break; |
11638
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11639
|
|
|
|
|
|
|
} |
11640
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11641
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11642
|
|
|
|
|
|
|
} |
11643
|
|
|
|
|
|
|
} |
11644
|
1
|
|
|
|
|
|
XSRETURN(1); |
11645
|
1
|
50
|
|
|
|
|
}); } |
11646
|
|
|
|
|
|
|
|
11647
|
|
|
|
|
|
|
|
11648
|
|
|
|
|
|
|
|
11649
|
0
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_CLONE_SKIP) { xs::throw_guard(cv, [=]() |
11650
|
|
|
|
|
|
|
{ |
11651
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
11652
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
11653
|
|
|
|
|
|
|
{ |
11654
|
|
|
|
|
|
|
int RETVAL; |
11655
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
11656
|
|
|
|
|
|
|
#line 28 "./xsi/precision/SimpleGeometryPrecisionReducer.xsi" |
11657
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); RETVAL = 1; |
11658
|
|
|
|
|
|
|
#line 11659 "Geos_xsgen.cc" |
11659
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
0
|
|
|
|
|
|
11660
|
|
|
|
|
|
|
} |
11661
|
0
|
|
|
|
|
|
XSRETURN(1); |
11662
|
0
|
0
|
|
|
|
|
}); } |
11663
|
|
|
|
|
|
|
|
11664
|
|
|
|
|
|
|
|
11665
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/precision/SimpleGeometryPrecisionReducer.xsi' */ |
11666
|
|
|
|
|
|
|
|
11667
|
|
|
|
|
|
|
|
11668
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/operation.xsi' from 'Geos.xs' */ |
11669
|
|
|
|
|
|
|
|
11670
|
|
|
|
|
|
|
|
11671
|
|
|
|
|
|
|
|
11672
|
6
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_buffer) { xs::throw_guard(cv, [=]() |
11673
|
|
|
|
|
|
|
{ |
11674
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
11675
|
3
|
50
|
|
|
|
|
if (items < 2 || items > 4) |
|
|
50
|
|
|
|
|
|
11676
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g, distance, quadrantSegments= NULL, endCapStyle= NULL"); |
11677
|
|
|
|
|
|
|
{ |
11678
|
6
|
|
|
|
|
|
Sv RETVAL; |
11679
|
3
|
50
|
|
|
|
|
Geometry& g = xs::in(ST(0)); |
11680
|
|
|
|
|
|
|
; |
11681
|
3
|
50
|
|
|
|
|
double distance = (double)SvNV(ST(1)) |
|
|
50
|
|
|
|
|
|
11682
|
|
|
|
|
|
|
; |
11683
|
|
|
|
|
|
|
SV* quadrantSegments; |
11684
|
|
|
|
|
|
|
SV* endCapStyle; |
11685
|
|
|
|
|
|
|
|
11686
|
3
|
100
|
|
|
|
|
if (items < 3) |
11687
|
1
|
|
|
|
|
|
quadrantSegments = NULL; |
11688
|
|
|
|
|
|
|
else { |
11689
|
2
|
|
|
|
|
|
quadrantSegments = ST(2) |
11690
|
2
|
|
|
|
|
|
; |
11691
|
|
|
|
|
|
|
} |
11692
|
|
|
|
|
|
|
|
11693
|
3
|
100
|
|
|
|
|
if (items < 4) |
11694
|
2
|
|
|
|
|
|
endCapStyle = NULL; |
11695
|
|
|
|
|
|
|
else { |
11696
|
1
|
|
|
|
|
|
endCapStyle = ST(3) |
11697
|
1
|
|
|
|
|
|
; |
11698
|
|
|
|
|
|
|
} |
11699
|
|
|
|
|
|
|
#line 5 "./xsi/operation.xsi" |
11700
|
|
|
|
|
|
|
int vQuadrantSegments = quadrantSegments ? SvIV(quadrantSegments) : (int)BufferParameters::DEFAULT_QUADRANT_SEGMENTS; |
11701
|
|
|
|
|
|
|
int vEndCapStyle = endCapStyle? SvIV(endCapStyle) : (int)BufferParameters::CAP_ROUND; |
11702
|
|
|
|
|
|
|
Geometry* r = BufferOp::bufferOp(&g, distance, vQuadrantSegments, vEndCapStyle); |
11703
|
|
|
|
|
|
|
RETVAL = Helper::uplift(r); |
11704
|
|
|
|
|
|
|
#line 11705 "Geos_xsgen.cc" |
11705
|
|
|
|
|
|
|
{ |
11706
|
|
|
|
|
|
|
SV * RETVALSV; |
11707
|
3
|
|
|
|
|
|
RETVALSV = NULL; |
11708
|
3
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11709
|
3
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11710
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11711
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11712
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11713
|
|
|
|
|
|
|
case SVt_PVCV: |
11714
|
|
|
|
|
|
|
case SVt_PVIO: |
11715
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11716
|
0
|
|
|
|
|
|
break; |
11717
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11718
|
|
|
|
|
|
|
} |
11719
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11720
|
3
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11721
|
|
|
|
|
|
|
} |
11722
|
|
|
|
|
|
|
} |
11723
|
3
|
|
|
|
|
|
XSRETURN(1); |
11724
|
3
|
50
|
|
|
|
|
}); } |
11725
|
|
|
|
|
|
|
|
11726
|
|
|
|
|
|
|
|
11727
|
|
|
|
|
|
|
|
11728
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_distance) { xs::throw_guard(cv, [=]() |
11729
|
|
|
|
|
|
|
{ |
11730
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11731
|
1
|
50
|
|
|
|
|
if (items != 2) |
11732
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
11733
|
|
|
|
|
|
|
{ |
11734
|
|
|
|
|
|
|
double RETVAL; |
11735
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
0
|
|
|
|
|
|
11736
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
11737
|
|
|
|
|
|
|
; |
11738
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
11739
|
|
|
|
|
|
|
; |
11740
|
|
|
|
|
|
|
#line 12 "./xsi/operation.xsi" |
11741
|
|
|
|
|
|
|
RETVAL = DistanceOp::distance(&g0, &g1); |
11742
|
|
|
|
|
|
|
#line 11743 "Geos_xsgen.cc" |
11743
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHn((double)RETVAL); |
|
|
50
|
|
|
|
|
|
11744
|
|
|
|
|
|
|
} |
11745
|
1
|
|
|
|
|
|
XSRETURN(1); |
11746
|
1
|
50
|
|
|
|
|
}); } |
11747
|
|
|
|
|
|
|
|
11748
|
|
|
|
|
|
|
|
11749
|
|
|
|
|
|
|
|
11750
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_nearestPoints) { xs::throw_guard(cv, [=]() |
11751
|
|
|
|
|
|
|
{ |
11752
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11753
|
1
|
50
|
|
|
|
|
if (items != 2) |
11754
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
11755
|
|
|
|
|
|
|
{ |
11756
|
2
|
|
|
|
|
|
Array RETVAL; |
11757
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
11758
|
|
|
|
|
|
|
; |
11759
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
11760
|
|
|
|
|
|
|
; |
11761
|
|
|
|
|
|
|
#line 16 "./xsi/operation.xsi" |
11762
|
|
|
|
|
|
|
Array r; |
11763
|
|
|
|
|
|
|
auto seq = DistanceOp::nearestPoints(&g0, &g1); |
11764
|
|
|
|
|
|
|
if(seq) { |
11765
|
|
|
|
|
|
|
auto seq_ptr = std::unique_ptr(seq); |
11766
|
|
|
|
|
|
|
r = Helper::convert_copy(seq); |
11767
|
|
|
|
|
|
|
} |
11768
|
|
|
|
|
|
|
RETVAL = r; |
11769
|
|
|
|
|
|
|
#line 11770 "Geos_xsgen.cc" |
11770
|
|
|
|
|
|
|
{ |
11771
|
|
|
|
|
|
|
SV * RETVALSV; |
11772
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11773
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11774
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11775
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11776
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11777
|
|
|
|
|
|
|
} |
11778
|
|
|
|
|
|
|
} |
11779
|
1
|
|
|
|
|
|
XSRETURN(1); |
11780
|
1
|
50
|
|
|
|
|
}); } |
11781
|
|
|
|
|
|
|
|
11782
|
|
|
|
|
|
|
|
11783
|
|
|
|
|
|
|
|
11784
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_closestPoints) { xs::throw_guard(cv, [=]() |
11785
|
|
|
|
|
|
|
{ |
11786
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11787
|
1
|
50
|
|
|
|
|
if (items != 2) |
11788
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1"); |
11789
|
|
|
|
|
|
|
{ |
11790
|
2
|
|
|
|
|
|
Array RETVAL; |
11791
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
11792
|
|
|
|
|
|
|
; |
11793
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
11794
|
|
|
|
|
|
|
; |
11795
|
|
|
|
|
|
|
#line 26 "./xsi/operation.xsi" |
11796
|
|
|
|
|
|
|
Array r; |
11797
|
|
|
|
|
|
|
auto seq = DistanceOp::closestPoints(&g0, &g1); |
11798
|
|
|
|
|
|
|
if(seq) { |
11799
|
|
|
|
|
|
|
auto seq_ptr = std::unique_ptr(seq); |
11800
|
|
|
|
|
|
|
r = Helper::convert_copy(seq); |
11801
|
|
|
|
|
|
|
} |
11802
|
|
|
|
|
|
|
RETVAL = r; |
11803
|
|
|
|
|
|
|
#line 11804 "Geos_xsgen.cc" |
11804
|
|
|
|
|
|
|
{ |
11805
|
|
|
|
|
|
|
SV * RETVALSV; |
11806
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11807
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11808
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11809
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11810
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11811
|
|
|
|
|
|
|
} |
11812
|
|
|
|
|
|
|
} |
11813
|
1
|
|
|
|
|
|
XSRETURN(1); |
11814
|
1
|
50
|
|
|
|
|
}); } |
11815
|
|
|
|
|
|
|
|
11816
|
|
|
|
|
|
|
|
11817
|
|
|
|
|
|
|
|
11818
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_overlayOp) { xs::throw_guard(cv, [=]() |
11819
|
|
|
|
|
|
|
{ |
11820
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11821
|
1
|
50
|
|
|
|
|
if (items != 3) |
11822
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1, opCode"); |
11823
|
|
|
|
|
|
|
{ |
11824
|
2
|
|
|
|
|
|
Sv RETVAL; |
11825
|
1
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
11826
|
|
|
|
|
|
|
; |
11827
|
1
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
11828
|
|
|
|
|
|
|
; |
11829
|
1
|
50
|
|
|
|
|
int opCode = (int)SvIV(ST(2)) |
|
|
0
|
|
|
|
|
|
11830
|
|
|
|
|
|
|
; |
11831
|
|
|
|
|
|
|
#line 36 "./xsi/operation.xsi" |
11832
|
|
|
|
|
|
|
if (opCode > 4) throw "wrong opCode"; |
11833
|
|
|
|
|
|
|
OverlayOp::OpCode code = static_cast(opCode); |
11834
|
|
|
|
|
|
|
Geometry* g = OverlayOp::overlayOp(&g0, &g1, code); |
11835
|
|
|
|
|
|
|
RETVAL = Helper::uplift(g); |
11836
|
|
|
|
|
|
|
#line 11837 "Geos_xsgen.cc" |
11837
|
|
|
|
|
|
|
{ |
11838
|
|
|
|
|
|
|
SV * RETVALSV; |
11839
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11840
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11841
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
11842
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
11843
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11844
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
11845
|
|
|
|
|
|
|
case SVt_PVCV: |
11846
|
|
|
|
|
|
|
case SVt_PVIO: |
11847
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11848
|
0
|
|
|
|
|
|
break; |
11849
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
11850
|
|
|
|
|
|
|
} |
11851
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11852
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11853
|
|
|
|
|
|
|
} |
11854
|
|
|
|
|
|
|
} |
11855
|
1
|
|
|
|
|
|
XSRETURN(1); |
11856
|
1
|
50
|
|
|
|
|
}); } |
11857
|
|
|
|
|
|
|
|
11858
|
|
|
|
|
|
|
|
11859
|
|
|
|
|
|
|
|
11860
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_isValid) { xs::throw_guard(cv, [=]() |
11861
|
|
|
|
|
|
|
{ |
11862
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
11863
|
2
|
50
|
|
|
|
|
if (items != 1) |
11864
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "obj"); |
11865
|
|
|
|
|
|
|
{ |
11866
|
|
|
|
|
|
|
bool RETVAL; |
11867
|
4
|
50
|
|
|
|
|
Object obj = ST(0); |
11868
|
2
|
50
|
|
|
|
|
if (!obj && SvOK(ST(0))) throw "arg is not a blessed reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
11869
|
0
|
|
|
|
|
|
; |
11870
|
|
|
|
|
|
|
#line 43 "./xsi/operation.xsi" |
11871
|
|
|
|
|
|
|
if (obj.stash().name() == "Geo::Geos::Coordinate") { |
11872
|
|
|
|
|
|
|
auto& c = xs::in(obj); |
11873
|
|
|
|
|
|
|
RETVAL = IsValidOp::isValid(c); |
11874
|
|
|
|
|
|
|
} |
11875
|
|
|
|
|
|
|
else { |
11876
|
|
|
|
|
|
|
auto& g = xs::in(obj); |
11877
|
|
|
|
|
|
|
RETVAL = IsValidOp::isValid(g); |
11878
|
|
|
|
|
|
|
} |
11879
|
|
|
|
|
|
|
#line 11880 "Geos_xsgen.cc" |
11880
|
2
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
11881
|
|
|
|
|
|
|
} |
11882
|
2
|
|
|
|
|
|
XSRETURN(1); |
11883
|
2
|
50
|
|
|
|
|
}); } |
11884
|
|
|
|
|
|
|
|
11885
|
|
|
|
|
|
|
|
11886
|
|
|
|
|
|
|
|
11887
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_relate) { xs::throw_guard(cv, [=]() |
11888
|
|
|
|
|
|
|
{ |
11889
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
11890
|
2
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
50
|
|
|
|
|
|
11891
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g0, g1, boundaryNodeRule= NULL"); |
11892
|
|
|
|
|
|
|
{ |
11893
|
|
|
|
|
|
|
IntersectionMatrix * RETVAL; |
11894
|
2
|
50
|
|
|
|
|
Geometry& g0 = xs::in(ST(0)); |
11895
|
|
|
|
|
|
|
; |
11896
|
2
|
50
|
|
|
|
|
Geometry& g1 = xs::in(ST(1)); |
11897
|
|
|
|
|
|
|
; |
11898
|
|
|
|
|
|
|
SV* boundaryNodeRule; |
11899
|
|
|
|
|
|
|
|
11900
|
2
|
100
|
|
|
|
|
if (items < 3) |
11901
|
1
|
|
|
|
|
|
boundaryNodeRule = NULL; |
11902
|
|
|
|
|
|
|
else { |
11903
|
1
|
|
|
|
|
|
boundaryNodeRule = ST(2) |
11904
|
1
|
|
|
|
|
|
; |
11905
|
|
|
|
|
|
|
} |
11906
|
|
|
|
|
|
|
#line 54 "./xsi/operation.xsi" |
11907
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
11908
|
|
|
|
|
|
|
if (!boundaryNodeRule) RETVAL = RelateOp::relate(&g0, &g1); |
11909
|
|
|
|
|
|
|
else { |
11910
|
|
|
|
|
|
|
const BoundaryNodeRule* rule; |
11911
|
|
|
|
|
|
|
auto rule_id = SvIV(boundaryNodeRule); |
11912
|
|
|
|
|
|
|
switch(rule_id) { |
11913
|
|
|
|
|
|
|
case 0: rule = &BoundaryNodeRule::getBoundaryRuleMod2(); break; |
11914
|
|
|
|
|
|
|
case 1: rule = &BoundaryNodeRule::getBoundaryEndPoint(); break; |
11915
|
|
|
|
|
|
|
case 2: rule = &BoundaryNodeRule::getBoundaryMultivalentEndPoint(); break; |
11916
|
|
|
|
|
|
|
case 3: rule = &BoundaryNodeRule::getBoundaryMonovalentEndPoint(); break; |
11917
|
|
|
|
|
|
|
case 4: rule = &BoundaryNodeRule::getBoundaryOGCSFS(); break; |
11918
|
|
|
|
|
|
|
default: throw("Wrong boundaryNodeRule"); |
11919
|
|
|
|
|
|
|
} |
11920
|
|
|
|
|
|
|
RETVAL = RelateOp::relate(&g0, &g1, *rule); |
11921
|
|
|
|
|
|
|
} |
11922
|
|
|
|
|
|
|
#line 11923 "Geos_xsgen.cc" |
11923
|
|
|
|
|
|
|
{ |
11924
|
|
|
|
|
|
|
SV * RETVALSV; |
11925
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
11926
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11927
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
11928
|
|
|
|
|
|
|
} |
11929
|
|
|
|
|
|
|
} |
11930
|
2
|
|
|
|
|
|
XSRETURN(1); |
11931
|
2
|
50
|
|
|
|
|
}); } |
11932
|
|
|
|
|
|
|
|
11933
|
|
|
|
|
|
|
|
11934
|
|
|
|
|
|
|
|
11935
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_mergeLines) { xs::throw_guard(cv, [=]() |
11936
|
|
|
|
|
|
|
{ |
11937
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11938
|
1
|
50
|
|
|
|
|
if (items != 1) |
11939
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "in"); |
11940
|
|
|
|
|
|
|
{ |
11941
|
2
|
|
|
|
|
|
Array RETVAL; |
11942
|
2
|
50
|
|
|
|
|
Array in = ST(0); |
|
|
50
|
|
|
|
|
|
11943
|
1
|
50
|
|
|
|
|
if (!in && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
11944
|
0
|
|
|
|
|
|
; |
11945
|
|
|
|
|
|
|
#line 71 "./xsi/operation.xsi" |
11946
|
|
|
|
|
|
|
LineMerger lm; |
11947
|
|
|
|
|
|
|
|
11948
|
|
|
|
|
|
|
for(auto it: in) { |
11949
|
|
|
|
|
|
|
lm.add(&xs::in(it)); |
11950
|
|
|
|
|
|
|
} |
11951
|
|
|
|
|
|
|
|
11952
|
|
|
|
|
|
|
auto v = lm.getMergedLineStrings(); |
11953
|
|
|
|
|
|
|
Array out = Array::create(v->size()); |
11954
|
|
|
|
|
|
|
for(LineString* it: *v) { |
11955
|
|
|
|
|
|
|
auto wrapped = xs::out(it); |
11956
|
|
|
|
|
|
|
out.push(wrapped); |
11957
|
|
|
|
|
|
|
} |
11958
|
|
|
|
|
|
|
RETVAL = out; |
11959
|
|
|
|
|
|
|
delete v; |
11960
|
|
|
|
|
|
|
#line 11961 "Geos_xsgen.cc" |
11961
|
|
|
|
|
|
|
{ |
11962
|
|
|
|
|
|
|
SV * RETVALSV; |
11963
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
11964
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
11965
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
11966
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
11967
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
11968
|
|
|
|
|
|
|
} |
11969
|
|
|
|
|
|
|
} |
11970
|
1
|
|
|
|
|
|
XSRETURN(1); |
11971
|
1
|
50
|
|
|
|
|
}); } |
11972
|
|
|
|
|
|
|
|
11973
|
|
|
|
|
|
|
|
11974
|
|
|
|
|
|
|
|
11975
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_isSequenced) { xs::throw_guard(cv, [=]() |
11976
|
|
|
|
|
|
|
{ |
11977
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11978
|
1
|
50
|
|
|
|
|
if (items != 1) |
11979
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g"); |
11980
|
|
|
|
|
|
|
{ |
11981
|
|
|
|
|
|
|
bool RETVAL; |
11982
|
1
|
50
|
|
|
|
|
Geometry& g = xs::in(ST(0)); |
11983
|
|
|
|
|
|
|
; |
11984
|
|
|
|
|
|
|
#line 88 "./xsi/operation.xsi" |
11985
|
|
|
|
|
|
|
RETVAL = LineSequencer::isSequenced(&g); |
11986
|
|
|
|
|
|
|
#line 11987 "Geos_xsgen.cc" |
11987
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
11988
|
|
|
|
|
|
|
} |
11989
|
1
|
|
|
|
|
|
XSRETURN(1); |
11990
|
1
|
50
|
|
|
|
|
}); } |
11991
|
|
|
|
|
|
|
|
11992
|
|
|
|
|
|
|
|
11993
|
|
|
|
|
|
|
|
11994
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Operation_sequence) { xs::throw_guard(cv, [=]() |
11995
|
|
|
|
|
|
|
{ |
11996
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
11997
|
1
|
50
|
|
|
|
|
if (items != 1) |
11998
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "g"); |
11999
|
|
|
|
|
|
|
{ |
12000
|
2
|
|
|
|
|
|
Sv RETVAL; |
12001
|
1
|
50
|
|
|
|
|
Geometry& g = xs::in(ST(0)); |
12002
|
|
|
|
|
|
|
; |
12003
|
|
|
|
|
|
|
#line 92 "./xsi/operation.xsi" |
12004
|
|
|
|
|
|
|
RETVAL = Helper::uplift(LineSequencer::sequence(g)); |
12005
|
|
|
|
|
|
|
#line 12006 "Geos_xsgen.cc" |
12006
|
|
|
|
|
|
|
{ |
12007
|
|
|
|
|
|
|
SV * RETVALSV; |
12008
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
12009
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
12010
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
12011
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
12012
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12013
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12014
|
|
|
|
|
|
|
case SVt_PVCV: |
12015
|
|
|
|
|
|
|
case SVt_PVIO: |
12016
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
12017
|
0
|
|
|
|
|
|
break; |
12018
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
12019
|
|
|
|
|
|
|
} |
12020
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
12021
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
12022
|
|
|
|
|
|
|
} |
12023
|
|
|
|
|
|
|
} |
12024
|
1
|
|
|
|
|
|
XSRETURN(1); |
12025
|
1
|
50
|
|
|
|
|
}); } |
12026
|
|
|
|
|
|
|
|
12027
|
|
|
|
|
|
|
|
12028
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/operation.xsi' */ |
12029
|
|
|
|
|
|
|
|
12030
|
|
|
|
|
|
|
|
12031
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/triangulate/DelaunayTriangulationBuilder.xsi' from 'Geos.xs' */ |
12032
|
|
|
|
|
|
|
|
12033
|
|
|
|
|
|
|
|
12034
|
|
|
|
|
|
|
|
12035
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangulate__DelaunayTriangulationBuilder_new) { xs::throw_guard(cv, [=]() |
12036
|
|
|
|
|
|
|
{ |
12037
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
12038
|
2
|
50
|
|
|
|
|
if (items < 3 || items > 4) |
|
|
50
|
|
|
|
|
|
12039
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, geometry_factory, sites, tolerance= NULL"); |
12040
|
|
|
|
|
|
|
{ |
12041
|
4
|
|
|
|
|
|
Sv RETVAL; |
12042
|
2
|
|
|
|
|
|
SV* geometry_factory = ST(1) |
12043
|
|
|
|
|
|
|
; |
12044
|
4
|
50
|
|
|
|
|
Sv sites = ST(2) |
12045
|
|
|
|
|
|
|
; |
12046
|
|
|
|
|
|
|
SV* tolerance; |
12047
|
|
|
|
|
|
|
|
12048
|
2
|
100
|
|
|
|
|
if (items < 4) |
12049
|
1
|
|
|
|
|
|
tolerance = NULL; |
12050
|
|
|
|
|
|
|
else { |
12051
|
1
|
|
|
|
|
|
tolerance = ST(3) |
12052
|
1
|
|
|
|
|
|
; |
12053
|
|
|
|
|
|
|
} |
12054
|
|
|
|
|
|
|
#line 5 "./xsi/triangulate/DelaunayTriangulationBuilder.xsi" |
12055
|
|
|
|
|
|
|
auto builder = std::unique_ptr(new DelaunayTriangulationBuilder()); |
12056
|
|
|
|
|
|
|
GeometryFactory* factory = xs::in(geometry_factory); |
12057
|
|
|
|
|
|
|
|
12058
|
|
|
|
|
|
|
if (sites.is_array_ref()) { |
12059
|
|
|
|
|
|
|
auto seq = std::unique_ptr(Helper::convert_copy(*factory, sites, 2)); |
12060
|
|
|
|
|
|
|
builder->setSites(*seq); |
12061
|
|
|
|
|
|
|
} |
12062
|
|
|
|
|
|
|
else { |
12063
|
|
|
|
|
|
|
auto& g = xs::in(sites); |
12064
|
|
|
|
|
|
|
builder->setSites(g); |
12065
|
|
|
|
|
|
|
} |
12066
|
|
|
|
|
|
|
|
12067
|
|
|
|
|
|
|
if (tolerance) { |
12068
|
|
|
|
|
|
|
builder->setTolerance(Simple(tolerance)); |
12069
|
|
|
|
|
|
|
} |
12070
|
|
|
|
|
|
|
|
12071
|
|
|
|
|
|
|
Object wrapped = xs::out(builder.release()); |
12072
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(geometry_factory), &payload_marker); |
12073
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
12074
|
|
|
|
|
|
|
#line 12075 "Geos_xsgen.cc" |
12075
|
|
|
|
|
|
|
{ |
12076
|
|
|
|
|
|
|
SV * RETVALSV; |
12077
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
12078
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
12079
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
12080
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
12081
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12082
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12083
|
|
|
|
|
|
|
case SVt_PVCV: |
12084
|
|
|
|
|
|
|
case SVt_PVIO: |
12085
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
12086
|
0
|
|
|
|
|
|
break; |
12087
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
12088
|
|
|
|
|
|
|
} |
12089
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
12090
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
12091
|
|
|
|
|
|
|
} |
12092
|
|
|
|
|
|
|
} |
12093
|
2
|
|
|
|
|
|
XSRETURN(1); |
12094
|
2
|
50
|
|
|
|
|
}); } |
12095
|
|
|
|
|
|
|
|
12096
|
|
|
|
|
|
|
|
12097
|
|
|
|
|
|
|
|
12098
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangulate__DelaunayTriangulationBuilder_getEdges) { xs::throw_guard(cv, [=]() |
12099
|
|
|
|
|
|
|
{ |
12100
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
12101
|
2
|
50
|
|
|
|
|
if (items != 1) |
12102
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
12103
|
|
|
|
|
|
|
{ |
12104
|
4
|
|
|
|
|
|
Sv RETVAL; |
12105
|
2
|
50
|
|
|
|
|
DelaunayTriangulationBuilder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
12106
|
|
|
|
|
|
|
; |
12107
|
|
|
|
|
|
|
#line 27 "./xsi/triangulate/DelaunayTriangulationBuilder.xsi" |
12108
|
|
|
|
|
|
|
Object me{ST(0)}; |
12109
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker); |
12110
|
|
|
|
|
|
|
GeometryFactory* factory = xs::in(payload.obj); |
12111
|
|
|
|
|
|
|
auto edges = THIS->getEdges(*factory); |
12112
|
|
|
|
|
|
|
RETVAL = Helper::uplift(edges.release()); |
12113
|
|
|
|
|
|
|
#line 12114 "Geos_xsgen.cc" |
12114
|
|
|
|
|
|
|
{ |
12115
|
|
|
|
|
|
|
SV * RETVALSV; |
12116
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
12117
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
12118
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
12119
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
12120
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12121
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12122
|
|
|
|
|
|
|
case SVt_PVCV: |
12123
|
|
|
|
|
|
|
case SVt_PVIO: |
12124
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
12125
|
0
|
|
|
|
|
|
break; |
12126
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
12127
|
|
|
|
|
|
|
} |
12128
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
12129
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
12130
|
|
|
|
|
|
|
} |
12131
|
|
|
|
|
|
|
} |
12132
|
2
|
|
|
|
|
|
XSRETURN(1); |
12133
|
2
|
50
|
|
|
|
|
}); } |
12134
|
|
|
|
|
|
|
|
12135
|
|
|
|
|
|
|
|
12136
|
|
|
|
|
|
|
|
12137
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangulate__DelaunayTriangulationBuilder_getTriangles) { xs::throw_guard(cv, [=]() |
12138
|
|
|
|
|
|
|
{ |
12139
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
12140
|
2
|
50
|
|
|
|
|
if (items != 1) |
12141
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
12142
|
|
|
|
|
|
|
{ |
12143
|
4
|
|
|
|
|
|
Sv RETVAL; |
12144
|
2
|
50
|
|
|
|
|
DelaunayTriangulationBuilder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
12145
|
|
|
|
|
|
|
; |
12146
|
|
|
|
|
|
|
#line 35 "./xsi/triangulate/DelaunayTriangulationBuilder.xsi" |
12147
|
|
|
|
|
|
|
Object me{ST(0)}; |
12148
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker); |
12149
|
|
|
|
|
|
|
GeometryFactory* factory = xs::in(payload.obj); |
12150
|
|
|
|
|
|
|
auto edges = THIS->getTriangles(*factory); |
12151
|
|
|
|
|
|
|
RETVAL = Helper::uplift(edges.release()); |
12152
|
|
|
|
|
|
|
#line 12153 "Geos_xsgen.cc" |
12153
|
|
|
|
|
|
|
{ |
12154
|
|
|
|
|
|
|
SV * RETVALSV; |
12155
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
12156
|
2
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
12157
|
2
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
12158
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
12159
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12160
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12161
|
|
|
|
|
|
|
case SVt_PVCV: |
12162
|
|
|
|
|
|
|
case SVt_PVIO: |
12163
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
12164
|
0
|
|
|
|
|
|
break; |
12165
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
12166
|
|
|
|
|
|
|
} |
12167
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
12168
|
2
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
12169
|
|
|
|
|
|
|
} |
12170
|
|
|
|
|
|
|
} |
12171
|
2
|
|
|
|
|
|
XSRETURN(1); |
12172
|
2
|
50
|
|
|
|
|
}); } |
12173
|
|
|
|
|
|
|
|
12174
|
|
|
|
|
|
|
|
12175
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/triangulate/DelaunayTriangulationBuilder.xsi' */ |
12176
|
|
|
|
|
|
|
|
12177
|
|
|
|
|
|
|
|
12178
|
|
|
|
|
|
|
/* INCLUDE: Including 'xsi/triangulate/VoronoiDiagramBuilder.xsi' from 'Geos.xs' */ |
12179
|
|
|
|
|
|
|
|
12180
|
|
|
|
|
|
|
|
12181
|
|
|
|
|
|
|
|
12182
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangulate__VoronoiDiagramBuilder_new) { xs::throw_guard(cv, [=]() |
12183
|
|
|
|
|
|
|
{ |
12184
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
12185
|
1
|
50
|
|
|
|
|
if (items < 3 || items > 5) |
|
|
50
|
|
|
|
|
|
12186
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, geometry_factory, sites, tolerance= NULL, env= NULL"); |
12187
|
|
|
|
|
|
|
{ |
12188
|
2
|
|
|
|
|
|
Sv RETVAL; |
12189
|
1
|
|
|
|
|
|
SV* geometry_factory = ST(1) |
12190
|
|
|
|
|
|
|
; |
12191
|
2
|
50
|
|
|
|
|
Sv sites = ST(2) |
12192
|
|
|
|
|
|
|
; |
12193
|
|
|
|
|
|
|
SV* tolerance; |
12194
|
|
|
|
|
|
|
SV* env; |
12195
|
|
|
|
|
|
|
|
12196
|
1
|
50
|
|
|
|
|
if (items < 4) |
12197
|
0
|
|
|
|
|
|
tolerance = NULL; |
12198
|
|
|
|
|
|
|
else { |
12199
|
1
|
|
|
|
|
|
tolerance = ST(3) |
12200
|
1
|
|
|
|
|
|
; |
12201
|
|
|
|
|
|
|
} |
12202
|
|
|
|
|
|
|
|
12203
|
1
|
50
|
|
|
|
|
if (items < 5) |
12204
|
0
|
|
|
|
|
|
env = NULL; |
12205
|
|
|
|
|
|
|
else { |
12206
|
1
|
|
|
|
|
|
env = ST(4) |
12207
|
1
|
|
|
|
|
|
; |
12208
|
|
|
|
|
|
|
} |
12209
|
|
|
|
|
|
|
#line 5 "./xsi/triangulate/VoronoiDiagramBuilder.xsi" |
12210
|
|
|
|
|
|
|
auto builder = std::unique_ptr(new VoronoiDiagramBuilder()); |
12211
|
|
|
|
|
|
|
GeometryFactory* factory = xs::in(geometry_factory); |
12212
|
|
|
|
|
|
|
|
12213
|
|
|
|
|
|
|
if (sites.is_array_ref()) { |
12214
|
|
|
|
|
|
|
auto seq = std::unique_ptr(Helper::convert_copy(*factory, sites, 2)); |
12215
|
|
|
|
|
|
|
builder->setSites(*seq); |
12216
|
|
|
|
|
|
|
} |
12217
|
|
|
|
|
|
|
else { |
12218
|
|
|
|
|
|
|
auto& g = xs::in(sites); |
12219
|
|
|
|
|
|
|
builder->setSites(g); |
12220
|
|
|
|
|
|
|
} |
12221
|
|
|
|
|
|
|
|
12222
|
|
|
|
|
|
|
if (tolerance) { |
12223
|
|
|
|
|
|
|
builder->setTolerance(Simple(tolerance)); |
12224
|
|
|
|
|
|
|
} |
12225
|
|
|
|
|
|
|
|
12226
|
|
|
|
|
|
|
if (env) { |
12227
|
|
|
|
|
|
|
auto envelope = xs::in(env); |
12228
|
|
|
|
|
|
|
builder->setClipEnvelope(envelope); |
12229
|
|
|
|
|
|
|
} |
12230
|
|
|
|
|
|
|
|
12231
|
|
|
|
|
|
|
Object wrapped = xs::out(builder.release()); |
12232
|
|
|
|
|
|
|
wrapped.payload_attach(SvRV(geometry_factory), &payload_marker); |
12233
|
|
|
|
|
|
|
RETVAL = wrapped.ref(); |
12234
|
|
|
|
|
|
|
#line 12235 "Geos_xsgen.cc" |
12235
|
|
|
|
|
|
|
{ |
12236
|
|
|
|
|
|
|
SV * RETVALSV; |
12237
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
12238
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
12239
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
12240
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
12241
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12242
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12243
|
|
|
|
|
|
|
case SVt_PVCV: |
12244
|
|
|
|
|
|
|
case SVt_PVIO: |
12245
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
12246
|
0
|
|
|
|
|
|
break; |
12247
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
12248
|
|
|
|
|
|
|
} |
12249
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
12250
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
12251
|
|
|
|
|
|
|
} |
12252
|
|
|
|
|
|
|
} |
12253
|
1
|
|
|
|
|
|
XSRETURN(1); |
12254
|
1
|
50
|
|
|
|
|
}); } |
12255
|
|
|
|
|
|
|
|
12256
|
|
|
|
|
|
|
|
12257
|
|
|
|
|
|
|
|
12258
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangulate__VoronoiDiagramBuilder_getDiagramEdges) { xs::throw_guard(cv, [=]() |
12259
|
|
|
|
|
|
|
{ |
12260
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
12261
|
1
|
50
|
|
|
|
|
if (items != 1) |
12262
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
12263
|
|
|
|
|
|
|
{ |
12264
|
2
|
|
|
|
|
|
Sv RETVAL; |
12265
|
1
|
50
|
|
|
|
|
VoronoiDiagramBuilder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
12266
|
|
|
|
|
|
|
; |
12267
|
|
|
|
|
|
|
#line 32 "./xsi/triangulate/VoronoiDiagramBuilder.xsi" |
12268
|
|
|
|
|
|
|
Object me{ST(0)}; |
12269
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker); |
12270
|
|
|
|
|
|
|
GeometryFactory* factory = xs::in(payload.obj); |
12271
|
|
|
|
|
|
|
auto edges = THIS->getDiagramEdges(*factory); |
12272
|
|
|
|
|
|
|
RETVAL = Helper::uplift(edges.release()); |
12273
|
|
|
|
|
|
|
#line 12274 "Geos_xsgen.cc" |
12274
|
|
|
|
|
|
|
{ |
12275
|
|
|
|
|
|
|
SV * RETVALSV; |
12276
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
12277
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
12278
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
12279
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
12280
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12281
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12282
|
|
|
|
|
|
|
case SVt_PVCV: |
12283
|
|
|
|
|
|
|
case SVt_PVIO: |
12284
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
12285
|
0
|
|
|
|
|
|
break; |
12286
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
12287
|
|
|
|
|
|
|
} |
12288
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
12289
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
12290
|
|
|
|
|
|
|
} |
12291
|
|
|
|
|
|
|
} |
12292
|
1
|
|
|
|
|
|
XSRETURN(1); |
12293
|
1
|
50
|
|
|
|
|
}); } |
12294
|
|
|
|
|
|
|
|
12295
|
|
|
|
|
|
|
|
12296
|
|
|
|
|
|
|
|
12297
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Geo__Geos__Triangulate__VoronoiDiagramBuilder_getDiagram) { xs::throw_guard(cv, [=]() |
12298
|
|
|
|
|
|
|
{ |
12299
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
12300
|
1
|
50
|
|
|
|
|
if (items != 1) |
12301
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
12302
|
|
|
|
|
|
|
{ |
12303
|
2
|
|
|
|
|
|
Sv RETVAL; |
12304
|
1
|
50
|
|
|
|
|
VoronoiDiagramBuilder* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
12305
|
|
|
|
|
|
|
; |
12306
|
|
|
|
|
|
|
#line 40 "./xsi/triangulate/VoronoiDiagramBuilder.xsi" |
12307
|
|
|
|
|
|
|
Object me{ST(0)}; |
12308
|
|
|
|
|
|
|
auto payload = me.payload(&payload_marker); |
12309
|
|
|
|
|
|
|
GeometryFactory* factory = xs::in(payload.obj); |
12310
|
|
|
|
|
|
|
auto edges = THIS->getDiagram(*factory); |
12311
|
|
|
|
|
|
|
RETVAL = Helper::uplift(edges.release()); |
12312
|
|
|
|
|
|
|
#line 12313 "Geos_xsgen.cc" |
12313
|
|
|
|
|
|
|
{ |
12314
|
|
|
|
|
|
|
SV * RETVALSV; |
12315
|
1
|
|
|
|
|
|
RETVALSV = NULL; |
12316
|
1
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
12317
|
1
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
50
|
|
|
|
|
|
12318
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
12319
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12320
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
0
|
|
|
|
|
|
12321
|
|
|
|
|
|
|
case SVt_PVCV: |
12322
|
|
|
|
|
|
|
case SVt_PVIO: |
12323
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
12324
|
0
|
|
|
|
|
|
break; |
12325
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
12326
|
|
|
|
|
|
|
} |
12327
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
12328
|
1
|
50
|
|
|
|
|
ST(0) = RETVALSV; |
12329
|
|
|
|
|
|
|
} |
12330
|
|
|
|
|
|
|
} |
12331
|
1
|
|
|
|
|
|
XSRETURN(1); |
12332
|
1
|
50
|
|
|
|
|
}); } |
12333
|
|
|
|
|
|
|
|
12334
|
|
|
|
|
|
|
|
12335
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Geos.xs' from 'xsi/triangulate/VoronoiDiagramBuilder.xsi' */ |
12336
|
|
|
|
|
|
|
|
12337
|
|
|
|
|
|
|
#ifdef __cplusplus |
12338
|
|
|
|
|
|
|
extern "C" |
12339
|
|
|
|
|
|
|
#endif |
12340
|
|
|
|
|
|
|
|
12341
|
92
|
|
|
|
|
|
XS_EXTERNAL(boot_Geo__Geos) { xs::throw_guard(cv, [=]() mutable |
12342
|
|
|
|
|
|
|
{ |
12343
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
12344
|
|
|
|
|
|
|
dVAR; dXSARGS; |
12345
|
|
|
|
|
|
|
#else |
12346
|
46
|
50
|
|
|
|
|
dVAR; dXSBOOTARGSXSAPIVERCHK; |
|
|
50
|
|
|
|
|
|
12347
|
|
|
|
|
|
|
#endif |
12348
|
|
|
|
|
|
|
#if (PERL_REVISION == 5 && PERL_VERSION < 9) |
12349
|
|
|
|
|
|
|
char* file = __FILE__; |
12350
|
|
|
|
|
|
|
#else |
12351
|
46
|
|
|
|
|
|
const char* file = __FILE__; |
12352
|
|
|
|
|
|
|
#endif |
12353
|
|
|
|
|
|
|
|
12354
|
|
|
|
|
|
|
PERL_UNUSED_VAR(file); |
12355
|
|
|
|
|
|
|
|
12356
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
12357
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); /* -W */ |
12358
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
12359
|
|
|
|
|
|
|
XS_VERSION_BOOTCHECK; |
12360
|
|
|
|
|
|
|
# ifdef XS_APIVERSION_BOOTCHECK |
12361
|
|
|
|
|
|
|
XS_APIVERSION_BOOTCHECK; |
12362
|
|
|
|
|
|
|
# endif |
12363
|
|
|
|
|
|
|
#endif |
12364
|
|
|
|
|
|
|
|
12365
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::getNull", XS_Geo__Geos__Coordinate_getNull); |
12366
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::new", XS_Geo__Geos__Coordinate_new); |
12367
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Coordinate::x", XS_Geo__Geos__Coordinate_x); |
12368
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
12369
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Coordinate::y", XS_Geo__Geos__Coordinate_x); |
12370
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
12371
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Coordinate::z", XS_Geo__Geos__Coordinate_x); |
12372
|
46
|
|
|
|
|
|
XSANY.any_i32 = 2; |
12373
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::setNull", XS_Geo__Geos__Coordinate_setNull); |
12374
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::isNull", XS_Geo__Geos__Coordinate_isNull); |
12375
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::equals", XS_Geo__Geos__Coordinate_equals); |
12376
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::equals2D", XS_Geo__Geos__Coordinate_equals2D); |
12377
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::equals3D", XS_Geo__Geos__Coordinate_equals3D); |
12378
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::compareTo", XS_Geo__Geos__Coordinate_compareTo); |
12379
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::eq", XS_Geo__Geos__Coordinate_eq); |
12380
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::toString", XS_Geo__Geos__Coordinate_toString); |
12381
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::distance", XS_Geo__Geos__Coordinate_distance); |
12382
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::hashCode", XS_Geo__Geos__Coordinate_hashCode); |
12383
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Coordinate::CLONE_SKIP", XS_Geo__Geos__Coordinate_CLONE_SKIP); |
12384
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Dimension::toDimensionSymbol", XS_Geo__Geos__Dimension_toDimensionSymbol); |
12385
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Dimension::toDimensionValue", XS_Geo__Geos__Dimension_toDimensionValue); |
12386
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::new", XS_Geo__Geos__Envelope_new); |
12387
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::init", XS_Geo__Geos__Envelope_init); |
12388
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::setToNull", XS_Geo__Geos__Envelope_setToNull); |
12389
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getArea", XS_Geo__Geos__Envelope_getArea); |
12390
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getMaxY", XS_Geo__Geos__Envelope_getMaxY); |
12391
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getMaxX", XS_Geo__Geos__Envelope_getMaxX); |
12392
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getMinY", XS_Geo__Geos__Envelope_getMinY); |
12393
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getMinX", XS_Geo__Geos__Envelope_getMinX); |
12394
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getWidth", XS_Geo__Geos__Envelope_getWidth); |
12395
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::getHeight", XS_Geo__Geos__Envelope_getHeight); |
12396
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::isNull", XS_Geo__Geos__Envelope_isNull); |
12397
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::hashCode", XS_Geo__Geos__Envelope_hashCode); |
12398
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::toString", XS_Geo__Geos__Envelope_toString); |
12399
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::eq", XS_Geo__Geos__Envelope_eq); |
12400
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::centre", XS_Geo__Geos__Envelope_centre); |
12401
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::contains", XS_Geo__Geos__Envelope_contains); |
12402
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::covers", XS_Geo__Geos__Envelope_covers); |
12403
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::intersects", XS_Geo__Geos__Envelope_intersects); |
12404
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::expandToInclude", XS_Geo__Geos__Envelope_expandToInclude); |
12405
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::distance", XS_Geo__Geos__Envelope_distance); |
12406
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::translate", XS_Geo__Geos__Envelope_translate); |
12407
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::expandBy", XS_Geo__Geos__Envelope_expandBy); |
12408
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::intersection", XS_Geo__Geos__Envelope_intersection); |
12409
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Envelope::CLONE_SKIP", XS_Geo__Geos__Envelope_CLONE_SKIP); |
12410
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::new", XS_Geo__Geos__PrecisionModel_new); |
12411
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::getScale", XS_Geo__Geos__PrecisionModel_getScale); |
12412
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::getOffsetX", XS_Geo__Geos__PrecisionModel_getOffsetX); |
12413
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::getOffsetY", XS_Geo__Geos__PrecisionModel_getOffsetY); |
12414
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::isFloating", XS_Geo__Geos__PrecisionModel_isFloating); |
12415
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::getMaximumSignificantDigits", XS_Geo__Geos__PrecisionModel_getMaximumSignificantDigits); |
12416
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::getType", XS_Geo__Geos__PrecisionModel_getType); |
12417
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::makePrecise", XS_Geo__Geos__PrecisionModel_makePrecise); |
12418
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::toString", XS_Geo__Geos__PrecisionModel_toString); |
12419
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::PrecisionModel::compareTo", XS_Geo__Geos__PrecisionModel_compareTo); |
12420
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::new", XS_Geo__Geos__IntersectionMatrix_new); |
12421
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::matches", XS_Geo__Geos__IntersectionMatrix_matches); |
12422
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::add", XS_Geo__Geos__IntersectionMatrix_add); |
12423
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::set", XS_Geo__Geos__IntersectionMatrix_set); |
12424
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::setAtLeast", XS_Geo__Geos__IntersectionMatrix_setAtLeast); |
12425
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::setAll", XS_Geo__Geos__IntersectionMatrix_setAll); |
12426
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::setAtLeastIfValid", XS_Geo__Geos__IntersectionMatrix_setAtLeastIfValid); |
12427
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::get", XS_Geo__Geos__IntersectionMatrix_get); |
12428
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isDisjoint", XS_Geo__Geos__IntersectionMatrix_isDisjoint); |
12429
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isIntersects", XS_Geo__Geos__IntersectionMatrix_isIntersects); |
12430
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isWithin", XS_Geo__Geos__IntersectionMatrix_isWithin); |
12431
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isContains", XS_Geo__Geos__IntersectionMatrix_isContains); |
12432
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isCovers", XS_Geo__Geos__IntersectionMatrix_isCovers); |
12433
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isCoveredBy", XS_Geo__Geos__IntersectionMatrix_isCoveredBy); |
12434
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isTouches", XS_Geo__Geos__IntersectionMatrix_isTouches); |
12435
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isCrosses", XS_Geo__Geos__IntersectionMatrix_isCrosses); |
12436
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isEquals", XS_Geo__Geos__IntersectionMatrix_isEquals); |
12437
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::isOverlaps", XS_Geo__Geos__IntersectionMatrix_isOverlaps); |
12438
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::transpose", XS_Geo__Geos__IntersectionMatrix_transpose); |
12439
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::toString", XS_Geo__Geos__IntersectionMatrix_toString); |
12440
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::IntersectionMatrix::CLONE_SKIP", XS_Geo__Geos__IntersectionMatrix_CLONE_SKIP); |
12441
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangle::new", XS_Geo__Geos__Triangle_new); |
12442
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Triangle::p0", XS_Geo__Geos__Triangle_p0); |
12443
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
12444
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Triangle::p1", XS_Geo__Geos__Triangle_p0); |
12445
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
12446
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Triangle::p2", XS_Geo__Geos__Triangle_p0); |
12447
|
46
|
|
|
|
|
|
XSANY.any_i32 = 2; |
12448
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangle::inCentre", XS_Geo__Geos__Triangle_inCentre); |
12449
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangle::circumcentre", XS_Geo__Geos__Triangle_circumcentre); |
12450
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Triangle::isInCircleNonRobust", XS_Geo__Geos__Triangle_isInCircleNonRobust); |
12451
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
12452
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Triangle::isInCircleNormalized", XS_Geo__Geos__Triangle_isInCircleNonRobust); |
12453
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
12454
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Triangle::isInCircleRobust", XS_Geo__Geos__Triangle_isInCircleNonRobust); |
12455
|
46
|
|
|
|
|
|
XSANY.any_i32 = 2; |
12456
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangle::CLONE_SKIP", XS_Geo__Geos__Triangle_CLONE_SKIP); |
12457
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::new", XS_Geo__Geos__LineSegment_new); |
12458
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::getLength", XS_Geo__Geos__LineSegment_getLength); |
12459
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::isHorizontal", XS_Geo__Geos__LineSegment_isHorizontal); |
12460
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::isVertical", XS_Geo__Geos__LineSegment_isVertical); |
12461
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::setCoordinates", XS_Geo__Geos__LineSegment_setCoordinates); |
12462
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::orientationIndex", XS_Geo__Geos__LineSegment_orientationIndex); |
12463
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::reverse", XS_Geo__Geos__LineSegment_reverse); |
12464
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::normalize", XS_Geo__Geos__LineSegment_normalize); |
12465
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::angle", XS_Geo__Geos__LineSegment_angle); |
12466
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::midPoint", XS_Geo__Geos__LineSegment_midPoint); |
12467
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::distance", XS_Geo__Geos__LineSegment_distance); |
12468
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::distancePerpendicular", XS_Geo__Geos__LineSegment_distancePerpendicular); |
12469
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::pointAlong", XS_Geo__Geos__LineSegment_pointAlong); |
12470
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::pointAlongOffset", XS_Geo__Geos__LineSegment_pointAlongOffset); |
12471
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::projectionFactor", XS_Geo__Geos__LineSegment_projectionFactor); |
12472
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::segmentFraction", XS_Geo__Geos__LineSegment_segmentFraction); |
12473
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::project", XS_Geo__Geos__LineSegment_project); |
12474
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::closestPoint", XS_Geo__Geos__LineSegment_closestPoint); |
12475
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::compareTo", XS_Geo__Geos__LineSegment_compareTo); |
12476
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::equalsTopo", XS_Geo__Geos__LineSegment_equalsTopo); |
12477
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::closestPoints", XS_Geo__Geos__LineSegment_closestPoints); |
12478
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::intersection", XS_Geo__Geos__LineSegment_intersection); |
12479
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::lineIntersection", XS_Geo__Geos__LineSegment_lineIntersection); |
12480
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::toGeometry", XS_Geo__Geos__LineSegment_toGeometry); |
12481
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::toString", XS_Geo__Geos__LineSegment_toString); |
12482
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::LineSegment::p0", XS_Geo__Geos__LineSegment_p0); |
12483
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
12484
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::LineSegment::p1", XS_Geo__Geos__LineSegment_p0); |
12485
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
12486
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineSegment::CLONE_SKIP", XS_Geo__Geos__LineSegment_CLONE_SKIP); |
12487
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::create", XS_Geo__Geos__GeometryFactory_create); |
12488
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::getPrecisionModel", XS_Geo__Geos__GeometryFactory_getPrecisionModel); |
12489
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::getSRID", XS_Geo__Geos__GeometryFactory_getSRID); |
12490
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createGeometryCollection", XS_Geo__Geos__GeometryFactory_createGeometryCollection); |
12491
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createPoint", XS_Geo__Geos__GeometryFactory_createPoint); |
12492
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createMultiPoint", XS_Geo__Geos__GeometryFactory_createMultiPoint); |
12493
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createLineString", XS_Geo__Geos__GeometryFactory_createLineString); |
12494
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createMultiLineString", XS_Geo__Geos__GeometryFactory_createMultiLineString); |
12495
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createLinearRing", XS_Geo__Geos__GeometryFactory_createLinearRing); |
12496
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createPolygon", XS_Geo__Geos__GeometryFactory_createPolygon); |
12497
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createMultiPolygon", XS_Geo__Geos__GeometryFactory_createMultiPolygon); |
12498
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::toGeometry", XS_Geo__Geos__GeometryFactory_toGeometry); |
12499
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::createEmptyGeometry", XS_Geo__Geos__GeometryFactory_createEmptyGeometry); |
12500
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryFactory::CLONE_SKIP", XS_Geo__Geos__GeometryFactory_CLONE_SKIP); |
12501
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getSRID", XS_Geo__Geos__Geometry_getSRID); |
12502
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::setSRID", XS_Geo__Geos__Geometry_setSRID); |
12503
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::isEmpty", XS_Geo__Geos__Geometry_isEmpty); |
12504
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::isSimple", XS_Geo__Geos__Geometry_isSimple); |
12505
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::isRectangle", XS_Geo__Geos__Geometry_isRectangle); |
12506
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::isValid", XS_Geo__Geos__Geometry_isValid); |
12507
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getNumPoints", XS_Geo__Geos__Geometry_getNumPoints); |
12508
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getDimension", XS_Geo__Geos__Geometry_getDimension); |
12509
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getCoordinateDimension", XS_Geo__Geos__Geometry_getCoordinateDimension); |
12510
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getBoundaryDimension", XS_Geo__Geos__Geometry_getBoundaryDimension); |
12511
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getNumGeometries", XS_Geo__Geos__Geometry_getNumGeometries); |
12512
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::reverse", XS_Geo__Geos__Geometry_reverse); |
12513
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getGeometryN", XS_Geo__Geos__Geometry_getGeometryN); |
12514
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getCoordinate", XS_Geo__Geos__Geometry_getCoordinate); |
12515
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getGeometryType", XS_Geo__Geos__Geometry_getGeometryType); |
12516
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getGeometryTypeId", XS_Geo__Geos__Geometry_getGeometryTypeId); |
12517
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::toString", XS_Geo__Geos__Geometry_toString); |
12518
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::toText", XS_Geo__Geos__Geometry_toText); |
12519
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::equalsExact", XS_Geo__Geos__Geometry_equalsExact); |
12520
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::equals", XS_Geo__Geos__Geometry_equals); |
12521
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::compareTo", XS_Geo__Geos__Geometry_compareTo); |
12522
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getBoundary", XS_Geo__Geos__Geometry_getBoundary); |
12523
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getArea", XS_Geo__Geos__Geometry_getArea); |
12524
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getLength", XS_Geo__Geos__Geometry_getLength); |
12525
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::distance", XS_Geo__Geos__Geometry_distance); |
12526
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::isWithinDistance", XS_Geo__Geos__Geometry_isWithinDistance); |
12527
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getCentroid", XS_Geo__Geos__Geometry_getCentroid); |
12528
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getInteriorPoint", XS_Geo__Geos__Geometry_getInteriorPoint); |
12529
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::symDifference", XS_Geo__Geos__Geometry_symDifference); |
12530
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::difference", XS_Geo__Geos__Geometry_difference); |
12531
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::Union", XS_Geo__Geos__Geometry_Union); |
12532
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::intersection", XS_Geo__Geos__Geometry_intersection); |
12533
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::convexHull", XS_Geo__Geos__Geometry_convexHull); |
12534
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::buffer", XS_Geo__Geos__Geometry_buffer); |
12535
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::coveredBy", XS_Geo__Geos__Geometry_coveredBy); |
12536
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::covers", XS_Geo__Geos__Geometry_covers); |
12537
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::overlaps", XS_Geo__Geos__Geometry_overlaps); |
12538
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::contains", XS_Geo__Geos__Geometry_contains); |
12539
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::within", XS_Geo__Geos__Geometry_within); |
12540
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::crosses", XS_Geo__Geos__Geometry_crosses); |
12541
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::intersects", XS_Geo__Geos__Geometry_intersects); |
12542
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::touches", XS_Geo__Geos__Geometry_touches); |
12543
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::disjoint", XS_Geo__Geos__Geometry_disjoint); |
12544
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getEnvelope", XS_Geo__Geos__Geometry_getEnvelope); |
12545
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::clone", XS_Geo__Geos__Geometry_clone); |
12546
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getPrecisionModel", XS_Geo__Geos__Geometry_getPrecisionModel); |
12547
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::getCoordinates", XS_Geo__Geos__Geometry_getCoordinates); |
12548
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::relate", XS_Geo__Geos__Geometry_relate); |
12549
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::normalize", XS_Geo__Geos__Geometry_normalize); |
12550
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::CLONE_SKIP", XS_Geo__Geos__Geometry_CLONE_SKIP); |
12551
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Geometry::HOOK_CLONE", XS_Geo__Geos__Geometry_HOOK_CLONE); |
12552
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::GeometryCollection::CLONE_SKIP", XS_Geo__Geos__GeometryCollection_CLONE_SKIP); |
12553
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Point::getX", XS_Geo__Geos__Point_getX); |
12554
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Point::getY", XS_Geo__Geos__Point_getY); |
12555
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Point::reverse", XS_Geo__Geos__Point_reverse); |
12556
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::MultiPoint::CLONE_SKIP", XS_Geo__Geos__MultiPoint_CLONE_SKIP); |
12557
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineString::getPointN", XS_Geo__Geos__LineString_getPointN); |
12558
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineString::getStartPoint", XS_Geo__Geos__LineString_getStartPoint); |
12559
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineString::getEndPoint", XS_Geo__Geos__LineString_getEndPoint); |
12560
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineString::isClosed", XS_Geo__Geos__LineString_isClosed); |
12561
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LineString::isRing", XS_Geo__Geos__LineString_isRing); |
12562
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::MultiLineString::isClosed", XS_Geo__Geos__MultiLineString_isClosed); |
12563
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::LinearRing::reverse", XS_Geo__Geos__LinearRing_reverse); |
12564
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Polygon::getExteriorRing", XS_Geo__Geos__Polygon_getExteriorRing); |
12565
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Polygon::getInteriorRingN", XS_Geo__Geos__Polygon_getInteriorRingN); |
12566
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Polygon::getNumInteriorRing", XS_Geo__Geos__Polygon_getNumInteriorRing); |
12567
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Polygon::tesselate", XS_Geo__Geos__Polygon_tesselate); |
12568
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Polygon::CLONE_SKIP", XS_Geo__Geos__Polygon_CLONE_SKIP); |
12569
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::MultiPolygon::CLONE_SKIP", XS_Geo__Geos__MultiPolygon_CLONE_SKIP); |
12570
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBConstants::CLONE_SKIP", XS_Geo__Geos__WKBConstants_CLONE_SKIP); |
12571
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::new", XS_Geo__Geos__WKBWriter_new); |
12572
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::getOutputDimension", XS_Geo__Geos__WKBWriter_getOutputDimension); |
12573
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::setOutputDimension", XS_Geo__Geos__WKBWriter_setOutputDimension); |
12574
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::getByteOrder", XS_Geo__Geos__WKBWriter_getByteOrder); |
12575
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::setByteOrder", XS_Geo__Geos__WKBWriter_setByteOrder); |
12576
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::getIncludeSRID", XS_Geo__Geos__WKBWriter_getIncludeSRID); |
12577
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::setIncludeSRID", XS_Geo__Geos__WKBWriter_setIncludeSRID); |
12578
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::write", XS_Geo__Geos__WKBWriter_write); |
12579
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::writeHEX", XS_Geo__Geos__WKBWriter_writeHEX); |
12580
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBWriter::CLONE_SKIP", XS_Geo__Geos__WKBWriter_CLONE_SKIP); |
12581
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBReader::read", XS_Geo__Geos__WKBReader_read); |
12582
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKBReader::readHEX", XS_Geo__Geos__WKBReader_readHEX); |
12583
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKTWriter::new", XS_Geo__Geos__WKTWriter_new); |
12584
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKTWriter::setTrim", XS_Geo__Geos__WKTWriter_setTrim); |
12585
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKTWriter::setRoundingPrecision", XS_Geo__Geos__WKTWriter_setRoundingPrecision); |
12586
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKTWriter::write", XS_Geo__Geos__WKTWriter_write); |
12587
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKTWriter::CLONE_SKIP", XS_Geo__Geos__WKTWriter_CLONE_SKIP); |
12588
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::WKTReader::read", XS_Geo__Geos__WKTReader_read); |
12589
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::getGeometry", XS_Geo__Geos__Prep__Geometry_getGeometry); |
12590
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::contains", XS_Geo__Geos__Prep__Geometry_contains); |
12591
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::containsProperly", XS_Geo__Geos__Prep__Geometry_containsProperly); |
12592
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::coveredBy", XS_Geo__Geos__Prep__Geometry_coveredBy); |
12593
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::covers", XS_Geo__Geos__Prep__Geometry_covers); |
12594
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::crosses", XS_Geo__Geos__Prep__Geometry_crosses); |
12595
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::disjoint", XS_Geo__Geos__Prep__Geometry_disjoint); |
12596
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::intersects", XS_Geo__Geos__Prep__Geometry_intersects); |
12597
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::overlaps", XS_Geo__Geos__Prep__Geometry_overlaps); |
12598
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::touches", XS_Geo__Geos__Prep__Geometry_touches); |
12599
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::within", XS_Geo__Geos__Prep__Geometry_within); |
12600
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::toString", XS_Geo__Geos__Prep__Geometry_toString); |
12601
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::Geometry::CLONE_SKIP", XS_Geo__Geos__Prep__Geometry_CLONE_SKIP); |
12602
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Prep::GeometryFactory::prepare", XS_Geo__Geos__Prep__GeometryFactory_prepare); |
12603
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::toDegrees", XS_Geo__Geos__Algorithm_toDegrees); |
12604
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::toRadians", XS_Geo__Geos__Algorithm_toRadians); |
12605
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::angle", XS_Geo__Geos__Algorithm_angle); |
12606
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::isAcute", XS_Geo__Geos__Algorithm_isAcute); |
12607
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::isObtuse", XS_Geo__Geos__Algorithm_isObtuse); |
12608
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::angleBetween", XS_Geo__Geos__Algorithm_angleBetween); |
12609
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::angleBetweenOriented", XS_Geo__Geos__Algorithm_angleBetweenOriented); |
12610
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::interiorAngle", XS_Geo__Geos__Algorithm_interiorAngle); |
12611
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::getTurn", XS_Geo__Geos__Algorithm_getTurn); |
12612
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::normalize", XS_Geo__Geos__Algorithm_normalize); |
12613
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::normalizePositive", XS_Geo__Geos__Algorithm_normalizePositive); |
12614
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::diff", XS_Geo__Geos__Algorithm_diff); |
12615
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::centroid", XS_Geo__Geos__Algorithm_centroid); |
12616
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::centroidArea", XS_Geo__Geos__Algorithm_centroidArea); |
12617
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::centroidLine", XS_Geo__Geos__Algorithm_centroidLine); |
12618
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::centroidPoint", XS_Geo__Geos__Algorithm_centroidPoint); |
12619
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::isPointInRing", XS_Geo__Geos__Algorithm_isPointInRing); |
12620
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::locatePointInRing", XS_Geo__Geos__Algorithm_locatePointInRing); |
12621
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::isOnLine", XS_Geo__Geos__Algorithm_isOnLine); |
12622
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::isCCW", XS_Geo__Geos__Algorithm_isCCW); |
12623
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::computeOrientation", XS_Geo__Geos__Algorithm_computeOrientation); |
12624
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::distancePointLine", XS_Geo__Geos__Algorithm_distancePointLine); |
12625
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::distancePointLinePerpendicular", XS_Geo__Geos__Algorithm_distancePointLinePerpendicular); |
12626
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::distanceLineLine", XS_Geo__Geos__Algorithm_distanceLineLine); |
12627
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::signedArea", XS_Geo__Geos__Algorithm_signedArea); |
12628
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::length", XS_Geo__Geos__Algorithm_length); |
12629
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::orientationIndex", XS_Geo__Geos__Algorithm_orientationIndex); |
12630
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::getIntersection", XS_Geo__Geos__Algorithm_getIntersection); |
12631
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::convexHull", XS_Geo__Geos__Algorithm_convexHull); |
12632
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::interiorPointArea", XS_Geo__Geos__Algorithm_interiorPointArea); |
12633
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::interiorPointLine", XS_Geo__Geos__Algorithm_interiorPointLine); |
12634
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::interiorPointPoint", XS_Geo__Geos__Algorithm_interiorPointPoint); |
12635
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::locate", XS_Geo__Geos__Algorithm_locate); |
12636
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::intersects", XS_Geo__Geos__Algorithm_intersects); |
12637
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::signOfDet2x2", XS_Geo__Geos__Algorithm_signOfDet2x2); |
12638
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::locateIndexedPointInArea", XS_Geo__Geos__Algorithm_locateIndexedPointInArea); |
12639
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::locateSimplePointInArea", XS_Geo__Geos__Algorithm_locateSimplePointInArea); |
12640
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::HCoordinate::new", XS_Geo__Geos__Algorithm__HCoordinate_new); |
12641
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Algorithm::HCoordinate::w", XS_Geo__Geos__Algorithm__HCoordinate_x); |
12642
|
46
|
|
|
|
|
|
XSANY.any_i32 = 2; |
12643
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Algorithm::HCoordinate::x", XS_Geo__Geos__Algorithm__HCoordinate_x); |
12644
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
12645
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Algorithm::HCoordinate::y", XS_Geo__Geos__Algorithm__HCoordinate_x); |
12646
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
12647
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::HCoordinate::getCoordinate", XS_Geo__Geos__Algorithm__HCoordinate_getCoordinate); |
12648
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::HCoordinate::intersection", XS_Geo__Geos__Algorithm__HCoordinate_intersection); |
12649
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::HCoordinate::toString", XS_Geo__Geos__Algorithm__HCoordinate_toString); |
12650
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::HCoordinate::CLONE_SKIP", XS_Geo__Geos__Algorithm__HCoordinate_CLONE_SKIP); |
12651
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::new", XS_Geo__Geos__Algorithm__MinimumDiameter_new); |
12652
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::getMinimumRectangle", XS_Geo__Geos__Algorithm__MinimumDiameter_getMinimumRectangle); |
12653
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::getMinimumDiameter", XS_Geo__Geos__Algorithm__MinimumDiameter_getMinimumDiameter); |
12654
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::getLength", XS_Geo__Geos__Algorithm__MinimumDiameter_getLength); |
12655
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::getWidthCoordinate", XS_Geo__Geos__Algorithm__MinimumDiameter_getWidthCoordinate); |
12656
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::getSupportingSegment", XS_Geo__Geos__Algorithm__MinimumDiameter_getSupportingSegment); |
12657
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::getDiameter", XS_Geo__Geos__Algorithm__MinimumDiameter_getDiameter); |
12658
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::MinimumDiameter::CLONE_SKIP", XS_Geo__Geos__Algorithm__MinimumDiameter_CLONE_SKIP); |
12659
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::new", XS_Geo__Geos__Algorithm__LineIntersector_new); |
12660
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::interpolateZ", XS_Geo__Geos__Algorithm__LineIntersector_interpolateZ); |
12661
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::computeEdgeDistance", XS_Geo__Geos__Algorithm__LineIntersector_computeEdgeDistance); |
12662
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::isSameSignAndNonZero", XS_Geo__Geos__Algorithm__LineIntersector_isSameSignAndNonZero); |
12663
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::hasIntersection", XS_Geo__Geos__Algorithm__LineIntersector_hasIntersection); |
12664
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::isInteriorIntersection", XS_Geo__Geos__Algorithm__LineIntersector_isInteriorIntersection); |
12665
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::setPrecisionModel", XS_Geo__Geos__Algorithm__LineIntersector_setPrecisionModel); |
12666
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::computeIntersection", XS_Geo__Geos__Algorithm__LineIntersector_computeIntersection); |
12667
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::toString", XS_Geo__Geos__Algorithm__LineIntersector_toString); |
12668
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::getIntersectionNum", XS_Geo__Geos__Algorithm__LineIntersector_getIntersectionNum); |
12669
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::isProper", XS_Geo__Geos__Algorithm__LineIntersector_isProper); |
12670
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::getIndexAlongSegment", XS_Geo__Geos__Algorithm__LineIntersector_getIndexAlongSegment); |
12671
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::getEdgeDistance", XS_Geo__Geos__Algorithm__LineIntersector_getEdgeDistance); |
12672
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::getIntersectionAlongSegment", XS_Geo__Geos__Algorithm__LineIntersector_getIntersectionAlongSegment); |
12673
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Algorithm::LineIntersector::CLONE_SKIP", XS_Geo__Geos__Algorithm__LineIntersector_CLONE_SKIP); |
12674
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::compareOrientedCoordinateArray", XS_Geo__Geos__Noding_compareOrientedCoordinateArray); |
12675
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::octant", XS_Geo__Geos__Noding_octant); |
12676
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::checkNodingValid", XS_Geo__Geos__Noding_checkNodingValid); |
12677
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::fastCheckNodingValid", XS_Geo__Geos__Noding_fastCheckNodingValid); |
12678
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::compareSegmentPoints", XS_Geo__Geos__Noding_compareSegmentPoints); |
12679
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::extractSegmentStrings", XS_Geo__Geos__Noding_extractSegmentStrings); |
12680
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::intersects", XS_Geo__Geos__Noding_intersects); |
12681
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentString::size", XS_Geo__Geos__Noding__SegmentString_size); |
12682
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentString::getCoordinate", XS_Geo__Geos__Noding__SegmentString_getCoordinate); |
12683
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentString::getCoordinates", XS_Geo__Geos__Noding__SegmentString_getCoordinates); |
12684
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentString::isClosed", XS_Geo__Geos__Noding__SegmentString_isClosed); |
12685
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentString::toString", XS_Geo__Geos__Noding__SegmentString_toString); |
12686
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentNode::isInterior", XS_Geo__Geos__Noding__SegmentNode_isInterior); |
12687
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentNode::isEndPoint", XS_Geo__Geos__Noding__SegmentNode_isEndPoint); |
12688
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentNode::compareTo", XS_Geo__Geos__Noding__SegmentNode_compareTo); |
12689
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentNode::toString", XS_Geo__Geos__Noding__SegmentNode_toString); |
12690
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentNode::coord", XS_Geo__Geos__Noding__SegmentNode_coord); |
12691
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentNode::segmentIndex", XS_Geo__Geos__Noding__SegmentNode_segmentIndex); |
12692
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::NodedSegmentString::new", XS_Geo__Geos__Noding__NodedSegmentString_new); |
12693
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::NodedSegmentString::addIntersectionNode", XS_Geo__Geos__Noding__NodedSegmentString_addIntersectionNode); |
12694
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::NodedSegmentString::getSegmentOctant", XS_Geo__Geos__Noding__NodedSegmentString_getSegmentOctant); |
12695
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::NodedSegmentString::addIntersections", XS_Geo__Geos__Noding__NodedSegmentString_addIntersections); |
12696
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::NodedSegmentString::addIntersection", XS_Geo__Geos__Noding__NodedSegmentString_addIntersection); |
12697
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::NodedSegmentString::CLONE_SKIP", XS_Geo__Geos__Noding__NodedSegmentString_CLONE_SKIP); |
12698
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::BasicSegmentString::new", XS_Geo__Geos__Noding__BasicSegmentString_new); |
12699
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::BasicSegmentString::DESTROY", XS_Geo__Geos__Noding__BasicSegmentString_DESTROY); |
12700
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::BasicSegmentString::getSegmentOctant", XS_Geo__Geos__Noding__BasicSegmentString_getSegmentOctant); |
12701
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::BasicSegmentString::CLONE_SKIP", XS_Geo__Geos__Noding__BasicSegmentString_CLONE_SKIP); |
12702
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersector::processIntersections", XS_Geo__Geos__Noding__SegmentIntersector_processIntersections); |
12703
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersector::isDone", XS_Geo__Geos__Noding__SegmentIntersector_isDone); |
12704
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::new", XS_Geo__Geos__Noding__SegmentIntersectionDetector_new); |
12705
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::hasIntersection", XS_Geo__Geos__Noding__SegmentIntersectionDetector_hasIntersection); |
12706
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::hasProperIntersection", XS_Geo__Geos__Noding__SegmentIntersectionDetector_hasProperIntersection); |
12707
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::hasNonProperIntersection", XS_Geo__Geos__Noding__SegmentIntersectionDetector_hasNonProperIntersection); |
12708
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::setFindProper", XS_Geo__Geos__Noding__SegmentIntersectionDetector_setFindProper); |
12709
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::setFindAllIntersectionTypes", XS_Geo__Geos__Noding__SegmentIntersectionDetector_setFindAllIntersectionTypes); |
12710
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::getIntersectionSegments", XS_Geo__Geos__Noding__SegmentIntersectionDetector_getIntersectionSegments); |
12711
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::getIntersection", XS_Geo__Geos__Noding__SegmentIntersectionDetector_getIntersection); |
12712
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SegmentIntersectionDetector::CLONE_SKIP", XS_Geo__Geos__Noding__SegmentIntersectionDetector_CLONE_SKIP); |
12713
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SingleInteriorIntersectionFinder::new", XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_new); |
12714
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SingleInteriorIntersectionFinder::hasIntersection", XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_hasIntersection); |
12715
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SingleInteriorIntersectionFinder::getInteriorIntersection", XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_getInteriorIntersection); |
12716
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SingleInteriorIntersectionFinder::getIntersectionSegments", XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_getIntersectionSegments); |
12717
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SingleInteriorIntersectionFinder::CLONE_SKIP", XS_Geo__Geos__Noding__SingleInteriorIntersectionFinder_CLONE_SKIP); |
12718
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::new", XS_Geo__Geos__Noding__IntersectionAdder_new); |
12719
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::getLineIntersector", XS_Geo__Geos__Noding__IntersectionAdder_getLineIntersector); |
12720
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::hasIntersection", XS_Geo__Geos__Noding__IntersectionAdder_hasIntersection); |
12721
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::hasProperIntersection", XS_Geo__Geos__Noding__IntersectionAdder_hasProperIntersection); |
12722
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::hasProperInteriorIntersection", XS_Geo__Geos__Noding__IntersectionAdder_hasProperInteriorIntersection); |
12723
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::hasInteriorIntersection", XS_Geo__Geos__Noding__IntersectionAdder_hasInteriorIntersection); |
12724
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionAdder::CLONE_SKIP", XS_Geo__Geos__Noding__IntersectionAdder_CLONE_SKIP); |
12725
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionFinderAdder::new", XS_Geo__Geos__Noding__IntersectionFinderAdder_new); |
12726
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionFinderAdder::getInteriorIntersections", XS_Geo__Geos__Noding__IntersectionFinderAdder_getInteriorIntersections); |
12727
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IntersectionFinderAdder::CLONE_SKIP", XS_Geo__Geos__Noding__IntersectionFinderAdder_CLONE_SKIP); |
12728
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::Noder::computeNodes", XS_Geo__Geos__Noding__Noder_computeNodes); |
12729
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::Noder::getNodedSubstrings", XS_Geo__Geos__Noding__Noder_getNodedSubstrings); |
12730
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IteratedNoder::new", XS_Geo__Geos__Noding__IteratedNoder_new); |
12731
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IteratedNoder::setMaximumIterations", XS_Geo__Geos__Noding__IteratedNoder_setMaximumIterations); |
12732
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::IteratedNoder::CLONE_SKIP", XS_Geo__Geos__Noding__IteratedNoder_CLONE_SKIP); |
12733
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::ScaledNoder::new", XS_Geo__Geos__Noding__ScaledNoder_new); |
12734
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::ScaledNoder::isIntegerPrecision", XS_Geo__Geos__Noding__ScaledNoder_isIntegerPrecision); |
12735
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::ScaledNoder::CLONE_SKIP", XS_Geo__Geos__Noding__ScaledNoder_CLONE_SKIP); |
12736
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SinglePassNoder::setSegmentIntersector", XS_Geo__Geos__Noding__SinglePassNoder_setSegmentIntersector); |
12737
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SinglePassNoder::CLONE_SKIP", XS_Geo__Geos__Noding__SinglePassNoder_CLONE_SKIP); |
12738
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SimpleNoder::new", XS_Geo__Geos__Noding__SimpleNoder_new); |
12739
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SimpleNoder::CLONE_SKIP", XS_Geo__Geos__Noding__SimpleNoder_CLONE_SKIP); |
12740
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SimpleSnapRounder::new", XS_Geo__Geos__Noding__SimpleSnapRounder_new); |
12741
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SimpleSnapRounder::computeVertexSnaps", XS_Geo__Geos__Noding__SimpleSnapRounder_computeVertexSnaps); |
12742
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Noding::SimpleSnapRounder::CLONE_SKIP", XS_Geo__Geos__Noding__SimpleSnapRounder_CLONE_SKIP); |
12743
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::new", XS_Geo__Geos__Index__MonotoneChain_new); |
12744
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getChains", XS_Geo__Geos__Index__MonotoneChain_getChains); |
12745
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getEnvelope", XS_Geo__Geos__Index__MonotoneChain_getEnvelope); |
12746
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getStartIndex", XS_Geo__Geos__Index__MonotoneChain_getStartIndex); |
12747
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getEndIndex", XS_Geo__Geos__Index__MonotoneChain_getEndIndex); |
12748
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getLineSegment", XS_Geo__Geos__Index__MonotoneChain_getLineSegment); |
12749
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getCoordinates", XS_Geo__Geos__Index__MonotoneChain_getCoordinates); |
12750
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::computeOverlaps", XS_Geo__Geos__Index__MonotoneChain_computeOverlaps); |
12751
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::setId", XS_Geo__Geos__Index__MonotoneChain_setId); |
12752
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChain::getId", XS_Geo__Geos__Index__MonotoneChain_getId); |
12753
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChainOverlapAction::new", XS_Geo__Geos__Index__MonotoneChainOverlapAction_new); |
12754
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::MonotoneChainOverlapAction::overlap", XS_Geo__Geos__Index__MonotoneChainOverlapAction_overlap); |
12755
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Index::MonotoneChainOverlapAction::tempEnv1", XS_Geo__Geos__Index__MonotoneChainOverlapAction_tempEnv1); |
12756
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
12757
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Index::MonotoneChainOverlapAction::tempEnv2", XS_Geo__Geos__Index__MonotoneChainOverlapAction_tempEnv1); |
12758
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
12759
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::SpatialIndex::query", XS_Geo__Geos__Index__SpatialIndex_query); |
12760
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::SpatialIndex::insert", XS_Geo__Geos__Index__SpatialIndex_insert); |
12761
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::SpatialIndex::remove", XS_Geo__Geos__Index__SpatialIndex_remove); |
12762
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::Quadtree::new", XS_Geo__Geos__Index__Quadtree_new); |
12763
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::Quadtree::depth", XS_Geo__Geos__Index__Quadtree_depth); |
12764
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::Quadtree::size", XS_Geo__Geos__Index__Quadtree_size); |
12765
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::Quadtree::queryAll", XS_Geo__Geos__Index__Quadtree_queryAll); |
12766
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::Quadtree::toString", XS_Geo__Geos__Index__Quadtree_toString); |
12767
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Index::STRtree::new", XS_Geo__Geos__Index__STRtree_new); |
12768
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::signExpBits", XS_Geo__Geos__Precision_signExpBits); |
12769
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::numCommonMostSigMantissaBits", XS_Geo__Geos__Precision_numCommonMostSigMantissaBits); |
12770
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::zeroLowerBits", XS_Geo__Geos__Precision_zeroLowerBits); |
12771
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::getBit", XS_Geo__Geos__Precision_getBit); |
12772
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::commonIntersection", XS_Geo__Geos__Precision_commonIntersection); |
12773
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::commonUnion", XS_Geo__Geos__Precision_commonUnion); |
12774
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::commonDifference", XS_Geo__Geos__Precision_commonDifference); |
12775
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::commonSymDifference", XS_Geo__Geos__Precision_commonSymDifference); |
12776
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::commonBuffer", XS_Geo__Geos__Precision_commonBuffer); |
12777
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::enhancedIntersection", XS_Geo__Geos__Precision_enhancedIntersection); |
12778
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::enhancedUnion", XS_Geo__Geos__Precision_enhancedUnion); |
12779
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::enhancedDifference", XS_Geo__Geos__Precision_enhancedDifference); |
12780
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::enhancedSymDifference", XS_Geo__Geos__Precision_enhancedSymDifference); |
12781
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::enhancedBuffer", XS_Geo__Geos__Precision_enhancedBuffer); |
12782
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Precision::addCommonBits", XS_Geo__Geos__Precision_removeCommonBits); |
12783
|
46
|
|
|
|
|
|
XSANY.any_i32 = 1; |
12784
|
46
|
|
|
|
|
|
cv = newXS_deffile("Geo::Geos::Precision::removeCommonBits", XS_Geo__Geos__Precision_removeCommonBits); |
12785
|
46
|
|
|
|
|
|
XSANY.any_i32 = 0; |
12786
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::GeometryPrecisionReducer::new", XS_Geo__Geos__Precision__GeometryPrecisionReducer_new); |
12787
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::GeometryPrecisionReducer::setRemoveCollapsedComponents", XS_Geo__Geos__Precision__GeometryPrecisionReducer_setRemoveCollapsedComponents); |
12788
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::GeometryPrecisionReducer::setPointwise", XS_Geo__Geos__Precision__GeometryPrecisionReducer_setPointwise); |
12789
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::GeometryPrecisionReducer::reduce", XS_Geo__Geos__Precision__GeometryPrecisionReducer_reduce); |
12790
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::GeometryPrecisionReducer::CLONE_SKIP", XS_Geo__Geos__Precision__GeometryPrecisionReducer_CLONE_SKIP); |
12791
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::SimpleGeometryPrecisionReducer::new", XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_new); |
12792
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::SimpleGeometryPrecisionReducer::getPrecisionModel", XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_getPrecisionModel); |
12793
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::SimpleGeometryPrecisionReducer::setRemoveCollapsedComponents", XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_setRemoveCollapsedComponents); |
12794
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::SimpleGeometryPrecisionReducer::getRemoveCollapsed", XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_getRemoveCollapsed); |
12795
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::SimpleGeometryPrecisionReducer::reduce", XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_reduce); |
12796
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Precision::SimpleGeometryPrecisionReducer::CLONE_SKIP", XS_Geo__Geos__Precision__SimpleGeometryPrecisionReducer_CLONE_SKIP); |
12797
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::buffer", XS_Geo__Geos__Operation_buffer); |
12798
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::distance", XS_Geo__Geos__Operation_distance); |
12799
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::nearestPoints", XS_Geo__Geos__Operation_nearestPoints); |
12800
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::closestPoints", XS_Geo__Geos__Operation_closestPoints); |
12801
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::overlayOp", XS_Geo__Geos__Operation_overlayOp); |
12802
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::isValid", XS_Geo__Geos__Operation_isValid); |
12803
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::relate", XS_Geo__Geos__Operation_relate); |
12804
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::mergeLines", XS_Geo__Geos__Operation_mergeLines); |
12805
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::isSequenced", XS_Geo__Geos__Operation_isSequenced); |
12806
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Operation::sequence", XS_Geo__Geos__Operation_sequence); |
12807
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangulate::DelaunayTriangulationBuilder::new", XS_Geo__Geos__Triangulate__DelaunayTriangulationBuilder_new); |
12808
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangulate::DelaunayTriangulationBuilder::getEdges", XS_Geo__Geos__Triangulate__DelaunayTriangulationBuilder_getEdges); |
12809
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangulate::DelaunayTriangulationBuilder::getTriangles", XS_Geo__Geos__Triangulate__DelaunayTriangulationBuilder_getTriangles); |
12810
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangulate::VoronoiDiagramBuilder::new", XS_Geo__Geos__Triangulate__VoronoiDiagramBuilder_new); |
12811
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangulate::VoronoiDiagramBuilder::getDiagramEdges", XS_Geo__Geos__Triangulate__VoronoiDiagramBuilder_getDiagramEdges); |
12812
|
46
|
|
|
|
|
|
newXS_deffile("Geo::Geos::Triangulate::VoronoiDiagramBuilder::getDiagram", XS_Geo__Geos__Triangulate__VoronoiDiagramBuilder_getDiagram); |
12813
|
|
|
|
|
|
|
|
12814
|
|
|
|
|
|
|
/* Initialisation Section */ |
12815
|
|
|
|
|
|
|
|
12816
|
|
|
|
|
|
|
#line 14 "./xsi/Dimension.xsi" |
12817
|
|
|
|
|
|
|
{ |
12818
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::Dimension"); |
12819
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
12820
|
|
|
|
|
|
|
{"TYPE_DONTCARE", Dimension::DimensionType::DONTCARE}, |
12821
|
|
|
|
|
|
|
{"TYPE_True", Dimension::DimensionType::True}, |
12822
|
|
|
|
|
|
|
{"TYPE_False", Dimension::DimensionType::False}, |
12823
|
|
|
|
|
|
|
{"TYPE_P", Dimension::DimensionType::P}, |
12824
|
|
|
|
|
|
|
{"TYPE_L", Dimension::DimensionType::L}, |
12825
|
|
|
|
|
|
|
{"TYPE_A", Dimension::DimensionType::A} |
12826
|
|
|
|
|
|
|
}); |
12827
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
12828
|
|
|
|
|
|
|
} |
12829
|
|
|
|
|
|
|
|
12830
|
|
|
|
|
|
|
#line 42 "./xsi/PrecisionModel.xsi" |
12831
|
|
|
|
|
|
|
{ |
12832
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::PrecisionModel"); |
12833
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
12834
|
|
|
|
|
|
|
{"TYPE_FIXED", PrecisionModel::Type::FIXED}, |
12835
|
|
|
|
|
|
|
{"TYPE_FLOATING", PrecisionModel::Type::FLOATING}, |
12836
|
|
|
|
|
|
|
{"TYPE_FLOATING_SINGLE", PrecisionModel::Type::FLOATING_SINGLE} |
12837
|
|
|
|
|
|
|
}); |
12838
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
12839
|
|
|
|
|
|
|
} |
12840
|
|
|
|
|
|
|
|
12841
|
|
|
|
|
|
|
#line 42 "./xsi/Triangle.xsi" |
12842
|
|
|
|
|
|
|
{ |
12843
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::Triangle")); |
12844
|
|
|
|
|
|
|
} |
12845
|
|
|
|
|
|
|
|
12846
|
|
|
|
|
|
|
#line 123 "./xsi/GeometryFactory.xsi" |
12847
|
|
|
|
|
|
|
{ |
12848
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::GeometryFactory")); |
12849
|
|
|
|
|
|
|
} |
12850
|
|
|
|
|
|
|
|
12851
|
|
|
|
|
|
|
#line 139 "./xsi/Geometry.xsi" |
12852
|
|
|
|
|
|
|
{ |
12853
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::Geometry"); |
12854
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
12855
|
|
|
|
|
|
|
{"TYPE_GEOS_POINT", GeometryTypeId::GEOS_POINT}, |
12856
|
|
|
|
|
|
|
{"TYPE_GEOS_LINESTRING", GeometryTypeId::GEOS_LINESTRING}, |
12857
|
|
|
|
|
|
|
{"TYPE_GEOS_LINEARRING", GeometryTypeId::GEOS_LINEARRING}, |
12858
|
|
|
|
|
|
|
{"TYPE_GEOS_POLYGON", GeometryTypeId::GEOS_POLYGON}, |
12859
|
|
|
|
|
|
|
{"TYPE_GEOS_MULTIPOINT", GeometryTypeId::GEOS_MULTIPOINT}, |
12860
|
|
|
|
|
|
|
{"TYPE_GEOS_MULTILINESTRING", GeometryTypeId::GEOS_MULTILINESTRING}, |
12861
|
|
|
|
|
|
|
{"TYPE_GEOS_MULTIPOLYGON", GeometryTypeId::GEOS_MULTIPOLYGON}, |
12862
|
|
|
|
|
|
|
{"TYPE_GEOS_GEOMETRYCOLLECTION", GeometryTypeId::GEOS_GEOMETRYCOLLECTION}, |
12863
|
|
|
|
|
|
|
|
12864
|
|
|
|
|
|
|
{"TYPE_CAP_ROUND", geos::operation::buffer::BufferParameters::CAP_ROUND}, |
12865
|
|
|
|
|
|
|
{"TYPE_CAP_FLAT", geos::operation::buffer::BufferParameters::CAP_FLAT}, |
12866
|
|
|
|
|
|
|
{"TYPE_CAP_SQUARE", geos::operation::buffer::BufferParameters::CAP_SQUARE} |
12867
|
|
|
|
|
|
|
}); |
12868
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
12869
|
|
|
|
|
|
|
|
12870
|
|
|
|
|
|
|
Stash("Geo::Geos::GeometryCollection").inherit("Geo::Geos::Geometry"); |
12871
|
|
|
|
|
|
|
|
12872
|
|
|
|
|
|
|
Stash("Geo::Geos::Puntal", GV_ADD).mark_as_loaded("Geo::Geos"); |
12873
|
|
|
|
|
|
|
Stash("Geo::Geos::Puntal").inherit("Geo::Geos::Geometry"); |
12874
|
|
|
|
|
|
|
|
12875
|
|
|
|
|
|
|
Stash("Geo::Geos::Lineal", GV_ADD).mark_as_loaded("Geo::Geos"); |
12876
|
|
|
|
|
|
|
Stash("Geo::Geos::Lineal").inherit("Geo::Geos::Geometry"); |
12877
|
|
|
|
|
|
|
|
12878
|
|
|
|
|
|
|
Stash("Geo::Geos::Polygonal", GV_ADD).mark_as_loaded("Geo::Geos"); |
12879
|
|
|
|
|
|
|
Stash("Geo::Geos::Polygonal").inherit("Geo::Geos::Geometry"); |
12880
|
|
|
|
|
|
|
} |
12881
|
|
|
|
|
|
|
|
12882
|
|
|
|
|
|
|
#line 6 "./xsi/GeometryCollection.xsi" |
12883
|
|
|
|
|
|
|
{ |
12884
|
|
|
|
|
|
|
Stash("Geo::Geos::GeometryCollection").inherit("Geo::Geos::Geometry"); |
12885
|
|
|
|
|
|
|
} |
12886
|
|
|
|
|
|
|
|
12887
|
|
|
|
|
|
|
#line 10 "./xsi/Point.xsi" |
12888
|
|
|
|
|
|
|
{ |
12889
|
|
|
|
|
|
|
Stash("Geo::Geos::Point").inherit("Geo::Geos::Puntal"); |
12890
|
|
|
|
|
|
|
} |
12891
|
|
|
|
|
|
|
|
12892
|
|
|
|
|
|
|
#line 6 "./xsi/MultiPoint.xsi" |
12893
|
|
|
|
|
|
|
{ |
12894
|
|
|
|
|
|
|
Stash("Geo::Geos::MultiPoint").inherit("Geo::Geos::Puntal"); |
12895
|
|
|
|
|
|
|
Stash("Geo::Geos::MultiPoint").inherit("Geo::Geos::GeometryCollection"); |
12896
|
|
|
|
|
|
|
} |
12897
|
|
|
|
|
|
|
|
12898
|
|
|
|
|
|
|
#line 14 "./xsi/LineString.xsi" |
12899
|
|
|
|
|
|
|
{ |
12900
|
|
|
|
|
|
|
Stash("Geo::Geos::LineString").inherit("Geo::Geos::Lineal"); |
12901
|
|
|
|
|
|
|
} |
12902
|
|
|
|
|
|
|
|
12903
|
|
|
|
|
|
|
#line 6 "./xsi/MultiLineString.xsi" |
12904
|
|
|
|
|
|
|
{ |
12905
|
|
|
|
|
|
|
Stash("Geo::Geos::MultiLineString").inherit("Geo::Geos::Lineal"); |
12906
|
|
|
|
|
|
|
Stash("Geo::Geos::MultiLineString").inherit("Geo::Geos::GeometryCollection"); |
12907
|
|
|
|
|
|
|
} |
12908
|
|
|
|
|
|
|
|
12909
|
|
|
|
|
|
|
#line 6 "./xsi/LinearRing.xsi" |
12910
|
|
|
|
|
|
|
{ |
12911
|
|
|
|
|
|
|
Stash("Geo::Geos::LinearRing").inherit("Geo::Geos::LineString"); |
12912
|
|
|
|
|
|
|
} |
12913
|
|
|
|
|
|
|
|
12914
|
|
|
|
|
|
|
#line 23 "./xsi/Polygon.xsi" |
12915
|
|
|
|
|
|
|
{ |
12916
|
|
|
|
|
|
|
Stash("Geo::Geos::Polygon").inherit("Geo::Geos::Polygonal"); |
12917
|
|
|
|
|
|
|
} |
12918
|
|
|
|
|
|
|
|
12919
|
|
|
|
|
|
|
#line 6 "./xsi/MultiPolygon.xsi" |
12920
|
|
|
|
|
|
|
{ |
12921
|
|
|
|
|
|
|
Stash("Geo::Geos::MultiPolygon").inherit("Geo::Geos::Polygonal"); |
12922
|
|
|
|
|
|
|
Stash("Geo::Geos::MultiPolygon").inherit("Geo::Geos::GeometryCollection"); |
12923
|
|
|
|
|
|
|
} |
12924
|
|
|
|
|
|
|
|
12925
|
|
|
|
|
|
|
#line 6 "./xsi/WKBConstants.xsi" |
12926
|
|
|
|
|
|
|
{ |
12927
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::WKBConstants"); |
12928
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
12929
|
|
|
|
|
|
|
//{"TYPE_BYTEORDER_BE", WKBConstants::wkbXDR}, |
12930
|
|
|
|
|
|
|
//{"TYPE_BYTEORDER_LE", WKBConstants::wkbNDR}, |
12931
|
|
|
|
|
|
|
{"TYPE_BYTEORDER_BE", 0}, |
12932
|
|
|
|
|
|
|
{"TYPE_BYTEORDER_LE", 1}, |
12933
|
|
|
|
|
|
|
|
12934
|
|
|
|
|
|
|
{"TYPE_WKB_POINT", WKBConstants::wkbPoint}, |
12935
|
|
|
|
|
|
|
{"TYPE_WKB_LINESTRING", WKBConstants::wkbLineString}, |
12936
|
|
|
|
|
|
|
{"TYPE_WKB_POLYGON", WKBConstants::wkbPolygon}, |
12937
|
|
|
|
|
|
|
{"TYPE_WKB_MULTIPOINT", WKBConstants::wkbMultiPoint}, |
12938
|
|
|
|
|
|
|
{"TYPE_WKB_MULTILINESTRING", WKBConstants::wkbMultiLineString}, |
12939
|
|
|
|
|
|
|
{"TYPE_WKB_MULTIPOLYGON", WKBConstants::wkbMultiPolygon}, |
12940
|
|
|
|
|
|
|
{"TYPE_WKB_GEOMETRYCOLLECTION", WKBConstants::wkbGeometryCollection} |
12941
|
|
|
|
|
|
|
}); |
12942
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
12943
|
|
|
|
|
|
|
} |
12944
|
|
|
|
|
|
|
|
12945
|
|
|
|
|
|
|
#line 202 "./xsi/algorithm.xsi" |
12946
|
|
|
|
|
|
|
{ |
12947
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::Algorithm"); |
12948
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
12949
|
|
|
|
|
|
|
{"TYPE_TURN_CLOCKWISE", CGAlgorithms::CLOCKWISE}, |
12950
|
|
|
|
|
|
|
{"TYPE_TURN_COLLINEAR", CGAlgorithms::COLLINEAR}, |
12951
|
|
|
|
|
|
|
{"TYPE_TURN_COUNTERCLOCKWISE", CGAlgorithms::COUNTERCLOCKWISE}, |
12952
|
|
|
|
|
|
|
|
12953
|
|
|
|
|
|
|
{"TYPE_ORIENT_RIGHT", CGAlgorithms::RIGHT}, |
12954
|
|
|
|
|
|
|
{"TYPE_ORIENT_LEFT" , CGAlgorithms::LEFT}, |
12955
|
|
|
|
|
|
|
{"TYPE_ORIENT_STRAIGHT", CGAlgorithms::STRAIGHT} |
12956
|
|
|
|
|
|
|
}); |
12957
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
12958
|
|
|
|
|
|
|
} |
12959
|
|
|
|
|
|
|
|
12960
|
|
|
|
|
|
|
#line 73 "./xsi/algorithm/HCoordinate.xsi" |
12961
|
|
|
|
|
|
|
{ |
12962
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::Algorithm::HCoordinate")); |
12963
|
|
|
|
|
|
|
} |
12964
|
|
|
|
|
|
|
|
12965
|
|
|
|
|
|
|
#line 46 "./xsi/algorithm/MinimumDiameter.xsi" |
12966
|
|
|
|
|
|
|
{ |
12967
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::Algorithm::MinimumDiameter")); |
12968
|
|
|
|
|
|
|
} |
12969
|
|
|
|
|
|
|
|
12970
|
|
|
|
|
|
|
#line 70 "./xsi/algorithm/LineIntersector.xsi" |
12971
|
|
|
|
|
|
|
{ |
12972
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::Algorithm::LineIntersector"); |
12973
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
12974
|
|
|
|
|
|
|
{"TYPE_NO_INTERSECTION", LineIntersector::NO_INTERSECTION}, |
12975
|
|
|
|
|
|
|
{"TYPE_POINT_INTERSECTION", LineIntersector::POINT_INTERSECTION}, |
12976
|
|
|
|
|
|
|
{"TYPE_COLLINEAR_INTERSECTION", LineIntersector::COLLINEAR_INTERSECTION} |
12977
|
|
|
|
|
|
|
}); |
12978
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
12979
|
|
|
|
|
|
|
} |
12980
|
|
|
|
|
|
|
|
12981
|
|
|
|
|
|
|
#line 88 "./xsi/noding.xsi" |
12982
|
|
|
|
|
|
|
{ |
12983
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::Noding")); |
12984
|
|
|
|
|
|
|
} |
12985
|
|
|
|
|
|
|
|
12986
|
|
|
|
|
|
|
#line 39 "./xsi/noding/NodedSegmentString.xsi" |
12987
|
|
|
|
|
|
|
{ |
12988
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::NodedSegmentString").inherit("Geo::Geos::Noding::SegmentString"); |
12989
|
|
|
|
|
|
|
} |
12990
|
|
|
|
|
|
|
|
12991
|
|
|
|
|
|
|
#line 19 "./xsi/noding/BasicSegmentString.xsi" |
12992
|
|
|
|
|
|
|
{ |
12993
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::BasicSegmentString").inherit("Geo::Geos::Noding::SegmentString"); |
12994
|
|
|
|
|
|
|
} |
12995
|
|
|
|
|
|
|
|
12996
|
|
|
|
|
|
|
#line 35 "./xsi/noding/SegmentIntersectionDetector.xsi" |
12997
|
|
|
|
|
|
|
{ |
12998
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::SegmentIntersectionDetector").inherit("Geo::Geos::Noding::SegmentIntersector"); |
12999
|
|
|
|
|
|
|
} |
13000
|
|
|
|
|
|
|
|
13001
|
|
|
|
|
|
|
#line 31 "./xsi/noding/SingleInteriorIntersectionFinder.xsi" |
13002
|
|
|
|
|
|
|
{ |
13003
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::SingleInteriorIntersectionFinder").inherit("Geo::Geos::Noding::SegmentIntersector"); |
13004
|
|
|
|
|
|
|
} |
13005
|
|
|
|
|
|
|
|
13006
|
|
|
|
|
|
|
#line 29 "./xsi/noding/IntersectionAdder.xsi" |
13007
|
|
|
|
|
|
|
{ |
13008
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::IntersectionAdder").inherit("Geo::Geos::Noding::SegmentIntersector"); |
13009
|
|
|
|
|
|
|
} |
13010
|
|
|
|
|
|
|
|
13011
|
|
|
|
|
|
|
#line 37 "./xsi/noding/IntersectionFinderAdder.xsi" |
13012
|
|
|
|
|
|
|
{ |
13013
|
|
|
|
|
|
|
payload_marker_IntersectionFinderAdder.svt_free = payload_marker_IntersectionFinderAdder_free; |
13014
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::IntersectionFinderAdder").inherit("Geo::Geos::Noding::SegmentIntersector"); |
13015
|
|
|
|
|
|
|
} |
13016
|
|
|
|
|
|
|
|
13017
|
|
|
|
|
|
|
#line 37 "./xsi/noding/Noder.xsi" |
13018
|
|
|
|
|
|
|
{ |
13019
|
|
|
|
|
|
|
payload_marker_Noder.svt_free = payload_marker_Noder_free; |
13020
|
|
|
|
|
|
|
} |
13021
|
|
|
|
|
|
|
|
13022
|
|
|
|
|
|
|
#line 15 "./xsi/noding/IteratedNoder.xsi" |
13023
|
|
|
|
|
|
|
{ |
13024
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::IteratedNoder").inherit("Geo::Geos::Noding::Noder"); |
13025
|
|
|
|
|
|
|
} |
13026
|
|
|
|
|
|
|
|
13027
|
|
|
|
|
|
|
#line 15 "./xsi/noding/ScaledNoder.xsi" |
13028
|
|
|
|
|
|
|
{ |
13029
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::ScaledNoder").inherit("Geo::Geos::Noding::Noder"); |
13030
|
|
|
|
|
|
|
} |
13031
|
|
|
|
|
|
|
|
13032
|
|
|
|
|
|
|
#line 21 "./xsi/noding/SinglePassNoder.xsi" |
13033
|
|
|
|
|
|
|
{ |
13034
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::SinglePassNoder").inherit("Geo::Geos::Noding::Noder"); |
13035
|
|
|
|
|
|
|
} |
13036
|
|
|
|
|
|
|
|
13037
|
|
|
|
|
|
|
#line 16 "./xsi/noding/SimpleNoder.xsi" |
13038
|
|
|
|
|
|
|
{ |
13039
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::SimpleNoder").inherit("Geo::Geos::Noding::SinglePassNoder"); |
13040
|
|
|
|
|
|
|
} |
13041
|
|
|
|
|
|
|
|
13042
|
|
|
|
|
|
|
#line 25 "./xsi/noding/SimpleSnapRounder.xsi" |
13043
|
|
|
|
|
|
|
{ |
13044
|
|
|
|
|
|
|
Stash("Geo::Geos::Noding::SimpleSnapRounder").inherit("Geo::Geos::Noding::Noder"); |
13045
|
|
|
|
|
|
|
} |
13046
|
|
|
|
|
|
|
|
13047
|
|
|
|
|
|
|
#line 55 "./xsi/index/MonotoneChain.xsi" |
13048
|
|
|
|
|
|
|
{ |
13049
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::Index::MonotoneChain")); |
13050
|
|
|
|
|
|
|
payload_marker_MonotoneChain.svt_free = payload_marker_MonotoneChain_free; |
13051
|
|
|
|
|
|
|
} |
13052
|
|
|
|
|
|
|
|
13053
|
|
|
|
|
|
|
#line 43 "./xsi/index/SpatialIndex.xsi" |
13054
|
|
|
|
|
|
|
{ |
13055
|
|
|
|
|
|
|
payload_marker_SVs_map.svt_free = payload_marker_SVs_map_free; |
13056
|
|
|
|
|
|
|
} |
13057
|
|
|
|
|
|
|
|
13058
|
|
|
|
|
|
|
#line 27 "./xsi/index/Quadtree.xsi" |
13059
|
|
|
|
|
|
|
{ |
13060
|
|
|
|
|
|
|
Stash("Geo::Geos::Index::Quadtree").inherit("Geo::Geos::Index::SpatialIndex"); |
13061
|
|
|
|
|
|
|
} |
13062
|
|
|
|
|
|
|
|
13063
|
|
|
|
|
|
|
#line 12 "./xsi/index/STRtree.xsi" |
13064
|
|
|
|
|
|
|
{ |
13065
|
|
|
|
|
|
|
Stash("Geo::Geos::Index::STRtree").inherit("Geo::Geos::Index::SpatialIndex"); |
13066
|
|
|
|
|
|
|
} |
13067
|
|
|
|
|
|
|
|
13068
|
|
|
|
|
|
|
#line 73 "./xsi/precision.xsi" |
13069
|
|
|
|
|
|
|
{ |
13070
|
|
|
|
|
|
|
xs::exp::autoexport(Stash("Geo::Geos::Precision")); |
13071
|
|
|
|
|
|
|
} |
13072
|
|
|
|
|
|
|
|
13073
|
|
|
|
|
|
|
#line 95 "./xsi/operation.xsi" |
13074
|
|
|
|
|
|
|
{ |
13075
|
|
|
|
|
|
|
auto this_stash = Stash("Geo::Geos::Operation"); |
13076
|
|
|
|
|
|
|
xs::exp::create_constants(this_stash, { |
13077
|
|
|
|
|
|
|
{"TYPE_OP_INTERSECTION", OverlayOp::OpCode::opINTERSECTION}, |
13078
|
|
|
|
|
|
|
{"TYPE_OP_UNION", OverlayOp::OpCode::opUNION}, |
13079
|
|
|
|
|
|
|
{"TYPE_OP_DIFFERENCE", OverlayOp::OpCode::opDIFFERENCE}, |
13080
|
|
|
|
|
|
|
{"TYPE_OP_SYMDIFFERENCE", OverlayOp::OpCode::opSYMDIFFERENCE}, |
13081
|
|
|
|
|
|
|
|
13082
|
|
|
|
|
|
|
{"TYPE_BOUNDARY_NODE_RULE_MOD2", 0}, |
13083
|
|
|
|
|
|
|
{"TYPE_BOUNDARY_ENDPOINT", 1}, |
13084
|
|
|
|
|
|
|
{"TYPE_BOUNDARY_MULTIVALENT_ENDPOINT", 2}, |
13085
|
|
|
|
|
|
|
{"TYPE_BOUNDARY_MONOVALENT_ENDPOINT", 3}, |
13086
|
|
|
|
|
|
|
{"TYPE_BOUNDARY_OGCSFS", 4} |
13087
|
|
|
|
|
|
|
}); |
13088
|
|
|
|
|
|
|
xs::exp::autoexport(this_stash); |
13089
|
|
|
|
|
|
|
} |
13090
|
|
|
|
|
|
|
|
13091
|
|
|
|
|
|
|
#line 13092 "Geos_xsgen.cc" |
13092
|
|
|
|
|
|
|
|
13093
|
|
|
|
|
|
|
/* End of Initialisation Section */ |
13094
|
|
|
|
|
|
|
|
13095
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
13096
|
|
|
|
|
|
|
# if PERL_VERSION_GE(5, 9, 0) |
13097
|
|
|
|
|
|
|
if (PL_unitcheckav) |
13098
|
|
|
|
|
|
|
call_list(PL_scopestack_ix, PL_unitcheckav); |
13099
|
|
|
|
|
|
|
# endif |
13100
|
|
|
|
|
|
|
XSRETURN_YES; |
13101
|
|
|
|
|
|
|
#else |
13102
|
46
|
|
|
|
|
|
Perl_xs_boot_epilog(aTHX_ ax); |
13103
|
|
|
|
|
|
|
#endif |
13104
|
276
|
50
|
|
|
|
|
}); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
13105
|
|
|
|
|
|
|
|