Skip to content

Commit

Permalink
fix & close #83
Browse files Browse the repository at this point in the history
  • Loading branch information
SymbolixAU committed May 13, 2020
1 parent 92c6ba8 commit a191899
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: sfheaders
Type: Package
Title: Converts Between R Objects and Simple Feature Objects
Date: 2020-03-19
Version: 0.2.1005
Version: 0.2.1006
Authors@R: c(
person("David", "Cooley", ,"[email protected]", role = c("aut", "cre")),
person(given = "Michael", family = "Sumner", role = "ctb")
Expand Down
23 changes: 6 additions & 17 deletions R/sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ sf_multipoint <- function(
geometry_columns <- index_correct( geometry_columns )
multipoint_id <- index_correct( multipoint_id )
list_columns <- index_correct( list_columns )
res <- return(
rcpp_to_sf(
res <- rcpp_to_sf(
obj,
geometry_columns
, multipoint_id ## multipoint_id
Expand All @@ -127,9 +126,7 @@ sf_multipoint <- function(
, keep ## keep
, xyzm(x,y,z,m)
, "MULTIPOINT"
)
)

return( replace_id( res, multipoint_id ) )
}

Expand Down Expand Up @@ -181,8 +178,7 @@ sf_linestring <- function(
geometry_columns <- index_correct( geometry_columns )
linestring_id <- index_correct( linestring_id )
list_columns <- index_correct( list_columns )
res <- return(
rcpp_to_sf(
res <- rcpp_to_sf(
obj,
geometry_columns
, NULL ## multipoint_id
Expand All @@ -195,8 +191,7 @@ sf_linestring <- function(
, keep ## keep
, xyzm(x,y,z,m)
, "LINESTRING"
)
)
)
return( replace_id( res, linestring_id ) )
}

Expand Down Expand Up @@ -269,8 +264,7 @@ sf_multilinestring <- function(
linestring_id <- index_correct( linestring_id )
multilinestring_id <- index_correct( multilinestring_id )
list_columns <- index_correct( list_columns )
res <- return(
rcpp_to_sf(
res <- rcpp_to_sf(
obj,
geometry_columns
, NULL ## multipoint_id
Expand All @@ -284,7 +278,6 @@ sf_multilinestring <- function(
, xyzm(x,y,z,m)
, "MULTILINESTRING"
)
)
return( replace_id( res, multilinestring_id ) )
}

Expand Down Expand Up @@ -395,8 +388,7 @@ sf_polygon <- function(
linestring_id <- index_correct( linestring_id )
polygon_id <- index_correct( polygon_id )
list_columns <- index_correct( list_columns )
res <- return(
rcpp_to_sf(
res <- rcpp_to_sf(
obj,
geometry_columns
, NULL ## multipoint_id
Expand All @@ -410,7 +402,6 @@ sf_polygon <- function(
, xyzm(x,y,z,m)
, "POLYGON"
)
)

return( replace_id( res, polygon_id ) )
}
Expand Down Expand Up @@ -511,8 +502,7 @@ sf_multipolygon <- function(
polygon_id <- index_correct( polygon_id )
multipolygon_id <- index_correct( multipolygon_id )
list_columns <- index_correct( list_columns )
res <- return(
rcpp_to_sf(
res <- rcpp_to_sf(
obj,
geometry_columns
, NULL ## multipoint_id
Expand All @@ -526,7 +516,6 @@ sf_multipolygon <- function(
, xyzm(x,y,z,m)
, "MULTIPOLYGON"
)
)
return( replace_id( res, multipolygon_id ) )
}

Expand Down

0 comments on commit a191899

Please sign in to comment.