New upstream version 1.6-1
Andreas Tille
6 years ago
0 | 0 | Package: polyclip |
1 | Version: 1.5-6 | |
2 | Date: 2016-04-02 | |
1 | Version: 1.6-1 | |
2 | Date: 2017-03-22 | |
3 | 3 | Title: Polygon Clipping |
4 | 4 | Authors@R: c(person("Angus", "Johnson", role = "aut", |
5 | 5 | comment="C++ original, http://www.angusj.com/delphi/clipper.php"), |
6 | 6 | person("Adrian", "Baddeley", role = c("aut", "trl", "cre"), |
7 | 7 | email = "Adrian.Baddeley@curtin.edu.au"), |
8 | person(c("Brian", "D."), "Ripley", role = "ctb")) | |
8 | person(c("Brian", "D."), "Ripley", role = "ctb"), | |
9 | person("Kurt", "Hornik", role = "ctb")) | |
9 | 10 | Maintainer: Adrian Baddeley <Adrian.Baddeley@curtin.edu.au> |
10 | 11 | Depends: R (>= 3.0.0) |
11 | 12 | Description: R port of Angus Johnson's open source library Clipper. Performs polygon clipping operations (intersection, union, set minus, set difference) for polygonal regions of arbitrary complexity, including holes. Computes offset polygons (spatial buffer zones, morphological dilations, Minkowski dilations) for polygonal regions and polygonal lines. Computes Minkowski Sum of general polygons. There is a function for removing self-intersections from polygon data. |
18 | 19 | ByteCompile: true |
19 | 20 | Note: built from Clipper C++ version 6.4.0 |
20 | 21 | NeedsCompilation: yes |
21 | Packaged: 2016-04-02 03:34:42 UTC; adrian | |
22 | Packaged: 2017-03-22 02:47:50 UTC; 214132e | |
22 | 23 | Author: Angus Johnson [aut] (C++ original, |
23 | 24 | http://www.angusj.com/delphi/clipper.php), |
24 | 25 | Adrian Baddeley [aut, trl, cre], |
25 | Brian D. Ripley [ctb] | |
26 | Brian D. Ripley [ctb], | |
27 | Kurt Hornik [ctb] | |
26 | 28 | Repository: CRAN |
27 | Date/Publication: 2016-04-03 00:26:40 | |
29 | Date/Publication: 2017-03-22 08:55:21 UTC |
0 | 78f3384ba6536857c802cf20eb7e48e1 *DESCRIPTION | |
1 | b161b754c720c65d2a7a4e792e184710 *NAMESPACE | |
0 | 53764fcdc8fdfcd72355a122486eca3e *DESCRIPTION | |
1 | 36dda0a5bdbf4e57ee13374fcbac30e5 *NAMESPACE | |
2 | 2 | dee054bf03363f13a034c8b7c319d560 *R/First.R |
3 | 228450f42b6d0eacdb1f7b49001894ed *R/clipper.R | |
3 | c679b2c2bf427e69f9ccaf6dac6678db *R/clipper.R | |
4 | 4 | 14c7a9772d3b48055cbd8ddd053abbf3 *cleanup |
5 | 5 | 96f587cf30611ed5b85c9e2f93c9ae7c *configure |
6 | 7bd9d6693be5146893777f39ac2138be *configure.ac | |
6 | 5ba5a344623066f1db67cf9344323a82 *configure.ac | |
7 | 7 | d41d8cd98f00b204e9800998ecf8427e *configure.win |
8 | 8 | 215848c9be19696c6ba4bc09eff71cc8 *man/polyclip.Rd |
9 | 9 | 42c32d9ce87e76d6415660bcce8890c0 *man/polylineoffset.Rd |
11 | 11 | 3077cd8984bb169ece92b0aba2764d53 *man/polyoffset.Rd |
12 | 12 | c2e324c0595e64cf906d0b9a27a7c119 *man/polysimplify.Rd |
13 | 13 | e1b6cdccad75a12c3720ee122844ebb9 *src/Makevars.in |
14 | 8f8376f2c18541e4e8bbaf8734b11572 *src/Makevars.win | |
14 | 3ef9db028c12f7ba89e43f9af3340894 *src/Makevars.win | |
15 | 15 | 5dc2b7204a00e104dda75af865b5c526 *src/clipper.cpp |
16 | 16 | 15c4c3ec5c4bdbda0b087cfa0e4307d6 *src/clipper.h |
17 | 0d2a5f8997bd5d15df322d9490cc2c40 *src/init.c | |
17 | 18 | 86334dd01be0952e528e18f038ce17ad *src/interface.cpp |
0 | 0 | export(polyclip,polyoffset,polylineoffset,polysimplify,polyminkowski) |
1 | useDynLib(polyclip, | |
2 | "Cclipbool","Cpolyoffset","Clineoffset","Csimplify","Cminksum") | |
1 | useDynLib(polyclip, .registration=TRUE) |
52 | 52 | storage.mode(pft) <- "integer" |
53 | 53 | storage.mode(x0) <- storage.mode(y0) <- storage.mode(eps) <- "double" |
54 | 54 | result <- .Call("Csimplify", |
55 | A, pft, x0, y0, eps) | |
55 | A, pft, x0, y0, eps, | |
56 | PACKAGE = "polyclip") | |
56 | 57 | return(aspolygonlist(result)) |
57 | 58 | } |
58 | 59 | |
97 | 98 | storage.mode(x0) <- storage.mode(y0) <- storage.mode(eps) <- "double" |
98 | 99 | ans <- .Call("Cclipbool", |
99 | 100 | A, B, pftA, pftB, ct, |
100 | x0, y0, eps) | |
101 | x0, y0, eps, | |
102 | PACKAGE = "polyclip") | |
101 | 103 | return(aspolygonlist(ans)) |
102 | 104 | } |
103 | 105 | |
133 | 135 | storage.mode(miterlim) <- storage.mode(arctol) <- "double" |
134 | 136 | storage.mode(x0) <- storage.mode(y0) <- storage.mode(eps) <- "double" |
135 | 137 | ans <- .Call("Cpolyoffset", A, delta, jt, |
136 | miterlim, arctol, x0, y0, eps) | |
138 | miterlim, arctol, x0, y0, eps, | |
139 | PACKAGE = "polyclip") | |
137 | 140 | return(aspolygonlist(ans)) |
138 | 141 | } |
139 | 142 | |
181 | 184 | storage.mode(arctol) <- "double" |
182 | 185 | storage.mode(x0) <- storage.mode(y0) <- storage.mode(eps) <- "double" |
183 | 186 | ans <- .Call("Clineoffset", A, delta, jt, et, |
184 | miterlim, arctol, x0, y0, eps) | |
187 | miterlim, arctol, x0, y0, eps, | |
188 | PACKAGE = "polyclip") | |
185 | 189 | return(aspolygonlist(ans)) |
186 | 190 | } |
187 | 191 | |
220 | 224 | storage.mode(x0) <- storage.mode(y0) <- storage.mode(eps) <- "double" |
221 | 225 | storage.mode(closed) <- "logical" |
222 | 226 | result <- .Call("Cminksum", |
223 | A, B, closed, x0, y0, eps) | |
227 | A, B, closed, x0, y0, eps, | |
228 | PACKAGE = "polyclip") | |
224 | 229 | return(aspolygonlist(result)) |
225 | 230 | } |
0 | AC_INIT(polyclip,[1.5-4]) | |
0 | AC_INIT(polyclip,[1.6-1]) | |
1 | 1 | AC_PROG_CXX |
2 | 2 | AC_LANG([C++]) |
3 | 3 | dnl Check for presence of C++11 |
0 | ||
1 | /* | |
2 | Native symbol registration table for polyclip package | |
3 | ||
4 | */ | |
5 | ||
6 | #include <R.h> | |
7 | #include <Rinternals.h> | |
8 | #include <stdlib.h> // for NULL | |
9 | #include <R_ext/Rdynload.h> | |
10 | ||
11 | SEXP Csimplify(SEXP A, | |
12 | SEXP pft, | |
13 | SEXP X0, | |
14 | SEXP Y0, | |
15 | SEXP Eps); | |
16 | ||
17 | SEXP Cclipbool(SEXP A, | |
18 | SEXP B, | |
19 | SEXP pftA, | |
20 | SEXP pftB, | |
21 | SEXP ct, | |
22 | SEXP X0, | |
23 | SEXP Y0, | |
24 | SEXP Eps); | |
25 | ||
26 | SEXP Cpolyoffset(SEXP A, | |
27 | SEXP del, | |
28 | SEXP jt, | |
29 | SEXP mlim, | |
30 | SEXP atol, | |
31 | SEXP X0, | |
32 | SEXP Y0, | |
33 | SEXP Eps); | |
34 | ||
35 | SEXP Clineoffset(SEXP A, | |
36 | SEXP del, | |
37 | SEXP jt, | |
38 | SEXP et, | |
39 | SEXP mlim, | |
40 | SEXP atol, | |
41 | SEXP X0, | |
42 | SEXP Y0, | |
43 | SEXP Eps); | |
44 | ||
45 | SEXP Cminksum(SEXP A, | |
46 | SEXP B, | |
47 | SEXP clo, | |
48 | SEXP X0, | |
49 | SEXP Y0, | |
50 | SEXP Eps); | |
51 | ||
52 | ||
53 | static const R_CMethodDef CEntries[] = { | |
54 | {NULL, NULL, 0} | |
55 | }; | |
56 | ||
57 | static const R_CallMethodDef CallEntries[] = { | |
58 | {"Csimplify", (DL_FUNC) &Csimplify, 5}, | |
59 | {"Cclipbool", (DL_FUNC) &Cclipbool, 8}, | |
60 | {"Cpolyoffset", (DL_FUNC) &Cpolyoffset, 8}, | |
61 | {"Clineoffset", (DL_FUNC) &Clineoffset, 9}, | |
62 | {"Cminksum", (DL_FUNC) &Cminksum, 6}, | |
63 | {NULL, NULL, 0} | |
64 | }; | |
65 | ||
66 | ||
67 | void R_init_polyclip(DllInfo *dll) | |
68 | { | |
69 | R_registerRoutines(dll, CEntries, CallEntries, NULL, NULL); | |
70 | R_useDynamicSymbols(dll, FALSE); | |
71 | } |