• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..18-Dec-2021-

include/mapbox/H18-Dec-2021-6,9265,690

.clang-formatH A D18-Dec-202120 21

LICENSE.READMEH A D18-Dec-20211.7 KiB5751

LICENSE.geometryH A D18-Dec-2021724 1311

LICENSE.wagyuH A D18-Dec-20211.8 KiB3831

Makefile.inH A D18-Dec-20213.4 KiB10365

README.mdH A D18-Dec-20212 KiB2918

lwgeom_wagyu.cppH A D18-Dec-20216.6 KiB267196

lwgeom_wagyu.hH A D18-Dec-20212.1 KiB6713

LICENSE.README

1# LICENSE.geometry applies to:
2
3include/
4└── mapbox
5    ├── feature.hpp
6    ├── geometry
7    │   ├── box.hpp
8    │   ├── empty.hpp
9    │   ├── envelope.hpp
10    │   ├── for_each_point.hpp
11    │   ├── geometry.hpp
12    │   ├── line_string.hpp
13    │   ├── multi_line_string.hpp
14    │   ├── multi_point.hpp
15    │   ├── multi_polygon.hpp
16    │   ├── point_arithmetic.hpp
17    │   ├── point.hpp
18    │   └── polygon.hpp
19    ├── geometry.hpp
20    └── geometry_io.hpp
21
222 directories, 15 files
23
24# LICENSE.wagyu applies to:
25
26include/
27└── mapbox
28    └── geometry
29        └── wagyu
30            ├── active_bound_list.hpp
31            ├── bound.hpp
32            ├── bubble_sort.hpp
33            ├── build_edges.hpp
34            ├── build_local_minima_list.hpp
35            ├── build_result.hpp
36            ├── config.hpp
37            ├── edge.hpp
38            ├── interrupt.hpp
39            ├── intersect.hpp
40            ├── intersect_util.hpp
41            ├── local_minimum.hpp
42            ├── local_minimum_util.hpp
43            ├── point.hpp
44            ├── process_horizontal.hpp
45            ├── process_maxima.hpp
46            ├── quick_clip.hpp
47            ├── ring.hpp
48            ├── ring_util.hpp
49            ├── scanbeam.hpp
50            ├── snap_rounding.hpp
51            ├── topology_correction.hpp
52            ├── util.hpp
53            ├── vatti.hpp
54            └── wagyu.hpp
55
563 directories, 24 files
57

README.md

1# Wagyu
2
3Wagyu is a library that performs polygon clipping using the [Vatti Clipping Algorithm](https://en.wikipedia.org/wiki/Vatti_clipping_algorithm).  It is based on the [Clipper Library](http://www.angusj.com/delphi/clipper.php) but it adds an extra phase to correct the topology and guarantee validation accoding to the OGC specification.
4
5Wagyu is a header only library but depends on [Mapbox Geometry](https://github.com/mapbox/geometry.hpp). It requires a C++ compiler that supports at least C++11.
6
7# liblwgeom bindings
8
9To be able to use Wagyu in Postgis, several functions have been added as a bridge between liblwgeom's C code, and the C++ header only library:
10  - `lwgeom_wagyu_clip_by_box`: Main function to clip and force validation over a polygon.
11  - `libwagyu_version`: Returns a static string with the version of the wagyu library.
12  - `lwgeom_wagyu_interruptRequest`: Function to request the interruption of the wagyu library.
13
14It is integrated in the project as an static library inside postgis.so, so it doesn't require an extra dependency at runtime besides `libstdc++` and `libm` which were a requisite.
15
16# Main considerations about the library
17
18- It works only with POLYGONTYPE or MULTIPOLYGONTYPE type geometries. Anything else will be dropped.
19- It's currently setup to use `int32_t` values internally for extra speed. It could be changed to use to `int64_t` or to `double` to match liblwgeom but, as it's only used by MVT, this isn't necessary.
20- The library is clipping the geometry to the bounding box passed. It also supports `Intersection` of 2 geometries, `Union`, `Difference` or `XOR` of 2 geometries but those functionalities aren't exposed.
21- The library outputs the geometry in the correct winding order for **MVT**, which is the opposite of OGC as the vertical order is switched.
22
23
24# Dependency changelog
25
26  - 2019-02-05 - [Wagyu] Library extraction from https://github.com/mapbox/wagyu
27  - 2019-02-05 - [geometry.hpp] Library extraction from https://github.com/mapbox/geometry.hpp
28  - 2020-05-08 - [Wagyu] Update to 0.5.0
29