diff --git a/.gitignore b/.gitignore index 09a72cb..9aa9334 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .Rhistory .RData inst/doc +CRAN-SUBMISSION diff --git a/DESCRIPTION b/DESCRIPTION index ec93145..503b5b1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: sfdct Title: Constrained Triangulation for Simple Features -Version: 0.2.0 +Version: 0.3.0 Authors@R: person("Michael D.","Sumner", role = c("aut", "cre"), email = "mdsumner@gmail.com") Description: Build a constrained high quality Delaunay triangulation from simple features objects, applying constraints based on input line segments, and diff --git a/NEWS.md b/NEWS.md index 0f303db..5fcc985 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ +# sfdct 0.3.0 + +* Updated plot to remove issue on CRAN vignette. + +* Recreated antarctica dataset. + + # sfdct 0.2.0 * Fix namespace thanks to CRAN. diff --git a/cran-comments.md b/cran-comments.md index bc2d1e3..9fbfcc0 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,6 @@ -## sfdct 0.2.0 +## sfdct 0.3.0 -Second submission, fixed doc format and namespace issues. +Fixed on CRAN issue with vignette. Thanks! @@ -15,7 +15,6 @@ Thanks! 0 errors | 0 warnings | 0 notes -## Reverse dependencies There are no reverse dependencies. diff --git a/data-raw/antarctica.r b/data-raw/antarctica.r index 37a07bb..efdbf4f 100644 --- a/data-raw/antarctica.r +++ b/data-raw/antarctica.r @@ -1,10 +1,12 @@ library(maps) library(dplyr) library(sf) -antarctica <- map(plot = FALSE, fill = TRUE) %>% st_as_sf() %>% dplyr::filter(ID == "Antarctica") %>% st_transform("+proj=laea +lat_0=-90 +lon_0=147 +ellps=WGS84") + +crs <- "+proj=laea +lat_0=-90 +lon_0=147 +ellps=WGS84" +antarctica <- map(plot = FALSE, fill = TRUE) %>% st_as_sf() %>% dplyr::filter(ID == "Antarctica") %>% st_transform(crs) #plot(antarctica) -hole_in_antarctica <- st_sfc(st_buffer(st_point(c(0, 0)), dist = 5e5)) +hole_in_antarctica <- st_sfc(st_buffer(st_point(c(0, 0)), dist = 5e5), crs = crs) -antarctica <- st_set_crs(rbind(antarctica, st_sf(ID = "not Antarctica", geometry = hole_in_antarctica)), st_crs(antarctica)) -devtools::use_data(antarctica, compress = "xz") +antarctica <- rbind(antarctica, st_sf(ID = "not Antarctica", geom = hole_in_antarctica)) +usethis::use_data(antarctica, compress = "xz") diff --git a/data/antarctica.rda b/data/antarctica.rda index c849595..4af51c4 100644 Binary files a/data/antarctica.rda and b/data/antarctica.rda differ diff --git a/sfdct.Rproj b/sfdct.Rproj index 0ee12cd..052e507 100644 --- a/sfdct.Rproj +++ b/sfdct.Rproj @@ -19,4 +19,4 @@ BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source PackageCheckArgs: --as-cran -PackageRoxygenize: rd,collate,namespace +PackageRoxygenize: rd,collate,namespace,vignette diff --git a/vignettes/.gitignore b/vignettes/.gitignore new file mode 100644 index 0000000..097b241 --- /dev/null +++ b/vignettes/.gitignore @@ -0,0 +1,2 @@ +*.html +*.R diff --git a/vignettes/sfdct.Rmd b/vignettes/sfdct.Rmd index 79c634a..f5f0fc9 100644 --- a/vignettes/sfdct.Rmd +++ b/vignettes/sfdct.Rmd @@ -1,5 +1,5 @@ --- -title: "High Quality Constrained triangulation for Simple Features" +title: "High Quality Constrained Triangulation for Simple Features" author: "Michael D. Sumner" date: "`r Sys.Date()`" output: @@ -7,7 +7,7 @@ output: fig_width: 7 fig_height: 7 vignette: > - %\VignetteIndexEntry{constrained-triangulation-simple-features} + %\VignetteIndexEntry{"High Quality Constrained Triangulation for Simple Features} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- @@ -92,9 +92,9 @@ nc_triangles[1:2, c(1, 5)] %>% st_transform("+proj=laea") %>% ct_triangulate(a = ```{r} data("antarctica") -plot(antarctica) +plot(antarctica[0]) a <- ct_triangulate(st_difference(antarctica[1], antarctica[2, ]), a = 5e10) -plot(st_geometry(a), col = "firebrick") +plot(a[0], col = "firebrick") ```