Skip to content

Commit

Permalink
Merge pull request #88 from olivroy/docs
Browse files Browse the repository at this point in the history
Separate deprecated functions from others
  • Loading branch information
edzer committed Feb 14, 2024
2 parents e7467e5 + 4767b22 commit 7a4de52
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 53 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ tic.R
^\.ccache$
^\.github$
^tic\.R$
^_pkgdown\.yml$
^pkgdown$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
src/*.so
src/*.dll
docs/
docs
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ LinkingTo:
SystemRequirements: GEOS (>= 3.5.0), PROJ (>= 4.8.0), sqlite3
License: GPL-2
Copyright: file COPYRIGHTS
URL: https://github.com/r-spatial/lwgeom/
BugReports: https://github.com/r-spatial/lwgeom/issues/
Encoding: UTF-8
URL: https://r-spatial.github.io/lwgeom/, https://github.com/r-spatial/lwgeom
BugReports: https://github.com/r-spatial/lwgeom/issues
Collate:
init.R
RcppExports.R
Expand All @@ -43,4 +44,4 @@ Collate:
geod.R
wkt.R
wrap_x.R
RoxygenNote: 7.3.0
RoxygenNote: 7.3.1
19 changes: 14 additions & 5 deletions R/perimeter.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' compute perimeter from polygons or other geometries
#' Compute perimeter from polygons or other geometries
#'
#' @name perimeter
#' @param x object of class \code{sf}, \code{sfc} or \code{sfg}
Expand All @@ -12,12 +12,21 @@ st_perimeter_lwgeom = function(x) {
ret
}

#' @export
#' @name perimeter
st_perimeter = function(x) .Deprecated("sf::st_perimeter or lwgeom::st_perimeter_lwgeom")
#' compute perimeter from polygons or other geometries
#'
#' Deprecated.
#' Use \code{sf::st_perimeter()} or \code{st_perimeter_lwgeom()} instead.
#' @keywords internal
#' @name perimeter-deprecated
#' @param x object of class \code{sf}, \code{sfc} or \code{sfg}
st_perimeter = function(x) {
.Deprecated("sf::st_perimeter or lwgeom::st_perimeter_lwgeom")
# for back compatibility
st_perimeter_lwgeom(x)
}

#' @export
#' @name perimeter
#' @rdname perimeter
st_perimeter_2d = function(x) {
if (isTRUE(st_is_longlat(x)))
stop("for perimeter of longlat geometry, cast to LINESTRING and use st_length") # nocov
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# lwgeom
R bindings to the [liblwgeom](https://github.com/postgis/postgis/tree/master/liblwgeom) library

<!--- badges: start --->
[![R-CMD-check](https://github.com/r-spatial/lwgeom/workflows/tic/badge.svg)](https://github.com/r-spatial/lwgeom/actions)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/r-spatial/lwgeom?branch=master&svg=true)](https://ci.appveyor.com/project/edzer/lwgeom)
[![Coverage Status](https://img.shields.io/codecov/c/github/r-spatial/lwgeom/master.svg)](https://codecov.io/github/r-spatial/lwgeom?branch=master)
[![Coverage Status](https://img.shields.io/codecov/c/github/r-spatial/lwgeom/master.svg)](https://app.codecov.io/github/r-spatial/lwgeom?branch=master)
[![CRAN](http://www.r-pkg.org/badges/version/lwgeom)](https://cran.r-project.org/package=lwgeom)
[![cran checks](https://badges.cranchecks.info/worst/lwgeom.svg)](https://cran.r-project.org/web/checks/check_results_lwgeom.html)
[![Downloads](http://cranlogs.r-pkg.org/badges/lwgeom?color=brightgreen)](http://www.r-pkg.org/pkg/lwgeom)
[![Downloads](http://cranlogs.r-pkg.org/badges/lwgeom?color=brightgreen)](https://www.r-pkg.org:443/pkg/lwgeom)
<!--- badges: start --->


This package provides functions that use
Expand Down
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url: https://r-spatial.github.io/lwgeom/
template:
bootstrap: 5

43 changes: 0 additions & 43 deletions appveyor.yml

This file was deleted.

0 comments on commit 7a4de52

Please sign in to comment.