Skip to contents

Retrieves spatial cadastral parcel data from the Cadastre of Navarre WFS INSPIRE service. catrnav_wfs_get_parcels_bbox() retrieves features within the supplied bounding box. See Bounding box.

Usage

catrnav_wfs_get_parcels_bbox(x, srs = 4326, verbose = FALSE, count = NULL)

Arguments

x

See Bounding box. Can be one of:

  • A numeric vector of length 4 with the coordinates that define the bounding box: c(xmin, ymin, xmax, ymax).

  • A sf/sfc object, as provided by the sf package.

srs

CRS to use for the query. Defaults to 4326. See Bounding box.

verbose

Logical. If TRUE, displays informational messages.

count

Positive whole number specifying the maximum number of features to return. If NULL, the service default applies.

Value

An sf object, or NULL if the data cannot be retrieved.

API limits

The service returns a maximum of 5,000 features by default. Use count to request a smaller result.

Bounding box

When x is a numeric vector, make sure that srs matches the coordinate values. The function queries the bounding box in EPSG:25830, ETRS89 / UTM zone 30N, then transforms the result back to srs.

When x is an sf or sfc object, srs is ignored. The object's bounding box is used for the query and the result is transformed back to the input CRS. See sf::st_bbox().

Examples

downtown <- c(-1.646812, 42.814528, -1.638036, 42.820320)

cp <- catrnav_wfs_get_parcels_bbox(downtown, srs = 4326)

library(ggplot2)

ggplot(cp) +
  geom_sf()