Skip to content

Commit

Permalink
fix CRAN issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsumner committed Jan 3, 2024
1 parent a92f92a commit 6b488e4
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.Rhistory
.RData
inst/doc
CRAN-SUBMISSION
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]")
Description: Build a constrained high quality Delaunay triangulation from simple
features objects, applying constraints based on input line segments, and
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
5 changes: 2 additions & 3 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -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!

Expand All @@ -15,7 +15,6 @@ Thanks!
0 errors | 0 warnings | 0 notes


## Reverse dependencies

There are no reverse dependencies.

Expand Down
10 changes: 6 additions & 4 deletions data-raw/antarctica.r
Original file line number Diff line number Diff line change
@@ -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")
Binary file modified data/antarctica.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion sfdct.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions vignettes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.html
*.R
8 changes: 4 additions & 4 deletions vignettes/sfdct.Rmd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
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:
rmarkdown::html_vignette:
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}
---
Expand Down Expand Up @@ -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")
```


Expand Down

0 comments on commit 6b488e4

Please sign in to comment.