Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated usage #129

Merged
merged 5 commits into from
Dec 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -382,14 +382,10 @@ export(wk_void)
export(wk_void_handler)
export(wk_writer)
export(wkb)
export(wkb_problems)
export(wkb_translate_wkb)
export(wkb_translate_wkt)
export(wkb_writer)
export(wkt)
export(wkt_format)
export(wkt_format_handler)
export(wkt_problems)
export(wkt_translate_wkb)
export(wkt_translate_wkt)
export(wkt_writer)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
* Incorporated the geodesic attribute into vctrs methods, data frame
columns, and bbox/envelope calculation (#124, #125).
* Fix `as_xy()` for nested data frames and geodesic objects (#126, #128).
* Remove deprecated `wkb_problems()`, `wkt_problems()`, `wkb_format()`,
and `wkt_format()` (#129).

# wk 0.5.0

Expand Down
26 changes: 0 additions & 26 deletions R/deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#' @param wkb A `list()` of [raw()] vectors, such as that
#' returned by `sf::st_as_binary()`.
#' @param wkt A character vector containing well-known text.
#' @param max_coords The maximum number of coordinates to include
#' in the output.
#' @param trim Trim unnecessary zeroes in the output?
#' @param precision The rounding precision to use when writing
#' (number of decimal places).
Expand All @@ -17,30 +15,6 @@
#'
#' @rdname deprecated
#'
wkb_format <- function(wkb, max_coords = 3, precision = 6, trim = TRUE) {
wk_handle.wk_wkb(wkb, wkt_format_handler(precision, trim, max_coords))
}

#' @rdname deprecated
#' @export
wkt_format <- function(wkt, max_coords = 3, precision = 6, trim = TRUE) {
wk_handle.wk_wkt(wkt, wkt_format_handler(precision, trim, max_coords))
}

#' @rdname deprecated
#' @export
wkb_problems <- function(wkb) {
wk_handle(new_wk_wkb(unclass(wkb)), wk_problems_handler())
}

#' @rdname deprecated
#' @export
wkt_problems <- function(wkt) {
wk_handle(new_wk_wkt(unclass(wkt)), wk_problems_handler())
}

#' @rdname deprecated
#' @export
wkb_translate_wkt <- function(wkb, ..., precision = 16, trim = TRUE) {
unclass(wk_handle.wk_wkb(wkb, wkt_writer(precision, trim)))
}
Expand Down
2 changes: 1 addition & 1 deletion R/wkb.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ parse_wkb <- function(x, crs = wk_crs_auto(), geodesic = FALSE) {
crs <- wk_crs_auto_value(x, crs)
attributes(x) <- NULL
wkb <- new_wk_wkb(x, crs = crs, geodesic = if (isTRUE(geodesic)) TRUE else NULL)
parse_base(wkb, wkb_problems(wkb))
parse_base(wkb, wk_problems(wkb))
}

#' @rdname wkb
Expand Down
25 changes: 5 additions & 20 deletions man/deprecated.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 0 additions & 50 deletions tests/testthat/test-deprecated.R

This file was deleted.