Skip to content

Commit f3b9ec4

Browse files
schloerkejcheng5
andauthored
Remove CRAN warnings for release (#849)
Co-authored-by: Joe Cheng <[email protected]>
1 parent d55adb7 commit f3b9ec4

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

R/normalize-sp.R

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,13 @@ sp_bbox <- function(x) {
8282
}
8383

8484
#' @export
85-
to_multipolygon_list.SpatialPolygons <- function(pgons) {
86-
lapply(pgons@polygons, to_multipolygon)
85+
to_multipolygon_list.SpatialPolygons <- function(x) {
86+
lapply(x@polygons, to_multipolygon)
8787
}
8888

8989
#' @export
90-
to_multipolygon.Polygons <- function(pgons) {
90+
to_multipolygon.Polygons <- function(x) {
91+
pgons <- x
9192
if (length(pgons@Polygons) > 1) {
9293
# If Polygons contains more than one Polygon, then we may be dealing with
9394
# a polygon with holes or a multipolygon (potentially with holes). Use
@@ -109,21 +110,21 @@ to_multipolygon.Polygons <- function(pgons) {
109110
}
110111

111112
#' @export
112-
to_ring.Polygon <- function(pgon) {
113-
sp_coords(pgon)
113+
to_ring.Polygon <- function(x) {
114+
sp_coords(x)
114115
}
115116

116117
#' @export
117-
to_multipolygon_list.SpatialLines <- function(lines) {
118-
lapply(lines@lines, to_multipolygon)
118+
to_multipolygon_list.SpatialLines <- function(x) {
119+
lapply(x@lines, to_multipolygon)
119120
}
120121

121122
#' @export
122-
to_multipolygon.Lines <- function(lines) {
123-
lapply(lines@Lines, to_polygon)
123+
to_multipolygon.Lines <- function(x) {
124+
lapply(x@Lines, to_polygon)
124125
}
125126

126127
#' @export
127-
to_ring.Line <- function(line) {
128-
sp_coords(line)
128+
to_ring.Line <- function(x) {
129+
sp_coords(x)
129130
}

0 commit comments

Comments
 (0)