Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Commit 4425e33

Browse files
committed
Update to GEOS 3.9.1
Fixes r-spatial/sf#1781 (comment)
1 parent 5f71e86 commit 4425e33

File tree

16 files changed

+39
-21
lines changed

16 files changed

+39
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Windows build of GDAL 3 stack:
44
- [gdal 3.2.1](https://github.com/r-windows/rtools-packages/tree/master/mingw-w64-gdal)
55
- [proj 7.2.1](https://github.com/r-windows/rtools-packages/tree/master/mingw-w64-proj)
6-
- [geos 3.9.0](https://github.com/r-windows/rtools-packages/tree/master/mingw-w64-geos)
6+
- [geos 3.9.1](https://github.com/r-windows/rtools-packages/tree/master/mingw-w64-geos)
77
- Dependencies were built with rtools40 GCC 8.3.0 [rtools-packages](https://github.com/r-windows/rtools-packages)
88

99
The binaires in [lib-4.9.3](lib-4.9.3) are needed to build on R 3.3-3.6 and were built with [rtools-backports](https://github.com/r-windows/rtools-backports).

include/geos-3.9.0/geos/algorithm/Orientation.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,32 @@ class GEOS_DLL Orientation {
8989
*/
9090
static bool isCCW(const geom::CoordinateSequence* ring);
9191

92+
/**
93+
* Tests if a ring defined by a CoordinateSequence is
94+
* oriented counter-clockwise, using the signed area of the ring.
95+
*
96+
* * The list of points is assumed to have the first and last points equal.
97+
* * This handles coordinate lists which contain repeated points.
98+
* * This handles rings which contain collapsed segments
99+
* (in particular, along the top of the ring).
100+
* * This handles rings which are invalid due to self-intersection
101+
*
102+
* This algorithm is guaranteed to work with valid rings.
103+
* For invalid rings (containing self-intersections),
104+
* the algorithm determines the orientation of
105+
* the largest enclosed area (including overlaps).
106+
* This provides a more useful result in some situations, such as buffering.
107+
*
108+
* However, this approach may be less accurate in the case of
109+
* rings with almost zero area.
110+
* (Note that the orientation of rings with zero area is essentially
111+
* undefined, and hence non-deterministic.)
112+
*
113+
* @param ring a CoordinateSequence forming a ring (with first and last point identical)
114+
* @return true if the ring is oriented counter-clockwise.
115+
*/
116+
static bool isCCWArea(const geom::CoordinateSequence* ring);
117+
92118
};
93119

94120

include/geos-3.9.0/geos/operation/overlayng/EdgeMerger.h

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,32 +59,23 @@ namespace overlayng { // geos.operation.overlayng
5959
* This ensures that the overlay output line direction will be as consistent
6060
* as possible with input lines.
6161
*
62+
* The merger also preserves the order of the edges in the input.
63+
* This means that for polygon-line overlay
64+
* the result lines will be in the same order as in the input
65+
* (possibly with multiple result lines for a single input line).
66+
*
6267
* @author mdavis
6368
*
6469
*/
6570
class GEOS_DLL EdgeMerger {
6671

67-
private:
68-
69-
70-
// Members
71-
std::vector<Edge*>& edges;
72-
std::map<EdgeKey, Edge*> edgeMap;
73-
7472
public:
7573

76-
// Methods
77-
EdgeMerger(std::vector<Edge*>& p_edges);
78-
7974
static std::vector<Edge*> merge(std::vector<Edge*>& edges);
8075

81-
std::vector<Edge*> merge();
82-
83-
8476
};
8577

8678

8779
} // namespace geos.operation.overlayng
8880
} // namespace geos.operation
8981
} // namespace geos
90-

include/geos-3.9.0/geos/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
#endif
2424

2525
#ifndef GEOS_VERSION_PATCH
26-
#define GEOS_VERSION_PATCH 0
26+
#define GEOS_VERSION_PATCH 1
2727
#endif
2828

2929
#ifndef GEOS_VERSION
30-
#define GEOS_VERSION "3.9.0"
30+
#define GEOS_VERSION "3.9.1"
3131
#endif
3232

3333
#ifndef GEOS_JTS_PORT

include/geos-3.9.0/geos_c.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ extern "C" {
5858
#define GEOS_VERSION_MINOR 9
5959
#endif
6060
#ifndef GEOS_VERSION_PATCH
61-
#define GEOS_VERSION_PATCH 0
61+
#define GEOS_VERSION_PATCH 1
6262
#endif
6363
#ifndef GEOS_VERSION
64-
#define GEOS_VERSION "3.9.0"
64+
#define GEOS_VERSION "3.9.1"
6565
#endif
6666
#ifndef GEOS_JTS_PORT
6767
#define GEOS_JTS_PORT "1.17.0"
6868
#endif
6969

7070
#define GEOS_CAPI_VERSION_MAJOR 1
71-
#define GEOS_CAPI_VERSION_MINOR 16
71+
#define GEOS_CAPI_VERSION_MINOR 14
7272
#define GEOS_CAPI_VERSION_PATCH 2
73-
#define GEOS_CAPI_VERSION "3.9.0-CAPI-1.16.2"
73+
#define GEOS_CAPI_VERSION "3.9.1-CAPI-1.14.2"
7474

7575
#define GEOS_CAPI_FIRST_INTERFACE GEOS_CAPI_VERSION_MAJOR
7676
#define GEOS_CAPI_LAST_INTERFACE (GEOS_CAPI_VERSION_MAJOR+GEOS_CAPI_VERSION_MINOR)

include/geos-3.9.1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
geos-3.9.0

lib-4.9.3/i386/libgeos.a

16.6 KB
Binary file not shown.

lib-4.9.3/i386/libgeos_c.a

3.81 KB
Binary file not shown.

lib-4.9.3/x64/libgeos.a

17 KB
Binary file not shown.

lib-4.9.3/x64/libgeos_c.a

4.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)