knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

pgfeatureserv

Lifecycle: experimental R-CMD-check Codecov test coverage License: MIT

pgfeatureserv is an R client for pg_featureserv, a RESTful web service that provides access to spatial data stored in PostGIS tables, as well as spatial processing capability based on PostGIS spatial functions.

For more information on pg_featureserv:
- User Guide
- API Summary
- Github Page

Work with collections

Get information about collections or a single collection:

Query features or a single feature from a collection:

Work with functions

Get information about functions or a single function:

Execute a spatial function and get result:

Installation

You can install the development version of pgfeatureserv from GitHub with:

# install.packages("devtools")
devtools::install_github("poissonconsulting/pgfeatureserv")

Demonstration

Lookup available collections in BC Freshwater Atlas:

base_url <- "https://features.hillcrestgeo.ca/"
path <- "fwa"
collections <- pgfeatureserv::pgf_collections(base_url = base_url, path = path)
collections$id

Get Sangan River from the stream network collection:

coll <- "whse_basemapping.fwa_stream_networks_sp"
river <- pgfeatureserv::pgf_collection_features(coll, base_url = base_url, path = path,
                 filter = list(gnis_name = "Sangan River"))
class(river)
river[1:5, 1:4]

Code of Conduct

Please note that the pgfeatureserv project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



poissonconsulting/pgfsr documentation built on Nov. 4, 2024, 4:02 p.m.