2121#include < geos/io/WKBReader.h>
2222#include < geos/io/WKTWriter.h>
2323#include < geos/io/WKBWriter.h>
24- #include < geos/operation/overlay/OverlayOp.h>
25- #include < geos/operation/union/CascadedPolygonUnion.h>
26- #include < geos/algorithm/distance/DiscreteHausdorffDistance.h>
27- #include < geos/algorithm/distance/DiscreteFrechetDistance.h>
2824#include < geos/util/Interrupt.h>
2925
3026#include < stdexcept>
3935#define GEOSPreparedGeometry geos::geom::prep::PreparedGeometry
4036#define GEOSCoordSequence geos::geom::CoordinateSequence
4137#define GEOSSTRtree geos::index::strtree::STRtree
42- #define GEOSWKTReader_t geos::io::WKTReader
43- #define GEOSWKTWriter_t geos::io::WKTWriter
44- #define GEOSWKBReader_t geos::io::WKBReader
45- #define GEOSWKBWriter_t geos::io::WKBWriter
38+ #define GEOSWKTReader geos::io::WKTReader
39+ #define GEOSWKTWriter geos::io::WKTWriter
40+ #define GEOSWKBReader geos::io::WKBReader
41+ #define GEOSWKBWriter geos::io::WKBWriter
4642typedef struct GEOSBufParams_t GEOSBufferParams;
4743
4844#include " geos_c.h"
@@ -74,11 +70,7 @@ using geos::io::WKTWriter;
7470using geos::io::WKBReader;
7571using geos::io::WKBWriter;
7672
77- using geos::index::strtree::STRtree;
7873
79- using geos::operation::overlay::OverlayOp;
80- using geos::operation::overlay::overlayOp;
81- using geos::operation::geounion::CascadedPolygonUnion;
8274
8375typedef std::unique_ptr<Geometry> GeomPtr;
8476
@@ -415,6 +407,12 @@ extern "C" {
415407 return GEOSIntersection_r (handle, g1, g2);
416408 }
417409
410+ Geometry*
411+ GEOSIntersectionPrec (const Geometry* g1, const Geometry* g2, double gridSize)
412+ {
413+ return GEOSIntersectionPrec_r (handle, g1, g2, gridSize);
414+ }
415+
418416 Geometry*
419417 GEOSBuffer (const Geometry* g, double width, int quadrantsegments)
420418 {
@@ -457,6 +455,18 @@ extern "C" {
457455 return GEOSMinimumRotatedRectangle_r (handle, g);
458456 }
459457
458+ Geometry*
459+ GEOSMaximumInscribedCircle (const Geometry* g, double tolerance)
460+ {
461+ return GEOSMaximumInscribedCircle_r (handle, g, tolerance);
462+ }
463+
464+ Geometry*
465+ GEOSLargestEmptyCircle (const Geometry* g, const Geometry* boundary, double tolerance)
466+ {
467+ return GEOSLargestEmptyCircle_r (handle, g, boundary, tolerance);
468+ }
469+
460470 Geometry*
461471 GEOSMinimumWidth (const Geometry* g)
462472 {
@@ -481,6 +491,12 @@ extern "C" {
481491 return GEOSDifference_r (handle, g1, g2);
482492 }
483493
494+ Geometry*
495+ GEOSDifferencePrec (const Geometry* g1, const Geometry* g2, double gridSize)
496+ {
497+ return GEOSDifferencePrec_r (handle, g1, g2, gridSize);
498+ }
499+
484500 Geometry*
485501 GEOSBoundary (const Geometry* g)
486502 {
@@ -493,18 +509,36 @@ extern "C" {
493509 return GEOSSymDifference_r (handle, g1, g2);
494510 }
495511
512+ Geometry*
513+ GEOSSymDifferencePrec (const Geometry* g1, const Geometry* g2, double gridSize)
514+ {
515+ return GEOSSymDifferencePrec_r (handle, g1, g2, gridSize);
516+ }
517+
496518 Geometry*
497519 GEOSUnion (const Geometry* g1, const Geometry* g2)
498520 {
499521 return GEOSUnion_r (handle, g1, g2);
500522 }
501523
524+ Geometry*
525+ GEOSUnionPrec (const Geometry* g1, const Geometry* g2, double gridSize)
526+ {
527+ return GEOSUnionPrec_r (handle, g1, g2, gridSize);
528+ }
529+
502530 Geometry*
503531 GEOSUnaryUnion (const Geometry* g)
504532 {
505533 return GEOSUnaryUnion_r (handle, g);
506534 }
507535
536+ Geometry*
537+ GEOSUnaryUnionPrec (const Geometry* g, double gridSize)
538+ {
539+ return GEOSUnaryUnionPrec_r (handle, g, gridSize);
540+ }
541+
508542 Geometry*
509543 GEOSCoverageUnion (const Geometry* g)
510544 {
@@ -1264,22 +1298,34 @@ extern "C" {
12641298 return GEOSPreparedWithin_r (handle, pg1, g2);
12651299 }
12661300
1267- STRtree*
1301+ CoordinateSequence*
1302+ GEOSPreparedNearestPoints (const geos::geom::prep::PreparedGeometry* g1, const Geometry* g2)
1303+ {
1304+ return GEOSPreparedNearestPoints_r (handle, g1, g2);
1305+ }
1306+
1307+ int
1308+ GEOSPreparedDistance (const geos::geom::prep::PreparedGeometry* g1, const Geometry* g2, double *dist)
1309+ {
1310+ return GEOSPreparedDistance_r (handle, g1, g2, dist);
1311+ }
1312+
1313+ GEOSSTRtree*
12681314 GEOSSTRtree_create (size_t nodeCapacity)
12691315 {
12701316 return GEOSSTRtree_create_r (handle, nodeCapacity);
12711317 }
12721318
12731319 void
1274- GEOSSTRtree_insert (geos::index::strtree::STRtree * tree,
1320+ GEOSSTRtree_insert (GEOSSTRtree * tree,
12751321 const geos::geom::Geometry* g,
12761322 void * item)
12771323 {
12781324 GEOSSTRtree_insert_r (handle, tree, g, item);
12791325 }
12801326
12811327 void
1282- GEOSSTRtree_query (geos::index::strtree::STRtree * tree,
1328+ GEOSSTRtree_query (GEOSSTRtree * tree,
12831329 const geos::geom::Geometry* g,
12841330 GEOSQueryCallback cb,
12851331 void * userdata)
@@ -1288,7 +1334,7 @@ extern "C" {
12881334 }
12891335
12901336 const GEOSGeometry*
1291- GEOSSTRtree_nearest (geos::index::strtree::STRtree * tree,
1337+ GEOSSTRtree_nearest (GEOSSTRtree * tree,
12921338 const geos::geom::Geometry* g)
12931339 {
12941340 return GEOSSTRtree_nearest_r (handle, tree, g);
@@ -1304,23 +1350,23 @@ extern "C" {
13041350 }
13051351
13061352 void
1307- GEOSSTRtree_iterate (geos::index::strtree::STRtree * tree,
1353+ GEOSSTRtree_iterate (GEOSSTRtree * tree,
13081354 GEOSQueryCallback callback,
13091355 void * userdata)
13101356 {
13111357 GEOSSTRtree_iterate_r (handle, tree, callback, userdata);
13121358 }
13131359
13141360 char
1315- GEOSSTRtree_remove (geos::index::strtree::STRtree * tree,
1361+ GEOSSTRtree_remove (GEOSSTRtree * tree,
13161362 const geos::geom::Geometry* g,
13171363 void * item)
13181364 {
13191365 return GEOSSTRtree_remove_r (handle, tree, g, item);
13201366 }
13211367
13221368 void
1323- GEOSSTRtree_destroy (geos::index::strtree::STRtree * tree)
1369+ GEOSSTRtree_destroy (GEOSSTRtree * tree)
13241370 {
13251371 GEOSSTRtree_destroy_r (handle, tree);
13261372 }
0 commit comments