/src/geos/capi/geos_c.cpp
Line | Count | Source |
1 | | /************************************************************************ |
2 | | * |
3 | | * |
4 | | * C-Wrapper for GEOS library |
5 | | * |
6 | | * Copyright (C) 2010 2011 Sandro Santilli <strk@kbt.io> |
7 | | * Copyright (C) 2005-2006 Refractions Research Inc. |
8 | | * |
9 | | * This is free software; you can redistribute and/or modify it under |
10 | | * the terms of the GNU Lesser General Public Licence as published |
11 | | * by the Free Software Foundation. |
12 | | * See the COPYING file for more information. |
13 | | * |
14 | | * Author: Sandro Santilli <strk@kbt.io> |
15 | | * |
16 | | ***********************************************************************/ |
17 | | |
18 | | #include <geos/algorithm/CurveToLineParams.h> |
19 | | #include <geos/algorithm/LineToCurveParams.h> |
20 | | #include <geos/geom/prep/PreparedGeometryFactory.h> |
21 | | #include <geos/index/strtree/TemplateSTRtree.h> |
22 | | #include <geos/io/WKTReader.h> |
23 | | #include <geos/io/WKBReader.h> |
24 | | #include <geos/io/WKTWriter.h> |
25 | | #include <geos/io/WKBWriter.h> |
26 | | #include <geos/io/GeoJSONReader.h> |
27 | | #include <geos/io/GeoJSONWriter.h> |
28 | | #include <geos/operation/buffer/BufferParameters.h> |
29 | | #include <geos/operation/cluster/Clusters.h> |
30 | | #include <geos/util/Interrupt.h> |
31 | | |
32 | | #include <stdexcept> |
33 | | #include <new> |
34 | | |
35 | | #ifdef _MSC_VER |
36 | | #pragma warning(disable : 4099) |
37 | | #endif |
38 | | |
39 | | // Some extra magic to make type declarations in geos_c.h work - |
40 | | // for cross-checking of types in header. |
41 | | // NOTE: the below defines or struct definition must be kept in exact |
42 | | // sync between geos_c.cpp and geos_ts_c.cpp to avoid C++ One Definition Rule |
43 | | // violations. |
44 | | #define GEOSGeometry geos::geom::Geometry |
45 | | #define GEOSPreparedGeometry geos::geom::prep::PreparedGeometry |
46 | | #define GEOSClusterInfo geos::operation::cluster::Clusters |
47 | | #define GEOSCoordSequence geos::geom::CoordinateSequence |
48 | | #define GEOSCurveToLineParams geos::algorithm::CurveToLineParams |
49 | | #define GEOSBufferParams geos::operation::buffer::BufferParameters |
50 | | #define GEOSLineToCurveParams geos::algorithm::LineToCurveParams |
51 | | #define GEOSSTRtree geos::index::strtree::TemplateSTRtree<void*> |
52 | | #define GEOSWKTReader geos::io::WKTReader |
53 | | #define GEOSWKTWriter geos::io::WKTWriter |
54 | | #define GEOSWKBReader geos::io::WKBReader |
55 | | #define GEOSWKBWriter geos::io::WKBWriter |
56 | | #define GEOSGeoJSONReader geos::io::GeoJSONReader |
57 | | #define GEOSGeoJSONWriter geos::io::GeoJSONWriter |
58 | | |
59 | | // Implementation struct for the GEOSCoverageCleanParams object |
60 | | typedef struct { |
61 | | double snappingDistance; |
62 | | int overlapMergeStrategy; |
63 | | double gapMaximumWidth; |
64 | | } GEOSCoverageCleanParams; |
65 | | |
66 | | // Implementation struct for the GEOSMakeValidParams object |
67 | | typedef struct { |
68 | | int method; |
69 | | int keepCollapsed; |
70 | | } GEOSMakeValidParams; |
71 | | |
72 | | // Implementation struct for the GEOSisSimpleParams object |
73 | | typedef struct { |
74 | | bool findAllLocations; |
75 | | int boundaryNodeRule; |
76 | | } GEOSisSimpleParams; |
77 | | |
78 | | #include "geos_c.h" |
79 | | |
80 | | /// Define this if you want operations triggering Exceptions to |
81 | | /// be printed (will use the NOTIFY channel - only implemented for GEOSUnion so far) |
82 | | /// |
83 | | #undef VERBOSE_EXCEPTIONS |
84 | | |
85 | | #include <geos/export.h> |
86 | | |
87 | | /* |
88 | | #if defined(_MSC_VER) |
89 | | # define GEOS_DLL __declspec(dllexport) |
90 | | #else |
91 | | # define GEOS_DLL |
92 | | #endif |
93 | | */ |
94 | | |
95 | | // import the most frequently used definitions globally |
96 | | using geos::geom::Geometry; |
97 | | using geos::geom::LineString; |
98 | | using geos::geom::Polygon; |
99 | | using geos::geom::CoordinateSequence; |
100 | | using geos::geom::GeometryFactory; |
101 | | |
102 | | using geos::io::WKTReader; |
103 | | using geos::io::WKTWriter; |
104 | | using geos::io::WKBReader; |
105 | | using geos::io::WKBWriter; |
106 | | using geos::io::GeoJSONReader; |
107 | | using geos::io::GeoJSONWriter; |
108 | | |
109 | | |
110 | | typedef std::unique_ptr<Geometry> GeomPtr; |
111 | | |
112 | | //## GLOBALS ################################################ |
113 | | |
114 | | // NOTE: SRID will have to be changed after geometry creation |
115 | | GEOSContextHandle_t handle = NULL; |
116 | | |
117 | | extern "C" { |
118 | | |
119 | | void |
120 | | initGEOS(GEOSMessageHandler nf, GEOSMessageHandler ef) |
121 | 4 | { |
122 | 4 | if(! handle) { |
123 | 4 | handle = initGEOS_r(nf, ef); |
124 | 4 | } |
125 | 0 | else { |
126 | 0 | GEOSContext_setNoticeHandler_r(handle, nf); |
127 | 0 | GEOSContext_setErrorHandler_r(handle, ef); |
128 | 0 | } |
129 | | |
130 | 4 | geos::util::Interrupt::cancel(); |
131 | 4 | } |
132 | | |
133 | | void |
134 | | finishGEOS(void) |
135 | 0 | { |
136 | 0 | if(handle != NULL) { |
137 | 0 | finishGEOS_r(handle); |
138 | 0 | handle = NULL; |
139 | 0 | } |
140 | 0 | } |
141 | | |
142 | | GEOSInterruptCallback* |
143 | | GEOS_interruptRegisterCallback(GEOSInterruptCallback* cb) |
144 | 0 | { |
145 | 0 | return geos::util::Interrupt::registerCallback(cb); |
146 | 0 | } |
147 | | |
148 | | void |
149 | | GEOS_interruptRequest(void) |
150 | 0 | { |
151 | 0 | geos::util::Interrupt::request(); |
152 | 0 | } |
153 | | |
154 | | void |
155 | | GEOS_interruptCancel(void) |
156 | 0 | { |
157 | 0 | geos::util::Interrupt::cancel(); |
158 | 0 | } |
159 | | |
160 | | void |
161 | | GEOSFree(void* buffer) |
162 | 37.5k | { |
163 | 37.5k | GEOSFree_r(handle, buffer); |
164 | 37.5k | } |
165 | | |
166 | | /**************************************************************** |
167 | | ** relate()-related functions |
168 | | ** return 0 = false, 1 = true, 2 = error occurred |
169 | | ** |
170 | | */ |
171 | | char |
172 | | GEOSDisjoint(const Geometry* g1, const Geometry* g2) |
173 | 0 | { |
174 | 0 | return GEOSDisjoint_r(handle, g1, g2); |
175 | 0 | } |
176 | | |
177 | | char |
178 | | GEOSTouches(const Geometry* g1, const Geometry* g2) |
179 | 0 | { |
180 | 0 | return GEOSTouches_r(handle, g1, g2); |
181 | 0 | } |
182 | | |
183 | | char |
184 | | GEOSIntersects(const Geometry* g1, const Geometry* g2) |
185 | 0 | { |
186 | 0 | return GEOSIntersects_r(handle, g1, g2); |
187 | 0 | } |
188 | | |
189 | | char |
190 | | GEOSCrosses(const Geometry* g1, const Geometry* g2) |
191 | 0 | { |
192 | 0 | return GEOSCrosses_r(handle, g1, g2); |
193 | 0 | } |
194 | | |
195 | | char |
196 | | GEOSWithin(const Geometry* g1, const Geometry* g2) |
197 | 0 | { |
198 | 0 | return GEOSWithin_r(handle, g1, g2); |
199 | 0 | } |
200 | | |
201 | | // call g1->contains(g2) |
202 | | // returns 0 = false |
203 | | // 1 = true |
204 | | // 2 = error was trapped |
205 | | char |
206 | | GEOSContains(const Geometry* g1, const Geometry* g2) |
207 | 0 | { |
208 | 0 | return GEOSContains_r(handle, g1, g2); |
209 | 0 | } |
210 | | |
211 | | char |
212 | | GEOSOverlaps(const Geometry* g1, const Geometry* g2) |
213 | 0 | { |
214 | 0 | return GEOSOverlaps_r(handle, g1, g2); |
215 | 0 | } |
216 | | |
217 | | char |
218 | | GEOSCovers(const Geometry* g1, const Geometry* g2) |
219 | 0 | { |
220 | 0 | return GEOSCovers_r(handle, g1, g2); |
221 | 0 | } |
222 | | |
223 | | char |
224 | | GEOSCoveredBy(const Geometry* g1, const Geometry* g2) |
225 | 0 | { |
226 | 0 | return GEOSCoveredBy_r(handle, g1, g2); |
227 | 0 | } |
228 | | |
229 | | GEOSCurveToLineParams* |
230 | | GEOSCurveToLineParams_create() |
231 | 0 | { |
232 | 0 | return new geos::algorithm::CurveToLineParams; |
233 | 0 | } |
234 | | |
235 | | int |
236 | | GEOSCurveToLineParams_setMaxStepDegrees(GEOSCurveToLineParams* params, double tolerance) |
237 | 0 | { |
238 | 0 | return GEOSCurveToLineParams_setMaxStepDegrees_r(handle, params, tolerance); |
239 | 0 | } |
240 | | |
241 | | int |
242 | | GEOSCurveToLineParams_setMaxDeviation(GEOSCurveToLineParams* params, double tolerance) |
243 | 0 | { |
244 | 0 | return GEOSCurveToLineParams_setMaxDeviation_r(handle, params, tolerance); |
245 | 0 | } |
246 | | |
247 | | void |
248 | | GEOSCurveToLineParams_destroy(GEOSCurveToLineParams* params) |
249 | 0 | { |
250 | 0 | delete params; |
251 | 0 | } |
252 | | |
253 | | GEOSGeometry* |
254 | | GEOSCurveToLine(const GEOSGeometry* g, const GEOSCurveToLineParams* params) |
255 | 0 | { |
256 | 0 | return GEOSCurveToLine_r(handle, g, params); |
257 | 0 | } |
258 | | |
259 | | GEOSGeometry* |
260 | | GEOSLineToCurve(const GEOSGeometry* g, const GEOSLineToCurveParams* params) |
261 | 0 | { |
262 | 0 | return GEOSLineToCurve_r(handle, g, params); |
263 | 0 | } |
264 | | |
265 | | GEOSLineToCurveParams* |
266 | | GEOSLineToCurveParams_create() |
267 | 0 | { |
268 | 0 | return new geos::algorithm::LineToCurveParams; |
269 | 0 | } |
270 | | |
271 | | void |
272 | | GEOSLineToCurveParams_destroy(GEOSLineToCurveParams* params) |
273 | 0 | { |
274 | 0 | delete params; |
275 | 0 | } |
276 | | |
277 | | int |
278 | | GEOSLineToCurveParams_setRadiusTolerance(GEOSLineToCurveParams* params, double tolerance) |
279 | 0 | { |
280 | 0 | return GEOSLineToCurveParams_setRadiusTolerance_r(handle, params, tolerance); |
281 | 0 | } |
282 | | |
283 | | int |
284 | | GEOSLineToCurveParams_setMaxStepDegrees(GEOSLineToCurveParams* params, double tolerance) |
285 | 0 | { |
286 | 0 | return GEOSLineToCurveParams_setMaxStepDegrees_r(handle, params, tolerance); |
287 | 0 | } |
288 | | |
289 | | int |
290 | | GEOSLineToCurveParams_setMaxAngleDifferenceDegrees(GEOSLineToCurveParams* params, double tolerance) |
291 | 0 | { |
292 | 0 | return GEOSLineToCurveParams_setMaxAngleDifferenceDegrees_r(handle, params, tolerance); |
293 | 0 | } |
294 | | |
295 | | //------------------------------------------------------------------- |
296 | | // low-level relate functions |
297 | | //------------------------------------------------------------------ |
298 | | |
299 | | char |
300 | | GEOSRelatePattern(const Geometry* g1, const Geometry* g2, const char* imPattern) |
301 | 0 | { |
302 | 0 | return GEOSRelatePattern_r(handle, g1, g2, imPattern); |
303 | 0 | } |
304 | | |
305 | | char |
306 | | GEOSRelatePatternMatch(const char* intMatrix, const char* imPattern) |
307 | 0 | { |
308 | 0 | return GEOSRelatePatternMatch_r(handle, intMatrix, imPattern); |
309 | 0 | } |
310 | | |
311 | | char* |
312 | | GEOSRelate(const Geometry* g1, const Geometry* g2) |
313 | 0 | { |
314 | 0 | return GEOSRelate_r(handle, g1, g2); |
315 | 0 | } |
316 | | |
317 | | char* |
318 | | GEOSRelateBoundaryNodeRule(const Geometry* g1, const Geometry* g2, int bnr) |
319 | 0 | { |
320 | 0 | return GEOSRelateBoundaryNodeRule_r(handle, g1, g2, bnr); |
321 | 0 | } |
322 | | |
323 | | |
324 | | //----------------------------------------------------------------- |
325 | | // isValid |
326 | | //----------------------------------------------------------------- |
327 | | |
328 | | |
329 | | char |
330 | | GEOSisValid(const Geometry* g) |
331 | 15.4k | { |
332 | 15.4k | return GEOSisValid_r(handle, g); |
333 | 15.4k | } |
334 | | |
335 | | char* |
336 | | GEOSisValidReason(const Geometry* g) |
337 | 0 | { |
338 | 0 | return GEOSisValidReason_r(handle, g); |
339 | 0 | } |
340 | | |
341 | | char |
342 | | GEOSisValidDetail(const Geometry* g, int flags, |
343 | | char** reason, Geometry** location) |
344 | 0 | { |
345 | 0 | return GEOSisValidDetail_r(handle, g, flags, reason, location); |
346 | 0 | } |
347 | | |
348 | | //----------------------------------------------------------------- |
349 | | // general purpose |
350 | | //----------------------------------------------------------------- |
351 | | |
352 | | char |
353 | | GEOSEquals(const Geometry* g1, const Geometry* g2) |
354 | 0 | { |
355 | 0 | return GEOSEquals_r(handle, g1, g2); |
356 | 0 | } |
357 | | |
358 | | char |
359 | | GEOSEqualsExact(const Geometry* g1, const Geometry* g2, double tolerance) |
360 | 0 | { |
361 | 0 | return GEOSEqualsExact_r(handle, g1, g2, tolerance); |
362 | 0 | } |
363 | | |
364 | | char |
365 | | GEOSEqualsIdentical(const Geometry* g1, const Geometry* g2) |
366 | 0 | { |
367 | 0 | return GEOSEqualsIdentical_r(handle, g1, g2); |
368 | 0 | } |
369 | | |
370 | | int |
371 | | GEOSDistance(const Geometry* g1, const Geometry* g2, double* dist) |
372 | 15.4k | { |
373 | 15.4k | return GEOSDistance_r(handle, g1, g2, dist); |
374 | 15.4k | } |
375 | | |
376 | | char |
377 | | GEOSDistanceWithin(const Geometry* g1, const Geometry* g2, double dist) |
378 | 0 | { |
379 | 0 | return GEOSDistanceWithin_r(handle, g1, g2, dist); |
380 | 0 | } |
381 | | |
382 | | int |
383 | | GEOSDistanceIndexed(const Geometry* g1, const Geometry* g2, double* dist) |
384 | 0 | { |
385 | 0 | return GEOSDistanceIndexed_r(handle, g1, g2, dist); |
386 | 0 | } |
387 | | |
388 | | int |
389 | | GEOSHausdorffDistance(const Geometry* g1, const Geometry* g2, double* dist) |
390 | 0 | { |
391 | 0 | return GEOSHausdorffDistance_r(handle, g1, g2, dist); |
392 | 0 | } |
393 | | |
394 | | int |
395 | | GEOSHausdorffDistanceWithPoints(const Geometry* g1, const Geometry* g2, double* dist, double* p1x, double* p1y, double* p2x, double* p2y) |
396 | 0 | { |
397 | 0 | return GEOSHausdorffDistanceWithPoints_r(handle, g1, g2, dist, p1x, p1y, p2x, p2y); |
398 | 0 | } |
399 | | |
400 | | int |
401 | | GEOSHausdorffDistanceDensify(const Geometry* g1, const Geometry* g2, double densifyFrac, double* dist) |
402 | 0 | { |
403 | 0 | return GEOSHausdorffDistanceDensify_r(handle, g1, g2, densifyFrac, dist); |
404 | 0 | } |
405 | | |
406 | | int |
407 | | GEOSHausdorffDistanceDensifyWithPoints(const Geometry* g1, const Geometry* g2, double densifyFrac, double* dist, double* p1x, double* p1y, double* p2x, double* p2y) |
408 | 0 | { |
409 | 0 | return GEOSHausdorffDistanceDensifyWithPoints_r(handle, g1, g2, densifyFrac, dist, p1x, p1y, p2x, p2y); |
410 | 0 | } |
411 | | |
412 | | int |
413 | | GEOSDirectedHausdorffDistance(const Geometry* g1, const Geometry* g2, double* dist) |
414 | 0 | { |
415 | 0 | return GEOSDirectedHausdorffDistance_r(handle, g1, g2, dist); |
416 | 0 | } |
417 | | |
418 | | int |
419 | | GEOSDirectedHausdorffDistanceWithPoints(const Geometry* g1, const Geometry* g2, double* dist, double* p1x, double* p1y, double* p2x, double* p2y) |
420 | 0 | { |
421 | 0 | return GEOSDirectedHausdorffDistanceWithPoints_r(handle, g1, g2, dist, p1x, p1y, p2x, p2y); |
422 | 0 | } |
423 | | |
424 | | int |
425 | | GEOSDirectedHausdorffDistanceWithin(const Geometry* g1, const Geometry* g2, double maxDistance) |
426 | 0 | { |
427 | 0 | return GEOSDirectedHausdorffDistanceWithin_r(handle, g1, g2, maxDistance); |
428 | 0 | } |
429 | | |
430 | | int |
431 | | GEOSSymmetricHausdorffDistance(const Geometry* g1, const Geometry* g2, double* dist) |
432 | 0 | { |
433 | 0 | return GEOSSymmetricHausdorffDistance_r(handle, g1, g2, dist); |
434 | 0 | } |
435 | | |
436 | | int |
437 | | GEOSFrechetDistance(const Geometry* g1, const Geometry* g2, double* dist) |
438 | 0 | { |
439 | 0 | return GEOSFrechetDistance_r(handle, g1, g2, dist); |
440 | 0 | } |
441 | | |
442 | | int |
443 | | GEOSFrechetDistanceDensify(const Geometry* g1, const Geometry* g2, double densifyFrac, double* dist) |
444 | 0 | { |
445 | 0 | return GEOSFrechetDistanceDensify_r(handle, g1, g2, densifyFrac, dist); |
446 | 0 | } |
447 | | |
448 | | int |
449 | | GEOSArea(const Geometry* g, double* area) |
450 | 15.4k | { |
451 | 15.4k | return GEOSArea_r(handle, g, area); |
452 | 15.4k | } |
453 | | |
454 | | int |
455 | | GEOSLength(const Geometry* g, double* length) |
456 | 15.4k | { |
457 | 15.4k | return GEOSLength_r(handle, g, length); |
458 | 15.4k | } |
459 | | |
460 | | CoordinateSequence* |
461 | | GEOSNearestPoints(const Geometry* g1, const Geometry* g2) |
462 | 15.4k | { |
463 | 15.4k | return GEOSNearestPoints_r(handle, g1, g2); |
464 | 15.4k | } |
465 | | |
466 | | GEOSClusterInfo* |
467 | | GEOSClusterDBSCAN(const GEOSGeometry* g, double eps, unsigned minPoints) |
468 | 0 | { |
469 | 0 | return GEOSClusterDBSCAN_r(handle, g, eps, minPoints); |
470 | 0 | } |
471 | | |
472 | | GEOSClusterInfo* |
473 | | GEOSClusterGeometryDistance(const GEOSGeometry* g, double d) |
474 | 0 | { |
475 | 0 | return GEOSClusterGeometryDistance_r(handle, g, d); |
476 | 0 | } |
477 | | |
478 | | GEOSClusterInfo* |
479 | | GEOSClusterGeometryIntersects(const GEOSGeometry* g) |
480 | 0 | { |
481 | 0 | return GEOSClusterGeometryIntersects_r(handle, g); |
482 | 0 | } |
483 | | |
484 | | GEOSClusterInfo* |
485 | | GEOSClusterEnvelopeDistance(const GEOSGeometry* g, double d) |
486 | 0 | { |
487 | 0 | return GEOSClusterEnvelopeDistance_r(handle, g, d); |
488 | 0 | } |
489 | | |
490 | | GEOSClusterInfo* |
491 | | GEOSClusterEnvelopeIntersects(const GEOSGeometry* g) |
492 | 0 | { |
493 | 0 | return GEOSClusterEnvelopeIntersects_r(handle, g); |
494 | 0 | } |
495 | | |
496 | | std::size_t GEOSClusterInfo_getNumClusters(const GEOSClusterInfo* clusters) |
497 | 0 | { |
498 | 0 | return GEOSClusterInfo_getNumClusters_r(handle, clusters); |
499 | 0 | } |
500 | | |
501 | | std::size_t GEOSClusterInfo_getClusterSize(const GEOSClusterInfo* clusters, size_t i) |
502 | 0 | { |
503 | 0 | return GEOSClusterInfo_getClusterSize_r(handle, clusters, i); |
504 | 0 | } |
505 | | |
506 | | const std::size_t* GEOSClusterInfo_getInputsForClusterN(const GEOSClusterInfo* clusters, size_t i) |
507 | 0 | { |
508 | 0 | return GEOSClusterInfo_getInputsForClusterN_r(handle, clusters, i); |
509 | 0 | } |
510 | | |
511 | | std::size_t* GEOSClusterInfo_getClustersForInputs(const GEOSClusterInfo* clusters) |
512 | 0 | { |
513 | 0 | return GEOSClusterInfo_getClustersForInputs_r(handle, clusters); |
514 | 0 | } |
515 | | |
516 | | void GEOSClusterInfo_destroy(GEOSClusterInfo* info) |
517 | 0 | { |
518 | 0 | GEOSClusterInfo_destroy_r(handle, info); |
519 | 0 | } |
520 | | |
521 | | Geometry* |
522 | | GEOSGeomFromWKT(const char* wkt) |
523 | 25.4k | { |
524 | 25.4k | return GEOSGeomFromWKT_r(handle, wkt); |
525 | 25.4k | } |
526 | | |
527 | | char* |
528 | | GEOSGeomToWKT(const Geometry* g) |
529 | 19.1k | { |
530 | 19.1k | return GEOSGeomToWKT_r(handle, g); |
531 | 19.1k | } |
532 | | |
533 | | // Remember to free the result! |
534 | | unsigned char* |
535 | | GEOSGeomToWKB_buf(const Geometry* g, std::size_t* size) |
536 | 18.3k | { |
537 | 18.3k | return GEOSGeomToWKB_buf_r(handle, g, size); |
538 | 18.3k | } |
539 | | |
540 | | Geometry* |
541 | | GEOSGeomFromWKB_buf(const unsigned char* wkb, std::size_t size) |
542 | 30.7k | { |
543 | 30.7k | return GEOSGeomFromWKB_buf_r(handle, wkb, size); |
544 | 30.7k | } |
545 | | |
546 | | /* Read/write wkb hex values. Returned geometries are |
547 | | owned by the caller.*/ |
548 | | unsigned char* |
549 | | GEOSGeomToHEX_buf(const Geometry* g, std::size_t* size) |
550 | 0 | { |
551 | 0 | return GEOSGeomToHEX_buf_r(handle, g, size); |
552 | 0 | } |
553 | | |
554 | | Geometry* |
555 | | GEOSGeomFromHEX_buf(const unsigned char* hex, std::size_t size) |
556 | 0 | { |
557 | 0 | return GEOSGeomFromHEX_buf_r(handle, hex, size); |
558 | 0 | } |
559 | | |
560 | | char |
561 | | GEOSisEmpty(const Geometry* g) |
562 | 0 | { |
563 | 0 | return GEOSisEmpty_r(handle, g); |
564 | 0 | } |
565 | | |
566 | | char |
567 | | GEOSisSimple(const Geometry* g) |
568 | 0 | { |
569 | 0 | return GEOSisSimple_r(handle, g); |
570 | 0 | } |
571 | | |
572 | | char |
573 | | GEOSisSimpleDetail(const Geometry* g, int returnAllPoints, Geometry** result) |
574 | 0 | { |
575 | 0 | return GEOSisSimpleDetail_r(handle, g, returnAllPoints, result); |
576 | 0 | } |
577 | | |
578 | | GEOSisSimpleParams* |
579 | | GEOSisSimpleParams_create(void) |
580 | 0 | { |
581 | 0 | return GEOSisSimpleParams_create_r(handle); |
582 | 0 | } |
583 | | |
584 | | void |
585 | | GEOSisSimpleParams_destroy(GEOSisSimpleParams* parms) |
586 | 0 | { |
587 | 0 | return GEOSisSimpleParams_destroy_r(handle, parms); |
588 | 0 | } |
589 | | |
590 | | void |
591 | | GEOSisSimpleParams_setFindAllLocations(GEOSisSimpleParams* params, int val) |
592 | 0 | { |
593 | 0 | return GEOSisSimpleParams_setFindAllLocations_r(handle, params, val); |
594 | 0 | } |
595 | | |
596 | | void |
597 | | GEOSisSimpleParams_setBoundaryNodeRule(GEOSisSimpleParams* params, int bnr) |
598 | 0 | { |
599 | 0 | return GEOSisSimpleParams_setBoundaryNodeRule_r(handle, params, bnr); |
600 | 0 | } |
601 | | |
602 | | char |
603 | | GEOSisSimpleWithParams(const Geometry *g, const GEOSisSimpleParams* params, Geometry** result) |
604 | 0 | { |
605 | 0 | return GEOSisSimpleWithParams_r(handle, g, params, result); |
606 | 0 | } |
607 | | |
608 | | char |
609 | | GEOSisRing(const Geometry* g) |
610 | 0 | { |
611 | 0 | return GEOSisRing_r(handle, g); |
612 | 0 | } |
613 | | |
614 | | |
615 | | |
616 | | //free the result of this |
617 | | char* |
618 | | GEOSGeomType(const Geometry* g) |
619 | 0 | { |
620 | 0 | return GEOSGeomType_r(handle, g); |
621 | 0 | } |
622 | | |
623 | | // Return postgis geometry type index |
624 | | int |
625 | | GEOSGeomTypeId(const Geometry* g) |
626 | 0 | { |
627 | 0 | return GEOSGeomTypeId_r(handle, g); |
628 | 0 | } |
629 | | |
630 | | |
631 | | |
632 | | |
633 | | //------------------------------------------------------------------- |
634 | | // GEOS functions that return geometries |
635 | | //------------------------------------------------------------------- |
636 | | |
637 | | Geometry* |
638 | | GEOSEnvelope(const Geometry* g) |
639 | 0 | { |
640 | 0 | return GEOSEnvelope_r(handle, g); |
641 | 0 | } |
642 | | |
643 | | Geometry* |
644 | | GEOSIntersection(const Geometry* g1, const Geometry* g2) |
645 | 18.3k | { |
646 | 18.3k | return GEOSIntersection_r(handle, g1, g2); |
647 | 18.3k | } |
648 | | |
649 | | Geometry* |
650 | | GEOSIntersectionPrec(const Geometry* g1, const Geometry* g2, double gridSize) |
651 | 0 | { |
652 | 0 | return GEOSIntersectionPrec_r(handle, g1, g2, gridSize); |
653 | 0 | } |
654 | | |
655 | | Geometry* |
656 | | GEOSBuffer(const Geometry* g, double width, int quadrantsegments) |
657 | 15.4k | { |
658 | 15.4k | return GEOSBuffer_r(handle, g, width, quadrantsegments); |
659 | 15.4k | } |
660 | | |
661 | | Geometry* |
662 | | GEOSBufferWithStyle(const Geometry* g, double width, int quadsegs, |
663 | | int endCapStyle, int joinStyle, double mitreLimit) |
664 | 15.4k | { |
665 | 15.4k | return GEOSBufferWithStyle_r(handle, g, width, quadsegs, endCapStyle, |
666 | 15.4k | joinStyle, mitreLimit); |
667 | 15.4k | } |
668 | | |
669 | | Geometry* |
670 | | GEOSDensify(const Geometry* g, double tolerance) |
671 | 0 | { |
672 | 0 | return GEOSDensify_r(handle, g, tolerance); |
673 | 0 | } |
674 | | |
675 | | |
676 | | Geometry* |
677 | | GEOSSingleSidedBuffer(const Geometry* g, double width, int quadsegs, |
678 | | int joinStyle, double mitreLimit, int leftSide) |
679 | 0 | { |
680 | 0 | return GEOSSingleSidedBuffer_r(handle, g, width, quadsegs, |
681 | 0 | joinStyle, mitreLimit, leftSide); |
682 | 0 | } |
683 | | |
684 | | Geometry* |
685 | | GEOSOffsetCurve(const Geometry* g, double width, int quadsegs, |
686 | | int joinStyle, double mitreLimit) |
687 | 15.4k | { |
688 | 15.4k | return GEOSOffsetCurve_r(handle, g, width, quadsegs, |
689 | 15.4k | joinStyle, mitreLimit); |
690 | 15.4k | } |
691 | | |
692 | | Geometry* |
693 | | GEOSConvexHull(const Geometry* g) |
694 | 15.4k | { |
695 | 15.4k | return GEOSConvexHull_r(handle, g); |
696 | 15.4k | } |
697 | | |
698 | | Geometry* |
699 | | GEOSConcaveHull(const Geometry* g, |
700 | | double ratio, |
701 | | unsigned int allowHoles) |
702 | | |
703 | 15.4k | { |
704 | 15.4k | return GEOSConcaveHull_r(handle, g, ratio, allowHoles); |
705 | 15.4k | } |
706 | | |
707 | | Geometry* |
708 | | GEOSConcaveHullByLength(const Geometry* g, |
709 | | double length, |
710 | | unsigned int allowHoles) |
711 | | |
712 | 0 | { |
713 | 0 | return GEOSConcaveHullByLength_r(handle, g, length, allowHoles); |
714 | 0 | } |
715 | | |
716 | | Geometry* |
717 | | GEOSPolygonHullSimplify(const Geometry* g, |
718 | | unsigned int isOuter, |
719 | | double vertexNumFraction) |
720 | 0 | { |
721 | 0 | return GEOSPolygonHullSimplify_r(handle, g, isOuter, vertexNumFraction); |
722 | 0 | } |
723 | | |
724 | | Geometry* |
725 | | GEOSPolygonHullSimplifyMode(const Geometry* g, |
726 | | unsigned int isOuter, |
727 | | unsigned int parameterMode, |
728 | | double parameter) |
729 | 0 | { |
730 | 0 | return GEOSPolygonHullSimplifyMode_r(handle, g, isOuter, parameterMode, parameter); |
731 | 0 | } |
732 | | |
733 | | Geometry* |
734 | | GEOSConcaveHullOfPolygons(const Geometry* g, |
735 | | double lengthRatio, |
736 | | unsigned int isTight, |
737 | | unsigned int isHolesAllowed) |
738 | 0 | { |
739 | 0 | return GEOSConcaveHullOfPolygons_r(handle, |
740 | 0 | g, lengthRatio, isTight, isHolesAllowed); |
741 | 0 | } |
742 | | |
743 | | Geometry* |
744 | | GEOSMinimumRotatedRectangle(const Geometry* g) |
745 | 15.4k | { |
746 | 15.4k | return GEOSMinimumRotatedRectangle_r(handle, g); |
747 | 15.4k | } |
748 | | |
749 | | Geometry* |
750 | | GEOSMaximumInscribedCircle(const Geometry* g, double tolerance) |
751 | 0 | { |
752 | 0 | return GEOSMaximumInscribedCircle_r(handle, g, tolerance); |
753 | 0 | } |
754 | | |
755 | | Geometry* |
756 | | GEOSLargestEmptyCircle(const Geometry* g, const Geometry* boundary, double tolerance) |
757 | 0 | { |
758 | 0 | return GEOSLargestEmptyCircle_r(handle, g, boundary, tolerance); |
759 | 0 | } |
760 | | |
761 | | Geometry* |
762 | | GEOSMinimumWidth(const Geometry* g) |
763 | 15.4k | { |
764 | 15.4k | return GEOSMinimumWidth_r(handle, g); |
765 | 15.4k | } |
766 | | |
767 | | Geometry* |
768 | | GEOSMinimumClearanceLine(const Geometry* g) |
769 | 0 | { |
770 | 0 | return GEOSMinimumClearanceLine_r(handle, g); |
771 | 0 | } |
772 | | |
773 | | int |
774 | | GEOSMinimumClearance(const Geometry* g, double* d) |
775 | 15.4k | { |
776 | 15.4k | return GEOSMinimumClearance_r(handle, g, d); |
777 | 15.4k | } |
778 | | |
779 | | Geometry* |
780 | | GEOSDifference(const Geometry* g1, const Geometry* g2) |
781 | 18.3k | { |
782 | 18.3k | return GEOSDifference_r(handle, g1, g2); |
783 | 18.3k | } |
784 | | |
785 | | Geometry* |
786 | | GEOSDifferencePrec(const Geometry* g1, const Geometry* g2, double gridSize) |
787 | 0 | { |
788 | 0 | return GEOSDifferencePrec_r(handle, g1, g2, gridSize); |
789 | 0 | } |
790 | | |
791 | | Geometry* |
792 | | GEOSBoundary(const Geometry* g) |
793 | 15.4k | { |
794 | 15.4k | return GEOSBoundary_r(handle, g); |
795 | 15.4k | } |
796 | | |
797 | | Geometry* |
798 | | GEOSSymDifference(const Geometry* g1, const Geometry* g2) |
799 | 0 | { |
800 | 0 | return GEOSSymDifference_r(handle, g1, g2); |
801 | 0 | } |
802 | | |
803 | | Geometry* |
804 | | GEOSSymDifferencePrec(const Geometry* g1, const Geometry* g2, double gridSize) |
805 | 0 | { |
806 | 0 | return GEOSSymDifferencePrec_r(handle, g1, g2, gridSize); |
807 | 0 | } |
808 | | |
809 | | Geometry* |
810 | | GEOSUnion(const Geometry* g1, const Geometry* g2) |
811 | 18.3k | { |
812 | 18.3k | return GEOSUnion_r(handle, g1, g2); |
813 | 18.3k | } |
814 | | |
815 | | Geometry* |
816 | | GEOSUnionPrec(const Geometry* g1, const Geometry* g2, double gridSize) |
817 | 0 | { |
818 | 0 | return GEOSUnionPrec_r(handle, g1, g2, gridSize); |
819 | 0 | } |
820 | | |
821 | | Geometry* |
822 | | GEOSUnaryUnion(const Geometry* g) |
823 | 15.4k | { |
824 | 15.4k | return GEOSUnaryUnion_r(handle, g); |
825 | 15.4k | } |
826 | | |
827 | | Geometry* |
828 | | GEOSUnaryUnionPrec(const Geometry* g, double gridSize) |
829 | 0 | { |
830 | 0 | return GEOSUnaryUnionPrec_r(handle, g, gridSize); |
831 | 0 | } |
832 | | |
833 | | Geometry* |
834 | | GEOSCoverageUnion(const Geometry* g) |
835 | 0 | { |
836 | 0 | return GEOSCoverageUnion_r(handle, g); |
837 | 0 | } |
838 | | |
839 | | Geometry* |
840 | | GEOSDisjointSubsetUnion(const Geometry* g) |
841 | 0 | { |
842 | 0 | return GEOSDisjointSubsetUnion_r(handle, g); |
843 | 0 | } |
844 | | |
845 | | Geometry* |
846 | | GEOSNode(const Geometry* g) |
847 | 15.4k | { |
848 | 15.4k | return GEOSNode_r(handle, g); |
849 | 15.4k | } |
850 | | |
851 | | Geometry* |
852 | | GEOSSplit(const Geometry* g, const Geometry* edge) |
853 | 0 | { |
854 | 0 | return GEOSSplit_r(handle, g, edge); |
855 | 0 | } |
856 | | |
857 | | Geometry* |
858 | | GEOSUnionCascaded(const Geometry* g) |
859 | 0 | { |
860 | 0 | return GEOSUnionCascaded_r(handle, g); |
861 | 0 | } |
862 | | |
863 | | Geometry* |
864 | | GEOSPointOnSurface(const Geometry* g) |
865 | 15.4k | { |
866 | 15.4k | return GEOSPointOnSurface_r(handle, g); |
867 | 15.4k | } |
868 | | |
869 | | |
870 | | Geometry* |
871 | | GEOSClipByRect(const Geometry* g, double xmin, double ymin, double xmax, double ymax) |
872 | 15.4k | { |
873 | 15.4k | return GEOSClipByRect_r(handle, g, xmin, ymin, xmax, ymax); |
874 | 15.4k | } |
875 | | |
876 | | Geometry* |
877 | | GEOSSubdivideByGrid(const Geometry* g, double xmin, double ymin, double xmax, double ymax, |
878 | | unsigned nx, unsigned ny, int include_exterior) |
879 | 0 | { |
880 | 0 | return GEOSSubdivideByGrid_r(handle, g, xmin, ymin, xmax, ymax, nx, ny, include_exterior); |
881 | 0 | } |
882 | | |
883 | | int |
884 | | GEOSGridIntersectionFractions(const Geometry* g, double xmin, double ymin, double xmax, double ymax, |
885 | | unsigned nx, unsigned ny, float* buf) |
886 | 0 | { |
887 | 0 | return GEOSGridIntersectionFractions_r(handle, g, xmin, ymin, xmax, ymax, nx, ny, buf); |
888 | 0 | } |
889 | | |
890 | | Geometry* |
891 | 0 | GEOSGeom_transformXY(const GEOSGeometry* g, GEOSTransformXYCallback callback, void* userdata) { |
892 | 0 | return GEOSGeom_transformXY_r(handle, g, callback, userdata); |
893 | 0 | } |
894 | | |
895 | | |
896 | | Geometry* |
897 | 0 | GEOSGeom_transformXYZ(const GEOSGeometry* g, GEOSTransformXYZCallback callback, void* userdata) { |
898 | 0 | return GEOSGeom_transformXYZ_r(handle, g, callback, userdata); |
899 | 0 | } |
900 | | |
901 | | |
902 | | //------------------------------------------------------------------- |
903 | | // memory management functions |
904 | | //------------------------------------------------------------------ |
905 | | |
906 | | |
907 | | void |
908 | | GEOSGeom_destroy(Geometry* a) |
909 | 319k | { |
910 | 319k | return GEOSGeom_destroy_r(handle, a); |
911 | 319k | } |
912 | | |
913 | | |
914 | | int |
915 | | GEOSGetNumCoordinates(const Geometry* g) |
916 | 0 | { |
917 | 0 | return GEOSGetNumCoordinates_r(handle, g); |
918 | 0 | } |
919 | | |
920 | | /* |
921 | | * Return -1 on exception, 0 otherwise. |
922 | | * Converts Geometry to normal form (or canonical form). |
923 | | */ |
924 | | int |
925 | | GEOSNormalize(Geometry* g) |
926 | 0 | { |
927 | 0 | return GEOSNormalize_r(handle, g); |
928 | 0 | } |
929 | | |
930 | | int |
931 | | GEOSOrientPolygons(Geometry* g, int exteriorCW) |
932 | 0 | { |
933 | 0 | return GEOSOrientPolygons_r(handle, g, exteriorCW); |
934 | 0 | } |
935 | | |
936 | | int |
937 | | GEOSGetNumInteriorRings(const Geometry* g) |
938 | 0 | { |
939 | 0 | return GEOSGetNumInteriorRings_r(handle, g); |
940 | 0 | } |
941 | | |
942 | | |
943 | | // returns -1 on error and 1 for non-multi geometries |
944 | | int |
945 | | GEOSGetNumGeometries(const Geometry* g) |
946 | 0 | { |
947 | 0 | return GEOSGetNumGeometries_r(handle, g); |
948 | 0 | } |
949 | | |
950 | | |
951 | | /* |
952 | | * Call only on GEOMETRYCOLLECTION or MULTI*. |
953 | | * Return a pointer to the internal Geometry. |
954 | | */ |
955 | | const Geometry* |
956 | | GEOSGetGeometryN(const Geometry* g, int n) |
957 | 0 | { |
958 | 0 | return GEOSGetGeometryN_r(handle, g, n); |
959 | 0 | } |
960 | | |
961 | | int |
962 | | GEOSGetNumCurves(const Geometry* g) |
963 | 0 | { |
964 | 0 | return GEOSGetNumCurves_r(handle, g); |
965 | 0 | } |
966 | | |
967 | | const Geometry* |
968 | | GEOSGetCurveN(const Geometry* g, int n) |
969 | 0 | { |
970 | 0 | return GEOSGetCurveN_r(handle, g, n); |
971 | 0 | } |
972 | | |
973 | | /* |
974 | | * Call only on LINESTRING |
975 | | * Returns NULL on exception |
976 | | */ |
977 | | Geometry* |
978 | | GEOSGeomGetPointN(const Geometry* g, int n) |
979 | 0 | { |
980 | 0 | return GEOSGeomGetPointN_r(handle, g, n); |
981 | 0 | } |
982 | | |
983 | | /* |
984 | | * Call only on LINESTRING |
985 | | */ |
986 | | Geometry* |
987 | | GEOSGeomGetStartPoint(const Geometry* g) |
988 | 0 | { |
989 | 0 | return GEOSGeomGetStartPoint_r(handle, g); |
990 | 0 | } |
991 | | |
992 | | /* |
993 | | * Call only on LINESTRING |
994 | | */ |
995 | | Geometry* |
996 | | GEOSGeomGetEndPoint(const Geometry* g) |
997 | 0 | { |
998 | 0 | return GEOSGeomGetEndPoint_r(handle, g); |
999 | 0 | } |
1000 | | |
1001 | | /* |
1002 | | * Call only on LINESTRING |
1003 | | * return 2 on exception, 1 on true, 0 on false |
1004 | | */ |
1005 | | char |
1006 | | GEOSisClosed(const Geometry* g) |
1007 | 0 | { |
1008 | 0 | return GEOSisClosed_r(handle, g); |
1009 | 0 | } |
1010 | | |
1011 | | /* |
1012 | | * Call only on LINESTRING |
1013 | | * returns 0 on exception, otherwise 1 |
1014 | | */ |
1015 | | int |
1016 | | GEOSGeomGetLength(const Geometry* g, double* length) |
1017 | 0 | { |
1018 | 0 | return GEOSGeomGetLength_r(handle, g, length); |
1019 | 0 | } |
1020 | | |
1021 | | /* |
1022 | | * Call only on LINESTRING |
1023 | | * returns -1 on exception |
1024 | | */ |
1025 | | int |
1026 | | GEOSGeomGetNumPoints(const Geometry* g) |
1027 | 0 | { |
1028 | 0 | return GEOSGeomGetNumPoints_r(handle, g); |
1029 | 0 | } |
1030 | | |
1031 | | /* |
1032 | | * For POINT |
1033 | | * returns 0 on exception, otherwise 1 |
1034 | | */ |
1035 | | int |
1036 | | GEOSGeomGetX(const Geometry* g, double* x) |
1037 | 0 | { |
1038 | 0 | return GEOSGeomGetX_r(handle, g, x); |
1039 | 0 | } |
1040 | | |
1041 | | /* |
1042 | | * For POINT |
1043 | | * returns 0 on exception, otherwise 1 |
1044 | | */ |
1045 | | int |
1046 | | GEOSGeomGetY(const Geometry* g, double* y) |
1047 | 0 | { |
1048 | 0 | return GEOSGeomGetY_r(handle, g, y); |
1049 | 0 | } |
1050 | | |
1051 | | /* |
1052 | | * For POINT |
1053 | | * returns 0 on exception, otherwise 1 |
1054 | | */ |
1055 | | int |
1056 | | GEOSGeomGetZ(const Geometry* g1, double* z) |
1057 | 0 | { |
1058 | 0 | return GEOSGeomGetZ_r(handle, g1, z); |
1059 | 0 | } |
1060 | | |
1061 | | /* |
1062 | | * For POINT |
1063 | | * returns 0 on exception, otherwise 1 |
1064 | | */ |
1065 | | int |
1066 | | GEOSGeomGetM(const Geometry* g1, double* m) |
1067 | 0 | { |
1068 | 0 | return GEOSGeomGetM_r(handle, g1, m); |
1069 | 0 | } |
1070 | | |
1071 | | /* |
1072 | | * Call only on polygon |
1073 | | * Return a copy of the internal Geometry. |
1074 | | */ |
1075 | | const Geometry* |
1076 | | GEOSGetExteriorRing(const Geometry* g) |
1077 | 0 | { |
1078 | 0 | return GEOSGetExteriorRing_r(handle, g); |
1079 | 0 | } |
1080 | | |
1081 | | /* |
1082 | | * Call only on polygon |
1083 | | * Return a pointer to internal storage, do not destroy it. |
1084 | | */ |
1085 | | const Geometry* |
1086 | | GEOSGetInteriorRingN(const Geometry* g, int n) |
1087 | 0 | { |
1088 | 0 | return GEOSGetInteriorRingN_r(handle, g, n); |
1089 | 0 | } |
1090 | | |
1091 | | Geometry* |
1092 | | GEOSGetCentroid(const Geometry* g) |
1093 | 15.4k | { |
1094 | 15.4k | return GEOSGetCentroid_r(handle, g); |
1095 | 15.4k | } |
1096 | | |
1097 | | int |
1098 | | GEOSHilbertCode(const GEOSGeometry *geom, const GEOSGeometry* extent, |
1099 | | unsigned int level, unsigned int *code) |
1100 | 0 | { |
1101 | 0 | return GEOSHilbertCode_r(handle, geom, extent, level, code); |
1102 | 0 | } |
1103 | | |
1104 | | Geometry* |
1105 | | GEOSMinimumBoundingCircle(const Geometry* g, double* radius, Geometry** center) |
1106 | 0 | { |
1107 | 0 | return GEOSMinimumBoundingCircle_r(handle, g, radius, center); |
1108 | 0 | } |
1109 | | |
1110 | | Geometry* |
1111 | | GEOSGeom_createCollection(int type, Geometry** geoms, unsigned int ngeoms) |
1112 | 0 | { |
1113 | 0 | return GEOSGeom_createCollection_r(handle, type, geoms, ngeoms); |
1114 | 0 | } |
1115 | | |
1116 | | Geometry** |
1117 | | GEOSGeom_releaseCollection(Geometry* collection, unsigned int * ngeoms) |
1118 | 0 | { |
1119 | 0 | return GEOSGeom_releaseCollection_r(handle, collection, ngeoms); |
1120 | 0 | } |
1121 | | |
1122 | | Geometry* |
1123 | | GEOSPolygonize(const Geometry* const* g, unsigned int ngeoms) |
1124 | 0 | { |
1125 | 0 | return GEOSPolygonize_r(handle, g, ngeoms); |
1126 | 0 | } |
1127 | | |
1128 | | Geometry* |
1129 | | GEOSPolygonize_valid(const Geometry* const* g, unsigned int ngeoms) |
1130 | 0 | { |
1131 | 0 | return GEOSPolygonize_valid_r(handle, g, ngeoms); |
1132 | 0 | } |
1133 | | |
1134 | | Geometry* |
1135 | | GEOSPolygonizer_getCutEdges(const Geometry* const* g, unsigned int ngeoms) |
1136 | 0 | { |
1137 | 0 | return GEOSPolygonizer_getCutEdges_r(handle, g, ngeoms); |
1138 | 0 | } |
1139 | | |
1140 | | GEOSGeometry* |
1141 | | GEOSPolygonize_full(const GEOSGeometry* input, |
1142 | | GEOSGeometry** cuts, GEOSGeometry** dangles, GEOSGeometry** invalid) |
1143 | 0 | { |
1144 | 0 | return GEOSPolygonize_full_r(handle, input, cuts, dangles, invalid); |
1145 | 0 | } |
1146 | | |
1147 | | Geometry* |
1148 | | GEOSBuildArea(const Geometry* g) |
1149 | 0 | { |
1150 | 0 | return GEOSBuildArea_r(handle, g); |
1151 | 0 | } |
1152 | | |
1153 | | Geometry* |
1154 | | GEOSMakeValid(const Geometry* g) |
1155 | 15.4k | { |
1156 | 15.4k | return GEOSMakeValid_r(handle, g); |
1157 | 15.4k | } |
1158 | | |
1159 | | GEOSMakeValidParams* |
1160 | | GEOSMakeValidParams_create(void) |
1161 | 0 | { |
1162 | 0 | return GEOSMakeValidParams_create_r(handle); |
1163 | 0 | } |
1164 | | |
1165 | | void |
1166 | | GEOSMakeValidParams_destroy(GEOSMakeValidParams* parms) |
1167 | 0 | { |
1168 | 0 | return GEOSMakeValidParams_destroy_r(handle, parms); |
1169 | 0 | } |
1170 | | |
1171 | | int |
1172 | | GEOSMakeValidParams_setMethod( |
1173 | | GEOSMakeValidParams* p, |
1174 | | GEOSMakeValidMethods method) |
1175 | 0 | { |
1176 | 0 | return GEOSMakeValidParams_setMethod_r(handle, p, method); |
1177 | 0 | } |
1178 | | |
1179 | | int |
1180 | | GEOSMakeValidParams_setKeepCollapsed( |
1181 | | GEOSMakeValidParams* p, |
1182 | | int keepCollapsed) |
1183 | 0 | { |
1184 | 0 | return GEOSMakeValidParams_setKeepCollapsed_r(handle, p, keepCollapsed); |
1185 | 0 | } |
1186 | | |
1187 | | Geometry* |
1188 | | GEOSMakeValidWithParams( |
1189 | | const Geometry* g, |
1190 | | const GEOSMakeValidParams* params) |
1191 | 0 | { |
1192 | 0 | return GEOSMakeValidWithParams_r(handle, g, params); |
1193 | 0 | } |
1194 | | |
1195 | | GEOSCoverageCleanParams* |
1196 | | GEOSCoverageCleanParams_create(void) |
1197 | 0 | { |
1198 | 0 | return GEOSCoverageCleanParams_create_r(handle); |
1199 | 0 | } |
1200 | | |
1201 | | void |
1202 | | GEOSCoverageCleanParams_destroy( |
1203 | | GEOSCoverageCleanParams* params) |
1204 | 0 | { |
1205 | 0 | return GEOSCoverageCleanParams_destroy_r(handle, params); |
1206 | 0 | } |
1207 | | |
1208 | | int |
1209 | | GEOSCoverageCleanParams_setSnappingDistance( |
1210 | | GEOSCoverageCleanParams* params, double snappingDistance) |
1211 | 0 | { |
1212 | 0 | return GEOSCoverageCleanParams_setSnappingDistance_r( |
1213 | 0 | handle, params, snappingDistance); |
1214 | 0 | } |
1215 | | |
1216 | | int |
1217 | | GEOSCoverageCleanParams_setGapMaximumWidth( |
1218 | | GEOSCoverageCleanParams* params, double gapMaximumWidth) |
1219 | 0 | { |
1220 | 0 | return GEOSCoverageCleanParams_setGapMaximumWidth_r( |
1221 | 0 | handle, params, gapMaximumWidth); |
1222 | 0 | } |
1223 | | |
1224 | | int |
1225 | | GEOSCoverageCleanParams_setOverlapMergeStrategy( |
1226 | | GEOSCoverageCleanParams* params, int overlapMergeStrategy) |
1227 | 0 | { |
1228 | 0 | return GEOSCoverageCleanParams_setOverlapMergeStrategy_r( |
1229 | 0 | handle, params, overlapMergeStrategy); |
1230 | 0 | } |
1231 | | |
1232 | | GEOSGeometry * |
1233 | | GEOSCoverageCleanWithParams( |
1234 | | const GEOSGeometry* input, |
1235 | | const GEOSCoverageCleanParams* params) |
1236 | 0 | { |
1237 | 0 | return GEOSCoverageCleanWithParams_r( |
1238 | 0 | handle, input, params); |
1239 | 0 | } |
1240 | | |
1241 | | GEOSGeometry * |
1242 | | GEOSCoverageClean( |
1243 | | const GEOSGeometry * input) |
1244 | 0 | { |
1245 | 0 | return GEOSCoverageClean_r( |
1246 | 0 | handle, input); |
1247 | 0 | } |
1248 | | |
1249 | | GEOSGeometry * |
1250 | | GEOSCoverageEdges( |
1251 | | const GEOSGeometry * input, |
1252 | | int edgetype) |
1253 | 0 | { |
1254 | 0 | return GEOSCoverageEdges_r( |
1255 | 0 | handle, input, edgetype); |
1256 | 0 | } |
1257 | | |
1258 | | Geometry* |
1259 | | GEOSRemoveRepeatedPoints( |
1260 | | const Geometry* g, |
1261 | | double tolerance) |
1262 | 0 | { |
1263 | 0 | return GEOSRemoveRepeatedPoints_r(handle, g, tolerance); |
1264 | 0 | } |
1265 | | |
1266 | | Geometry* |
1267 | | GEOSLineMerge(const Geometry* g) |
1268 | 0 | { |
1269 | 0 | return GEOSLineMerge_r(handle, g); |
1270 | 0 | } |
1271 | | |
1272 | | std::size_t* |
1273 | | GEOSMinimumSpanningTree(const Geometry* const* geoms, unsigned int ngeoms) |
1274 | 0 | { |
1275 | 0 | return GEOSMinimumSpanningTree_r(handle, geoms, ngeoms); |
1276 | 0 | } |
1277 | | |
1278 | | Geometry* |
1279 | | GEOSLineMergeDirected(const Geometry* g) |
1280 | 0 | { |
1281 | 0 | return GEOSLineMergeDirected_r(handle, g); |
1282 | 0 | } |
1283 | | |
1284 | | Geometry* |
1285 | | GEOSLineSubstring(const Geometry* g, double start_fraction, double end_fraction) |
1286 | 0 | { |
1287 | 0 | return GEOSLineSubstring_r(handle, g, start_fraction, end_fraction); |
1288 | 0 | } |
1289 | | |
1290 | | Geometry* |
1291 | | GEOSReverse(const Geometry* g) |
1292 | 15.4k | { |
1293 | 15.4k | return GEOSReverse_r(handle, g); |
1294 | 15.4k | } |
1295 | | |
1296 | | int |
1297 | | GEOSGetSRID(const Geometry* g) |
1298 | 0 | { |
1299 | 0 | return GEOSGetSRID_r(handle, g); |
1300 | 0 | } |
1301 | | |
1302 | | void |
1303 | | GEOSSetSRID(Geometry* g, int srid) |
1304 | 0 | { |
1305 | 0 | return GEOSSetSRID_r(handle, g, srid); |
1306 | 0 | } |
1307 | | |
1308 | | void* |
1309 | | GEOSGeom_getUserData(const Geometry* g) |
1310 | 0 | { |
1311 | 0 | return GEOSGeom_getUserData_r(handle, g); |
1312 | 0 | } |
1313 | | |
1314 | | void |
1315 | | GEOSGeom_setUserData(Geometry* g, void* userData) |
1316 | 0 | { |
1317 | 0 | return GEOSGeom_setUserData_r(handle, g, userData); |
1318 | 0 | } |
1319 | | |
1320 | | char |
1321 | | GEOSHasZ(const Geometry* g) |
1322 | 0 | { |
1323 | 0 | return GEOSHasZ_r(handle, g); |
1324 | 0 | } |
1325 | | |
1326 | | char |
1327 | | GEOSHasM(const Geometry* g) |
1328 | 0 | { |
1329 | 0 | return GEOSHasM_r(handle, g); |
1330 | 0 | } |
1331 | | |
1332 | | int |
1333 | | GEOS_getWKBOutputDims(void) |
1334 | 0 | { |
1335 | 0 | return GEOS_getWKBOutputDims_r(handle); |
1336 | 0 | } |
1337 | | |
1338 | | int |
1339 | | GEOS_setWKBOutputDims(int newdims) |
1340 | 0 | { |
1341 | 0 | return GEOS_setWKBOutputDims_r(handle, newdims); |
1342 | 0 | } |
1343 | | |
1344 | | int |
1345 | | GEOS_getWKBByteOrder(void) |
1346 | 0 | { |
1347 | 0 | return GEOS_getWKBByteOrder_r(handle); |
1348 | 0 | } |
1349 | | |
1350 | | int |
1351 | | GEOS_setWKBByteOrder(int byteOrder) |
1352 | 0 | { |
1353 | 0 | return GEOS_setWKBByteOrder_r(handle, byteOrder); |
1354 | 0 | } |
1355 | | |
1356 | | CoordinateSequence* |
1357 | | GEOSCoordSeq_create(unsigned int size, unsigned int dims) |
1358 | 0 | { |
1359 | 0 | return GEOSCoordSeq_create_r(handle, size, dims); |
1360 | 0 | } |
1361 | | |
1362 | | CoordinateSequence* |
1363 | | GEOSCoordSeq_createWithDimensions(unsigned int size, int hasZ, int hasM) |
1364 | 0 | { |
1365 | 0 | return GEOSCoordSeq_createWithDimensions_r(handle, size, hasZ, hasM); |
1366 | 0 | } |
1367 | | |
1368 | | CoordinateSequence* |
1369 | | GEOSCoordSeq_copyFromBuffer(const double* buf, unsigned int size, int hasZ, int hasM) |
1370 | 0 | { |
1371 | 0 | return GEOSCoordSeq_copyFromBuffer_r(handle, buf, size, hasZ, hasM); |
1372 | 0 | } |
1373 | | |
1374 | | int |
1375 | | GEOSCoordSeq_copyToBuffer(const CoordinateSequence* s, double* buf, int hasZ, int hasM) |
1376 | 0 | { |
1377 | 0 | return GEOSCoordSeq_copyToBuffer_r(handle, s, buf, hasZ, hasM); |
1378 | 0 | } |
1379 | | |
1380 | | CoordinateSequence* |
1381 | | GEOSCoordSeq_copyFromArrays(const double* x, const double* y, const double* z, const double* m, unsigned int size) |
1382 | 0 | { |
1383 | 0 | return GEOSCoordSeq_copyFromArrays_r(handle, x, y, z, m, size); |
1384 | 0 | } |
1385 | | |
1386 | | int |
1387 | | GEOSCoordSeq_copyToArrays(const CoordinateSequence* s, double* x, double* y, double* z, double* m) |
1388 | 0 | { |
1389 | 0 | return GEOSCoordSeq_copyToArrays_r(handle, s, x, y, z, m); |
1390 | 0 | } |
1391 | | |
1392 | | char |
1393 | | GEOSCoordSeq_hasZ(CoordinateSequence* s) |
1394 | 0 | { |
1395 | 0 | return GEOSCoordSeq_hasZ_r(handle, s); |
1396 | 0 | } |
1397 | | |
1398 | | char |
1399 | | GEOSCoordSeq_hasM(CoordinateSequence* s) |
1400 | 0 | { |
1401 | 0 | return GEOSCoordSeq_hasM_r(handle, s); |
1402 | 0 | } |
1403 | | |
1404 | | int |
1405 | | GEOSCoordSeq_setOrdinate(CoordinateSequence* s, unsigned int idx, unsigned int dim, double val) |
1406 | 0 | { |
1407 | 0 | return GEOSCoordSeq_setOrdinate_r(handle, s, idx, dim, val); |
1408 | 0 | } |
1409 | | |
1410 | | int |
1411 | | GEOSCoordSeq_setX(CoordinateSequence* s, unsigned int idx, double val) |
1412 | 0 | { |
1413 | 0 | return GEOSCoordSeq_setOrdinate(s, idx, CoordinateSequence::X, val); |
1414 | 0 | } |
1415 | | |
1416 | | int |
1417 | | GEOSCoordSeq_setY(CoordinateSequence* s, unsigned int idx, double val) |
1418 | 0 | { |
1419 | 0 | return GEOSCoordSeq_setOrdinate(s, idx, CoordinateSequence::Y, val); |
1420 | 0 | } |
1421 | | |
1422 | | int |
1423 | | GEOSCoordSeq_setZ(CoordinateSequence* s, unsigned int idx, double val) |
1424 | 0 | { |
1425 | 0 | return GEOSCoordSeq_setOrdinate(s, idx, CoordinateSequence::Z, val); |
1426 | 0 | } |
1427 | | |
1428 | | int |
1429 | | GEOSCoordSeq_setM(CoordinateSequence* s, unsigned int idx, double val) |
1430 | 0 | { |
1431 | 0 | return GEOSCoordSeq_setOrdinate(s, idx, CoordinateSequence::M, val); |
1432 | 0 | } |
1433 | | |
1434 | | int |
1435 | | GEOSCoordSeq_setXY(CoordinateSequence* s, unsigned int idx, double x, double y) |
1436 | 0 | { |
1437 | 0 | return GEOSCoordSeq_setXY_r(handle, s, idx, x, y); |
1438 | 0 | } |
1439 | | |
1440 | | int |
1441 | | GEOSCoordSeq_setXYZ(CoordinateSequence* s, unsigned int idx, double x, double y, double z) |
1442 | 0 | { |
1443 | 0 | return GEOSCoordSeq_setXYZ_r(handle, s, idx, x, y, z); |
1444 | 0 | } |
1445 | | |
1446 | | CoordinateSequence* |
1447 | | GEOSCoordSeq_clone(const CoordinateSequence* s) |
1448 | 0 | { |
1449 | 0 | return GEOSCoordSeq_clone_r(handle, s); |
1450 | 0 | } |
1451 | | |
1452 | | int |
1453 | | GEOSCoordSeq_getOrdinate(const CoordinateSequence* s, unsigned int idx, unsigned int dim, double* val) |
1454 | 0 | { |
1455 | 0 | return GEOSCoordSeq_getOrdinate_r(handle, s, idx, dim, val); |
1456 | 0 | } |
1457 | | |
1458 | | int |
1459 | | GEOSCoordSeq_getX(const CoordinateSequence* s, unsigned int idx, double* val) |
1460 | 0 | { |
1461 | 0 | return GEOSCoordSeq_getOrdinate(s, idx, CoordinateSequence::X, val); |
1462 | 0 | } |
1463 | | |
1464 | | int |
1465 | | GEOSCoordSeq_getY(const CoordinateSequence* s, unsigned int idx, double* val) |
1466 | 0 | { |
1467 | 0 | return GEOSCoordSeq_getOrdinate(s, idx, CoordinateSequence::Y, val); |
1468 | 0 | } |
1469 | | |
1470 | | int |
1471 | | GEOSCoordSeq_getZ(const CoordinateSequence* s, unsigned int idx, double* val) |
1472 | 0 | { |
1473 | 0 | return GEOSCoordSeq_getOrdinate(s, idx, CoordinateSequence::Z, val); |
1474 | 0 | } |
1475 | | |
1476 | | int |
1477 | | GEOSCoordSeq_getM(const CoordinateSequence* s, unsigned int idx, double* val) |
1478 | 0 | { |
1479 | 0 | return GEOSCoordSeq_getOrdinate(s, idx, CoordinateSequence::M, val); |
1480 | 0 | } |
1481 | | |
1482 | | int |
1483 | | GEOSCoordSeq_getXY(const CoordinateSequence* s, unsigned int idx, double* x, double* y) |
1484 | 0 | { |
1485 | 0 | return GEOSCoordSeq_getXY_r(handle, s, idx, x, y); |
1486 | 0 | } |
1487 | | |
1488 | | int |
1489 | | GEOSCoordSeq_getXYZ(const CoordinateSequence* s, unsigned int idx, double* x, double* y, double* z) |
1490 | 0 | { |
1491 | 0 | return GEOSCoordSeq_getXYZ_r(handle, s, idx, x, y, z); |
1492 | 0 | } |
1493 | | |
1494 | | int |
1495 | | GEOSCoordSeq_getSize(const CoordinateSequence* s, unsigned int* size) |
1496 | 0 | { |
1497 | 0 | return GEOSCoordSeq_getSize_r(handle, s, size); |
1498 | 0 | } |
1499 | | |
1500 | | int |
1501 | | GEOSCoordSeq_getDimensions(const CoordinateSequence* s, unsigned int* dims) |
1502 | 0 | { |
1503 | 0 | return GEOSCoordSeq_getDimensions_r(handle, s, dims); |
1504 | 0 | } |
1505 | | |
1506 | | int |
1507 | | GEOSCoordSeq_isCCW(const CoordinateSequence* s, char* is_ccw) |
1508 | 0 | { |
1509 | 0 | return GEOSCoordSeq_isCCW_r(handle, s, is_ccw); |
1510 | 0 | } |
1511 | | |
1512 | | void |
1513 | | GEOSCoordSeq_destroy(CoordinateSequence* s) |
1514 | 13.3k | { |
1515 | 13.3k | return GEOSCoordSeq_destroy_r(handle, s); |
1516 | 13.3k | } |
1517 | | |
1518 | | const CoordinateSequence* |
1519 | | GEOSGeom_getCoordSeq(const Geometry* g) |
1520 | 0 | { |
1521 | 0 | return GEOSGeom_getCoordSeq_r(handle, g); |
1522 | 0 | } |
1523 | | |
1524 | | Geometry* |
1525 | | GEOSGeom_createPoint(CoordinateSequence* cs) |
1526 | 0 | { |
1527 | 0 | return GEOSGeom_createPoint_r(handle, cs); |
1528 | 0 | } |
1529 | | |
1530 | | Geometry* |
1531 | | GEOSGeom_createPointFromXY(double x, double y) |
1532 | 0 | { |
1533 | 0 | return GEOSGeom_createPointFromXY_r(handle, x, y); |
1534 | 0 | } |
1535 | | |
1536 | | Geometry* |
1537 | | GEOSGeom_createLinearRing(CoordinateSequence* cs) |
1538 | 0 | { |
1539 | 0 | return GEOSGeom_createLinearRing_r(handle, cs); |
1540 | 0 | } |
1541 | | |
1542 | | Geometry* |
1543 | | GEOSGeom_createLineString(CoordinateSequence* cs) |
1544 | 0 | { |
1545 | 0 | return GEOSGeom_createLineString_r(handle, cs); |
1546 | 0 | } |
1547 | | |
1548 | | Geometry* |
1549 | | GEOSGeom_createPolygon(Geometry* shell, Geometry** holes, unsigned int nholes) |
1550 | 0 | { |
1551 | 0 | return GEOSGeom_createPolygon_r(handle, shell, holes, nholes); |
1552 | 0 | } |
1553 | | |
1554 | | Geometry* |
1555 | | GEOSGeom_createCircularString(CoordinateSequence* cs) |
1556 | 0 | { |
1557 | 0 | return GEOSGeom_createCircularString_r(handle, cs); |
1558 | 0 | } |
1559 | | |
1560 | | Geometry* |
1561 | | GEOSGeom_createCompoundCurve(Geometry** curves, unsigned int ngeoms) |
1562 | 0 | { |
1563 | 0 | return GEOSGeom_createCompoundCurve_r(handle, curves, ngeoms); |
1564 | 0 | } |
1565 | | |
1566 | | Geometry* |
1567 | | GEOSGeom_createCurvePolygon(Geometry* shell, Geometry** holes, unsigned int nholes) |
1568 | 0 | { |
1569 | 0 | return GEOSGeom_createCurvePolygon_r(handle, shell, holes, nholes); |
1570 | 0 | } |
1571 | | |
1572 | | Geometry* |
1573 | | GEOSGeom_clone(const Geometry* g) |
1574 | 0 | { |
1575 | 0 | return GEOSGeom_clone_r(handle, g); |
1576 | 0 | } |
1577 | | |
1578 | | GEOSGeometry* |
1579 | | GEOSGeom_setPrecision(const GEOSGeometry* g, double gridSize, int flags) |
1580 | 0 | { |
1581 | 0 | return GEOSGeom_setPrecision_r(handle, g, gridSize, flags); |
1582 | 0 | } |
1583 | | |
1584 | | double |
1585 | | GEOSGeom_getPrecision(const GEOSGeometry* g) |
1586 | 0 | { |
1587 | 0 | return GEOSGeom_getPrecision_r(handle, g); |
1588 | 0 | } |
1589 | | |
1590 | | int |
1591 | | GEOSGeom_getDimensions(const Geometry* g) |
1592 | 0 | { |
1593 | 0 | return GEOSGeom_getDimensions_r(handle, g); |
1594 | 0 | } |
1595 | | |
1596 | | int |
1597 | | GEOSGeom_getCoordinateDimension(const Geometry* g) |
1598 | 0 | { |
1599 | 0 | return GEOSGeom_getCoordinateDimension_r(handle, g); |
1600 | 0 | } |
1601 | | |
1602 | | int GEOS_DLL GEOSGeom_getXMin(const GEOSGeometry* g, double* value) |
1603 | 0 | { |
1604 | 0 | return GEOSGeom_getXMin_r(handle, g, value); |
1605 | 0 | } |
1606 | | |
1607 | | int GEOS_DLL GEOSGeom_getYMin(const GEOSGeometry* g, double* value) |
1608 | 0 | { |
1609 | 0 | return GEOSGeom_getYMin_r(handle, g, value); |
1610 | 0 | } |
1611 | | |
1612 | | int GEOS_DLL GEOSGeom_getXMax(const GEOSGeometry* g, double* value) |
1613 | 0 | { |
1614 | 0 | return GEOSGeom_getXMax_r(handle, g, value); |
1615 | 0 | } |
1616 | | |
1617 | | int GEOS_DLL GEOSGeom_getYMax(const GEOSGeometry* g, double* value) |
1618 | 0 | { |
1619 | 0 | return GEOSGeom_getYMax_r(handle, g, value); |
1620 | 0 | } |
1621 | | |
1622 | | int GEOS_DLL GEOSGeom_getExtent(const GEOSGeometry* g, double* xmin, double* ymin, double* xmax, double* ymax) |
1623 | 0 | { |
1624 | 0 | return GEOSGeom_getExtent_r(handle, g, xmin, ymin, xmax, ymax); |
1625 | 0 | } |
1626 | | |
1627 | | Geometry* |
1628 | | GEOSSimplify(const Geometry* g, double tolerance) |
1629 | 15.4k | { |
1630 | 15.4k | return GEOSSimplify_r(handle, g, tolerance); |
1631 | 15.4k | } |
1632 | | |
1633 | | Geometry* |
1634 | | GEOSTopologyPreserveSimplify(const Geometry* g, double tolerance) |
1635 | 15.4k | { |
1636 | 15.4k | return GEOSTopologyPreserveSimplify_r(handle, g, tolerance); |
1637 | 15.4k | } |
1638 | | |
1639 | | |
1640 | | /* WKT Reader */ |
1641 | | WKTReader* |
1642 | | GEOSWKTReader_create(void) |
1643 | 0 | { |
1644 | 0 | return GEOSWKTReader_create_r(handle); |
1645 | 0 | } |
1646 | | |
1647 | | void |
1648 | | GEOSWKTReader_destroy(WKTReader* reader) |
1649 | 0 | { |
1650 | 0 | GEOSWKTReader_destroy_r(handle, reader); |
1651 | 0 | } |
1652 | | |
1653 | | void |
1654 | | GEOSWKTReader_setFixStructure(WKTReader* reader, char doFix) |
1655 | 0 | { |
1656 | 0 | GEOSWKTReader_setFixStructure_r(handle, reader, doFix); |
1657 | 0 | } |
1658 | | |
1659 | | Geometry* |
1660 | | GEOSWKTReader_read(WKTReader* reader, const char* wkt) |
1661 | 0 | { |
1662 | 0 | return GEOSWKTReader_read_r(handle, reader, wkt); |
1663 | 0 | } |
1664 | | |
1665 | | /* WKT Writer */ |
1666 | | WKTWriter* |
1667 | | GEOSWKTWriter_create(void) |
1668 | 0 | { |
1669 | 0 | return GEOSWKTWriter_create_r(handle); |
1670 | 0 | } |
1671 | | |
1672 | | void |
1673 | | GEOSWKTWriter_destroy(WKTWriter* Writer) |
1674 | 0 | { |
1675 | 0 | GEOSWKTWriter_destroy_r(handle, Writer); |
1676 | 0 | } |
1677 | | |
1678 | | char* |
1679 | | GEOSWKTWriter_write(WKTWriter* writer, const Geometry* geom) |
1680 | 0 | { |
1681 | 0 | return GEOSWKTWriter_write_r(handle, writer, geom); |
1682 | 0 | } |
1683 | | |
1684 | | void |
1685 | | GEOSWKTWriter_setTrim(WKTWriter* writer, char trim) |
1686 | 0 | { |
1687 | 0 | GEOSWKTWriter_setTrim_r(handle, writer, trim); |
1688 | 0 | } |
1689 | | |
1690 | | void |
1691 | | GEOSWKTWriter_setRoundingPrecision(WKTWriter* writer, int precision) |
1692 | 0 | { |
1693 | 0 | return GEOSWKTWriter_setRoundingPrecision_r(handle, writer, precision); |
1694 | 0 | } |
1695 | | |
1696 | | void |
1697 | | GEOSWKTWriter_setOutputDimension(WKTWriter* writer, int dim) |
1698 | 0 | { |
1699 | 0 | GEOSWKTWriter_setOutputDimension_r(handle, writer, dim); |
1700 | 0 | } |
1701 | | |
1702 | | int |
1703 | | GEOSWKTWriter_getOutputDimension(WKTWriter* writer) |
1704 | 0 | { |
1705 | 0 | return GEOSWKTWriter_getOutputDimension_r(handle, writer); |
1706 | 0 | } |
1707 | | |
1708 | | void |
1709 | | GEOSWKTWriter_setOld3D(WKTWriter* writer, int useOld3D) |
1710 | 0 | { |
1711 | 0 | GEOSWKTWriter_setOld3D_r(handle, writer, useOld3D); |
1712 | 0 | } |
1713 | | |
1714 | | /* WKB Reader */ |
1715 | | WKBReader* |
1716 | | GEOSWKBReader_create(void) |
1717 | 0 | { |
1718 | 0 | return GEOSWKBReader_create_r(handle); |
1719 | 0 | } |
1720 | | |
1721 | | void |
1722 | | GEOSWKBReader_destroy(WKBReader* reader) |
1723 | 0 | { |
1724 | 0 | GEOSWKBReader_destroy_r(handle, reader); |
1725 | 0 | } |
1726 | | |
1727 | | void |
1728 | | GEOSWKBReader_setFixStructure(WKBReader* reader, char doFix) |
1729 | 0 | { |
1730 | 0 | GEOSWKBReader_setFixStructure_r(handle, reader, doFix); |
1731 | 0 | } |
1732 | | |
1733 | | Geometry* |
1734 | | GEOSWKBReader_read(WKBReader* reader, const unsigned char* wkb, std::size_t size) |
1735 | 0 | { |
1736 | 0 | return GEOSWKBReader_read_r(handle, reader, wkb, size); |
1737 | 0 | } |
1738 | | |
1739 | | Geometry* |
1740 | | GEOSWKBReader_readHEX(WKBReader* reader, const unsigned char* hex, std::size_t size) |
1741 | 0 | { |
1742 | 0 | return GEOSWKBReader_readHEX_r(handle, reader, hex, size); |
1743 | 0 | } |
1744 | | |
1745 | | /* WKB Writer */ |
1746 | | WKBWriter* |
1747 | | GEOSWKBWriter_create(void) |
1748 | 0 | { |
1749 | 0 | return GEOSWKBWriter_create_r(handle); |
1750 | 0 | } |
1751 | | |
1752 | | void |
1753 | | GEOSWKBWriter_destroy(WKBWriter* Writer) |
1754 | 0 | { |
1755 | 0 | GEOSWKBWriter_destroy_r(handle, Writer); |
1756 | 0 | } |
1757 | | |
1758 | | |
1759 | | /* The caller owns the result */ |
1760 | | unsigned char* |
1761 | | GEOSWKBWriter_write(WKBWriter* writer, const Geometry* geom, std::size_t* size) |
1762 | 0 | { |
1763 | 0 | return GEOSWKBWriter_write_r(handle, writer, geom, size); |
1764 | 0 | } |
1765 | | |
1766 | | /* The caller owns the result */ |
1767 | | unsigned char* |
1768 | | GEOSWKBWriter_writeHEX(WKBWriter* writer, const Geometry* geom, std::size_t* size) |
1769 | 0 | { |
1770 | 0 | return GEOSWKBWriter_writeHEX_r(handle, writer, geom, size); |
1771 | 0 | } |
1772 | | |
1773 | | int |
1774 | | GEOSWKBWriter_getOutputDimension(const GEOSWKBWriter* writer) |
1775 | 0 | { |
1776 | 0 | return GEOSWKBWriter_getOutputDimension_r(handle, writer); |
1777 | 0 | } |
1778 | | |
1779 | | void |
1780 | | GEOSWKBWriter_setOutputDimension(GEOSWKBWriter* writer, int newDimension) |
1781 | 0 | { |
1782 | 0 | GEOSWKBWriter_setOutputDimension_r(handle, writer, newDimension); |
1783 | 0 | } |
1784 | | |
1785 | | int |
1786 | | GEOSWKBWriter_getByteOrder(const GEOSWKBWriter* writer) |
1787 | 0 | { |
1788 | 0 | return GEOSWKBWriter_getByteOrder_r(handle, writer); |
1789 | 0 | } |
1790 | | |
1791 | | void |
1792 | | GEOSWKBWriter_setByteOrder(GEOSWKBWriter* writer, int newByteOrder) |
1793 | 0 | { |
1794 | 0 | GEOSWKBWriter_setByteOrder_r(handle, writer, newByteOrder); |
1795 | 0 | } |
1796 | | |
1797 | | int |
1798 | | GEOSWKBWriter_getFlavor(const GEOSWKBWriter* writer) |
1799 | 0 | { |
1800 | 0 | return GEOSWKBWriter_getFlavor_r(handle, writer); |
1801 | 0 | } |
1802 | | |
1803 | | void |
1804 | | GEOSWKBWriter_setFlavor(GEOSWKBWriter* writer, int newFlavor) |
1805 | 0 | { |
1806 | 0 | GEOSWKBWriter_setFlavor_r(handle, writer, newFlavor); |
1807 | 0 | } |
1808 | | |
1809 | | char |
1810 | | GEOSWKBWriter_getIncludeSRID(const GEOSWKBWriter* writer) |
1811 | 0 | { |
1812 | 0 | return GEOSWKBWriter_getIncludeSRID_r(handle, writer); |
1813 | 0 | } |
1814 | | |
1815 | | void |
1816 | | GEOSWKBWriter_setIncludeSRID(GEOSWKBWriter* writer, const char newIncludeSRID) |
1817 | 0 | { |
1818 | 0 | GEOSWKBWriter_setIncludeSRID_r(handle, writer, newIncludeSRID); |
1819 | 0 | } |
1820 | | |
1821 | | int |
1822 | 0 | GEOS_printDouble(double d, unsigned int precision, char *result) { |
1823 | 0 | return WKTWriter::writeTrimmedNumber(d, precision, result); |
1824 | 0 | } |
1825 | | |
1826 | | /* GeoJSON Reader */ |
1827 | | GeoJSONReader* |
1828 | | GEOSGeoJSONReader_create(void) |
1829 | 2 | { |
1830 | 2 | return GEOSGeoJSONReader_create_r(handle); |
1831 | 2 | } |
1832 | | |
1833 | | void |
1834 | | GEOSGeoJSONReader_destroy(GeoJSONReader* reader) |
1835 | 0 | { |
1836 | 0 | GEOSGeoJSONReader_destroy_r(handle, reader); |
1837 | 0 | } |
1838 | | |
1839 | | Geometry* |
1840 | | GEOSGeoJSONReader_readGeometry(GeoJSONReader* reader, const char* geojson) |
1841 | 6.54k | { |
1842 | 6.54k | return GEOSGeoJSONReader_readGeometry_r(handle, reader, geojson); |
1843 | 6.54k | } |
1844 | | |
1845 | | /* GeoJSON Writer */ |
1846 | | GeoJSONWriter* |
1847 | | GEOSGeoJSONWriter_create(void) |
1848 | 0 | { |
1849 | 0 | return GEOSGeoJSONWriter_create_r(handle); |
1850 | 0 | } |
1851 | | |
1852 | | void |
1853 | | GEOSGeoJSONWriter_destroy(GEOSGeoJSONWriter* writer) |
1854 | 0 | { |
1855 | 0 | GEOSGeoJSONWriter_destroy_r(handle, writer); |
1856 | 0 | } |
1857 | | |
1858 | | char* |
1859 | | GEOSGeoJSONWriter_writeGeometry(GEOSGeoJSONWriter* writer, const GEOSGeometry* g, int indent) |
1860 | 0 | { |
1861 | 0 | return GEOSGeoJSONWriter_writeGeometry_r(handle, writer, g, indent); |
1862 | 0 | } |
1863 | | |
1864 | | void |
1865 | | GEOSGeoJSONWriter_setOutputDimension(GeoJSONWriter* writer, int dim) |
1866 | 0 | { |
1867 | 0 | GEOSGeoJSONWriter_setOutputDimension_r(handle, writer, dim); |
1868 | 0 | } |
1869 | | |
1870 | | int |
1871 | | GEOSGeoJSONWriter_getOutputDimension(GeoJSONWriter* writer) |
1872 | 0 | { |
1873 | 0 | return GEOSGeoJSONWriter_getOutputDimension_r(handle, writer); |
1874 | 0 | } |
1875 | | |
1876 | | |
1877 | | //----------------------------------------------------------------- |
1878 | | // Prepared Geometry |
1879 | | //----------------------------------------------------------------- |
1880 | | |
1881 | | const geos::geom::prep::PreparedGeometry* |
1882 | | GEOSPrepare(const Geometry* g) |
1883 | 0 | { |
1884 | 0 | return GEOSPrepare_r(handle, g); |
1885 | 0 | } |
1886 | | |
1887 | | void |
1888 | | GEOSPreparedGeom_destroy(const geos::geom::prep::PreparedGeometry* a) |
1889 | 0 | { |
1890 | 0 | GEOSPreparedGeom_destroy_r(handle, a); |
1891 | 0 | } |
1892 | | |
1893 | | char |
1894 | | GEOSPreparedContains(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2) |
1895 | 0 | { |
1896 | 0 | return GEOSPreparedContains_r(handle, pg1, g2); |
1897 | 0 | } |
1898 | | |
1899 | | char |
1900 | | GEOSPreparedContainsXY(const geos::geom::prep::PreparedGeometry* pg1, double x, double y) |
1901 | 0 | { |
1902 | 0 | return GEOSPreparedContainsXY_r(handle, pg1, x, y); |
1903 | 0 | } |
1904 | | |
1905 | | char |
1906 | | GEOSPreparedContainsProperly(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2) |
1907 | 0 | { |
1908 | 0 | return GEOSPreparedContainsProperly_r(handle, pg1, g2); |
1909 | 0 | } |
1910 | | |
1911 | | char |
1912 | | GEOSPreparedCoveredBy(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2) |
1913 | 0 | { |
1914 | 0 | return GEOSPreparedCoveredBy_r(handle, pg1, g2); |
1915 | 0 | } |
1916 | | |
1917 | | char |
1918 | | GEOSPreparedCovers(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2) |
1919 | 0 | { |
1920 | 0 | return GEOSPreparedCovers_r(handle, pg1, g2); |
1921 | 0 | } |
1922 | | |
1923 | | char |
1924 | | GEOSPreparedCrosses(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2) |
1925 | 0 | { |
1926 | 0 | return GEOSPreparedCrosses_r(handle, pg1, g2); |
1927 | 0 | } |
1928 | | |
1929 | | char |
1930 | | GEOSPreparedDisjoint(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2) |
1931 | 0 | { |
1932 | 0 | return GEOSPreparedDisjoint_r(handle, pg1, g2); |
1933 | 0 | } |
1934 | | |
1935 | | char |
1936 | | GEOSPreparedIntersects(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2) |
1937 | 0 | { |
1938 | 0 | return GEOSPreparedIntersects_r(handle, pg1, g2); |
1939 | 0 | } |
1940 | | |
1941 | | char |
1942 | | GEOSPreparedIntersectsXY(const geos::geom::prep::PreparedGeometry* pg1, double x, double y) |
1943 | 0 | { |
1944 | 0 | return GEOSPreparedIntersectsXY_r(handle, pg1, x, y); |
1945 | 0 | } |
1946 | | |
1947 | | char |
1948 | | GEOSPreparedOverlaps(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2) |
1949 | 0 | { |
1950 | 0 | return GEOSPreparedOverlaps_r(handle, pg1, g2); |
1951 | 0 | } |
1952 | | |
1953 | | char |
1954 | | GEOSPreparedTouches(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2) |
1955 | 0 | { |
1956 | 0 | return GEOSPreparedTouches_r(handle, pg1, g2); |
1957 | 0 | } |
1958 | | |
1959 | | char |
1960 | | GEOSPreparedWithin(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2) |
1961 | 0 | { |
1962 | 0 | return GEOSPreparedWithin_r(handle, pg1, g2); |
1963 | 0 | } |
1964 | | |
1965 | | char * |
1966 | | GEOSPreparedRelate(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2) |
1967 | 0 | { |
1968 | 0 | return GEOSPreparedRelate_r(handle, pg1, g2); |
1969 | 0 | } |
1970 | | |
1971 | | char |
1972 | | GEOSPreparedRelatePattern(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2, const char* imPattern) |
1973 | 0 | { |
1974 | 0 | return GEOSPreparedRelatePattern_r(handle, pg1, g2, imPattern); |
1975 | 0 | } |
1976 | | |
1977 | | CoordinateSequence* |
1978 | | GEOSPreparedNearestPoints(const geos::geom::prep::PreparedGeometry* g1, const Geometry* g2) |
1979 | 0 | { |
1980 | 0 | return GEOSPreparedNearestPoints_r(handle, g1, g2); |
1981 | 0 | } |
1982 | | |
1983 | | int |
1984 | | GEOSPreparedDistance(const geos::geom::prep::PreparedGeometry* g1, const Geometry* g2, double *dist) |
1985 | 0 | { |
1986 | 0 | return GEOSPreparedDistance_r(handle, g1, g2, dist); |
1987 | 0 | } |
1988 | | |
1989 | | char |
1990 | | GEOSPreparedDistanceWithin(const geos::geom::prep::PreparedGeometry* g1, const Geometry* g2, double dist) |
1991 | 0 | { |
1992 | 0 | return GEOSPreparedDistanceWithin_r(handle, g1, g2, dist); |
1993 | 0 | } |
1994 | | |
1995 | | GEOSSTRtree* |
1996 | | GEOSSTRtree_create(std::size_t nodeCapacity) |
1997 | 0 | { |
1998 | 0 | return GEOSSTRtree_create_r(handle, nodeCapacity); |
1999 | 0 | } |
2000 | | |
2001 | | int |
2002 | | GEOSSTRtree_build(GEOSSTRtree* tree) |
2003 | 0 | { |
2004 | 0 | return GEOSSTRtree_build_r(handle, tree); |
2005 | 0 | } |
2006 | | |
2007 | | void |
2008 | | GEOSSTRtree_insert(GEOSSTRtree* tree, |
2009 | | const geos::geom::Geometry* g, |
2010 | | void* item) |
2011 | 0 | { |
2012 | 0 | GEOSSTRtree_insert_r(handle, tree, g, item); |
2013 | 0 | } |
2014 | | |
2015 | | void |
2016 | | GEOSSTRtree_query(GEOSSTRtree* tree, |
2017 | | const geos::geom::Geometry* g, |
2018 | | GEOSQueryCallback cb, |
2019 | | void* userdata) |
2020 | 0 | { |
2021 | 0 | GEOSSTRtree_query_r(handle, tree, g, cb, userdata); |
2022 | 0 | } |
2023 | | |
2024 | | const GEOSGeometry* |
2025 | | GEOSSTRtree_nearest(GEOSSTRtree* tree, |
2026 | | const geos::geom::Geometry* g) |
2027 | 0 | { |
2028 | 0 | return GEOSSTRtree_nearest_r(handle, tree, g); |
2029 | 0 | } |
2030 | | |
2031 | | const void* GEOSSTRtree_nearest_generic(GEOSSTRtree* tree, |
2032 | | const void* item, |
2033 | | const GEOSGeometry* itemEnvelope, |
2034 | | GEOSDistanceCallback distancefn, |
2035 | | void* userdata) |
2036 | 0 | { |
2037 | 0 | return GEOSSTRtree_nearest_generic_r(handle, tree, item, itemEnvelope, distancefn, userdata); |
2038 | 0 | } |
2039 | | |
2040 | | void |
2041 | | GEOSSTRtree_iterate(GEOSSTRtree* tree, |
2042 | | GEOSQueryCallback callback, |
2043 | | void* userdata) |
2044 | 0 | { |
2045 | 0 | GEOSSTRtree_iterate_r(handle, tree, callback, userdata); |
2046 | 0 | } |
2047 | | |
2048 | | char |
2049 | | GEOSSTRtree_remove(GEOSSTRtree* tree, |
2050 | | const geos::geom::Geometry* g, |
2051 | | void* item) |
2052 | 0 | { |
2053 | 0 | return GEOSSTRtree_remove_r(handle, tree, g, item); |
2054 | 0 | } |
2055 | | |
2056 | | void |
2057 | | GEOSSTRtree_destroy(GEOSSTRtree* tree) |
2058 | 0 | { |
2059 | 0 | GEOSSTRtree_destroy_r(handle, tree); |
2060 | 0 | } |
2061 | | |
2062 | | double |
2063 | | GEOSProject(const geos::geom::Geometry* g, |
2064 | | const geos::geom::Geometry* p) |
2065 | 0 | { |
2066 | 0 | return GEOSProject_r(handle, g, p); |
2067 | 0 | } |
2068 | | |
2069 | | geos::geom::Geometry* |
2070 | | GEOSInterpolate(const geos::geom::Geometry* g, |
2071 | | double d) |
2072 | 0 | { |
2073 | 0 | return GEOSInterpolate_r(handle, g, d); |
2074 | 0 | } |
2075 | | |
2076 | | double |
2077 | | GEOSProjectNormalized(const geos::geom::Geometry* g, |
2078 | | const geos::geom::Geometry* p) |
2079 | 0 | { |
2080 | 0 | return GEOSProjectNormalized_r(handle, g, p); |
2081 | 0 | } |
2082 | | |
2083 | | geos::geom::Geometry* |
2084 | | GEOSInterpolateNormalized(const geos::geom::Geometry* g, |
2085 | | double d) |
2086 | 0 | { |
2087 | 0 | return GEOSInterpolateNormalized_r(handle, g, d); |
2088 | 0 | } |
2089 | | |
2090 | | geos::geom::Geometry* |
2091 | | GEOSGeom_extractUniquePoints(const geos::geom::Geometry* g) |
2092 | 0 | { |
2093 | 0 | return GEOSGeom_extractUniquePoints_r(handle, g); |
2094 | 0 | } |
2095 | | |
2096 | | geos::geom::Geometry* |
2097 | | GEOSGeom_createEmptyCollection(int type) |
2098 | 0 | { |
2099 | 0 | return GEOSGeom_createEmptyCollection_r(handle, type); |
2100 | 0 | } |
2101 | | |
2102 | | geos::geom::Geometry* |
2103 | | GEOSGeom_createEmptyPoint(void) |
2104 | 0 | { |
2105 | 0 | return GEOSGeom_createEmptyPoint_r(handle); |
2106 | 0 | } |
2107 | | |
2108 | | geos::geom::Geometry* |
2109 | | GEOSGeom_createEmptyLineString(void) |
2110 | 0 | { |
2111 | 0 | return GEOSGeom_createEmptyLineString_r(handle); |
2112 | 0 | } |
2113 | | |
2114 | | geos::geom::Geometry* |
2115 | | GEOSGeom_createEmptyPolygon(void) |
2116 | 0 | { |
2117 | 0 | return GEOSGeom_createEmptyPolygon_r(handle); |
2118 | 0 | } |
2119 | | |
2120 | | geos::geom::Geometry* |
2121 | | GEOSGeom_createEmptyCircularString(void) |
2122 | 0 | { |
2123 | 0 | return GEOSGeom_createEmptyCircularString_r(handle); |
2124 | 0 | } |
2125 | | |
2126 | | geos::geom::Geometry* |
2127 | | GEOSGeom_createEmptyCompoundCurve(void) |
2128 | 0 | { |
2129 | 0 | return GEOSGeom_createEmptyCompoundCurve_r(handle); |
2130 | 0 | } |
2131 | | |
2132 | | geos::geom::Geometry* |
2133 | | GEOSGeom_createEmptyCurvePolygon(void) |
2134 | 0 | { |
2135 | 0 | return GEOSGeom_createEmptyCurvePolygon_r(handle); |
2136 | 0 | } |
2137 | | |
2138 | | geos::geom::Geometry* |
2139 | | GEOSGeom_createRectangle(double xmin, double ymin, double xmax, |
2140 | | double ymax) |
2141 | 0 | { |
2142 | 0 | return GEOSGeom_createRectangle_r(handle, xmin, ymin, xmax, ymax); |
2143 | 0 | } |
2144 | | |
2145 | | int |
2146 | | GEOSOrientationIndex(double Ax, double Ay, double Bx, double By, |
2147 | | double Px, double Py) |
2148 | 0 | { |
2149 | 0 | return GEOSOrientationIndex_r(handle, Ax, Ay, Bx, By, Px, Py); |
2150 | 0 | } |
2151 | | |
2152 | | GEOSGeometry* |
2153 | | GEOSSharedPaths(const GEOSGeometry* g1, const GEOSGeometry* g2) |
2154 | 0 | { |
2155 | 0 | return GEOSSharedPaths_r(handle, g1, g2); |
2156 | 0 | } |
2157 | | |
2158 | | GEOSGeometry* |
2159 | | GEOSSnap(const GEOSGeometry* g1, const GEOSGeometry* g2, double tolerance) |
2160 | 0 | { |
2161 | 0 | return GEOSSnap_r(handle, g1, g2, tolerance); |
2162 | 0 | } |
2163 | | |
2164 | | GEOSBufferParams* |
2165 | | GEOSBufferParams_create(void) |
2166 | 0 | { |
2167 | 0 | return GEOSBufferParams_create_r(handle); |
2168 | 0 | } |
2169 | | |
2170 | | void |
2171 | | GEOSBufferParams_destroy(GEOSBufferParams* p) |
2172 | 0 | { |
2173 | 0 | return GEOSBufferParams_destroy_r(handle, p); |
2174 | 0 | } |
2175 | | |
2176 | | int |
2177 | | GEOSBufferParams_setEndCapStyle(GEOSBufferParams* p, int style) |
2178 | 0 | { |
2179 | 0 | return GEOSBufferParams_setEndCapStyle_r(handle, p, style); |
2180 | 0 | } |
2181 | | |
2182 | | int |
2183 | | GEOSBufferParams_setJoinStyle(GEOSBufferParams* p, int joinStyle) |
2184 | 0 | { |
2185 | 0 | return GEOSBufferParams_setJoinStyle_r(handle, p, joinStyle); |
2186 | 0 | } |
2187 | | |
2188 | | int |
2189 | | GEOSBufferParams_setMitreLimit(GEOSBufferParams* p, double l) |
2190 | 0 | { |
2191 | 0 | return GEOSBufferParams_setMitreLimit_r(handle, p, l); |
2192 | 0 | } |
2193 | | |
2194 | | int |
2195 | | GEOSBufferParams_setQuadrantSegments(GEOSBufferParams* p, int joinStyle) |
2196 | 0 | { |
2197 | 0 | return GEOSBufferParams_setQuadrantSegments_r(handle, p, joinStyle); |
2198 | 0 | } |
2199 | | |
2200 | | int |
2201 | | GEOSBufferParams_setSingleSided(GEOSBufferParams* p, int singleSided) |
2202 | 0 | { |
2203 | 0 | return GEOSBufferParams_setSingleSided_r(handle, p, singleSided); |
2204 | 0 | } |
2205 | | |
2206 | | Geometry* |
2207 | | GEOSBufferWithParams(const Geometry* g, const GEOSBufferParams* p, double w) |
2208 | 0 | { |
2209 | 0 | return GEOSBufferWithParams_r(handle, g, p, w); |
2210 | 0 | } |
2211 | | |
2212 | | Geometry* |
2213 | | GEOSDelaunayTriangulation(const Geometry* g, double tolerance, int onlyEdges) |
2214 | 15.4k | { |
2215 | 15.4k | return GEOSDelaunayTriangulation_r(handle, g, tolerance, onlyEdges); |
2216 | 15.4k | } |
2217 | | |
2218 | | Geometry* |
2219 | | GEOSConstrainedDelaunayTriangulation(const Geometry* g) |
2220 | 0 | { |
2221 | 0 | return GEOSConstrainedDelaunayTriangulation_r(handle, g); |
2222 | 0 | } |
2223 | | |
2224 | | Geometry* |
2225 | | GEOSVoronoiDiagram(const Geometry* g, const Geometry* env, double tolerance, int flags) |
2226 | 15.4k | { |
2227 | 15.4k | return GEOSVoronoiDiagram_r(handle, g, env, tolerance, flags); |
2228 | 15.4k | } |
2229 | | |
2230 | | int |
2231 | | GEOSSegmentIntersection(double ax0, double ay0, double ax1, double ay1, |
2232 | | double bx0, double by0, double bx1, double by1, |
2233 | | double* cx, double* cy) |
2234 | 0 | { |
2235 | 0 | return GEOSSegmentIntersection_r(handle, |
2236 | 0 | ax0, ay0, ax1, ay1, |
2237 | 0 | bx0, by0, bx1, by1, |
2238 | 0 | cx, cy); |
2239 | 0 | } |
2240 | | |
2241 | | int |
2242 | | GEOSCoverageIsValid( |
2243 | | const Geometry* input, |
2244 | | double gapWidth, |
2245 | | Geometry** invalidEdges) |
2246 | 0 | { |
2247 | 0 | return GEOSCoverageIsValid_r(handle, input, gapWidth, invalidEdges); |
2248 | 0 | } |
2249 | | |
2250 | | Geometry* |
2251 | | GEOSCoverageSimplifyVW(const Geometry* input, double tolerance, int preserveBoundary) |
2252 | 0 | { |
2253 | 0 | return GEOSCoverageSimplifyVW_r(handle, input, tolerance, preserveBoundary); |
2254 | 0 | } |
2255 | | |
2256 | | } /* extern "C" */ |