Skip to content

Commit 709a485

Browse files
committed
Update to GEOS 3.9.0
1 parent 9bd66b7 commit 709a485

File tree

494 files changed

+27772
-36960
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

494 files changed

+27772
-36960
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ at least controversial. Use of geos without dynamic linking is discouraged.
3434

3535
1. Update your `Cartfile` to include:
3636

37-
github "GEOSwift/geos" ~> 5.0.0
37+
github "GEOSwift/geos" ~> 5.1.0
3838

3939
2. Finish updating your project by following the [typical Carthage
4040
workflow](https://github.com/Carthage/Carthage#quick-start).
@@ -43,7 +43,7 @@ workflow](https://github.com/Carthage/Carthage#quick-start).
4343

4444
1. Update the top-level dependencies in your `Package.swift` to include:
4545

46-
.package(url: "https://github.com/GEOSwift/geos.git", from: "5.0.0")
46+
.package(url: "https://github.com/GEOSwift/geos.git", from: "5.1.0")
4747

4848
2. Update the target dependencies in your `Package.swift` to include
4949

@@ -90,5 +90,6 @@ how to get from the GEOS source to the end result in this repo.
9090
continued support for CocoaPods, Carthage, and Swift PM.
9191
6. Test all your changes on the full matrix of supported configs (CocoaPods,
9292
Carthage, Swift PM) x (iOS, macOS, tvOS) + Swift PM x Linux.
93-
7. Update the version numbers in `Resources/Info.plist` and `geos.podspec`
93+
7. Update the version numbers in `Resources/Info.plist`, `geos.podspec`,
94+
and `README.md`
9495
8. Update this README with any relevant information.

Resources/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>5.0.0</string>
18+
<string>5.1.0</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
</dict>

Sources/geos/capi/geos_c.cpp

Lines changed: 65 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
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>
@@ -39,10 +35,10 @@
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
4642
typedef struct GEOSBufParams_t GEOSBufferParams;
4743

4844
#include "geos_c.h"
@@ -74,11 +70,7 @@ using geos::io::WKTWriter;
7470
using geos::io::WKBReader;
7571
using 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

8375
typedef 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

Comments
 (0)