Skip to content

Commit

Permalink
Merge branch 'master' of github.com:r-spatial/lwgeom
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Feb 15, 2024
2 parents 9446cb8 + 826aae6 commit 036ed7f
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 82 deletions.
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
73 changes: 22 additions & 51 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

Expand All @@ -16,67 +18,36 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "R/4.1.0 (ubuntu-20.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
Ncpus: 4
rtools-version: '42'
update-rtools: true

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: Restore R package cache
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libudunits2-dev libgdal-dev libgeos-dev libproj-dev
extra-packages: any::rcmdcheck
needs: check

- name: Install system dependencies (MacOS)
if: runner.os == 'MacOS'
if: runner.os == 'macos'
run: brew install gdal proj udunits pkg-config

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main

- uses: r-lib/actions/check-r-package@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
upload-snapshots: true
28 changes: 12 additions & 16 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# version 0.2-14

* `st_perimeter()` is deprecated in favor of `st_perimeter_lwgeom()`, as `sf` takes over `st_perimeter()`

# version 0.2-12
* `st_perimeter()` is deprecated in favor of `st_perimeter_lwgeom()`, as `sf` takes over with `sf::st_perimeter()`.

# version 0.2-13

Expand Down Expand Up @@ -38,65 +36,63 @@

* fix configure script to work with ubuntu/bionic and PROJ 4.9.3; #28

# version 0.2-3

* fix configure script to work with PROJ 5.x versions

# version 0.2-2

* adjust to sf >= 0.9-0 new crs representation

* use `st_make_valid` generic from package sf; https://github.com/r-spatial/sf/issues/1300
* use `st_make_valid()` generic from package sf; https://github.com/r-spatial/sf/issues/1300

# version 0.2-1

* fix PROJ 5.x installation issue (has proj.h, but shouldn't use it)

# version 0.2-0

* export `lwgeom_make_valid`, to gradually move `st_make_valid` from `lwgeom` to `sf`; https://github.com/r-spatial/sf/issues/989
* export `lwgeom_make_valid()`, to gradually move `st_make_valid()` from `lwgeom` to `sf`; https://github.com/r-spatial/sf/issues/989

* constrain argument `crs` in `st_transform_proj` to take one or two character strings
* constrain argument `crs` in `st_transform_proj()` to take one or two character strings

* update to POSTGIS 3.0.0 liblwgeom version

* update to modern PROJ, use proj.h when available

# version 0.1-5

* check for user interrupts on `st_geod_distance`, #29 by Dan Baston
* check for user interrupts on `st_geod_distance()`, #29 by Dan Baston

* add `st_astext` for fast WKT writing, #25 by Etienne Racine
* add `st_astext()` for fast WKT writing, #25 by Etienne Racine

* add `st_is_polygon_cw`, #21 by Andy Teucher @ateucher; add Andy Teucher to contributors
* add `st_is_polygon_cw()`, #21 by Andy Teucher @ateucher; add Andy Teucher to contributors

* add `st_perimeter` and `st_perimeter_2d` functions to compute the length measurement of the boundary of a surface.
* add `st_perimeter()` and `st_perimeter_2d()` functions to compute the length measurement of the boundary of a surface.

* allow `st_transform_proj` to take two proj4 strings as crs, as `c(input_p4s, output_p4s)`, ignoring the CRS of x
* allow `st_transform_proj()` to take two proj4 strings as crs, as `c(input_p4s, output_p4s)`, ignoring the CRS of x

# version 0.1-4

* tries to fix the CRAN error for r-release-osx (datum files missing in sf; removed test)

# version 0.1-3

* add `st_geod_covered_by` binary geometry predicate
* add `st_geod_covered_by()` binary geometry predicate

# version 0.1-2

* try to fix OSX compile on CRAN, tuning configure.ac

# version 0.1-1

* add `st_length`
* add `st_length()`

* attempt to fix Solaris and OSX

* report proj.4 and GEOS versions on startup, and on `lwgeom_extSoftwareVersions`; #10

* add minimum bounding circle, by @rundel; #7

* add `st_subdivide`, see https://github.com/r-spatial/sf/issues/597
* add `st_subdivide()`, see https://github.com/r-spatial/sf/issues/597

# version 0.1-0

Expand Down
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
# 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)
<!-- badges: start -->
[![R-CMD-check](https://github.com/r-spatial/lwgeom/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-spatial/lwgeom/actions/workflows/R-CMD-check.yaml)
[![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)](https://www.r-pkg.org:443/pkg/lwgeom)
<!--- badges: start --->
<!-- badges: end -->


This package provides functions that use
`liblwgeom`, including `st_geohash`,
`st_minimum_bounding_circle`, `st_split`, `st_subdivide`,
`st_transform_proj` (transform through proj, omitting
GDAL) and `st_as_sfc.TWKB` (creates `sfc` from [tiny
`liblwgeom`, including `st_geohash()`,
`st_minimum_bounding_circle()`, `st_split()`, `st_subdivide()`,
`st_transform_proj()` (transform through proj, omitting
GDAL) and `st_as_sfc.TWKB()` (creates `sfc` from [tiny
wkb](https://github.com/TWKB/Specification/blob/master/twkb.md)),
as well as the geodetic (spherical/ellipsoidal) geometry
functions `st_geod_area`,
`st_geod_length`,
`st_geod_distance`,
`st_geod_covers`,
`st_geod_azimuth`,
and `st_geod_segmentize`. The previously offered `st_make_valid`
is now a generic in package `sf`.
functions `st_geod_area()`,
`st_geod_length()`,
`st_geod_distance()`,
`st_geod_covers()`,
`st_geod_azimuth()`,
and `st_geod_segmentize()`. The previously offered `st_make_valid()`
is now a generic in package `sf` (`sf::st_make_valid()`).

## Installing

Expand Down

0 comments on commit 036ed7f

Please sign in to comment.