svc: Create a SpatVectorCollection

svcR Documentation

Create a SpatVectorCollection

Description

Methods to create a SpatVectorCollection. This is an object to hold "sub-datasets", each a SpatVector, perhaps of different geometry type.

Usage

## S4 method for signature 'missing'
svc(x) 

## S4 method for signature 'SpatVector'
svc(x, ...) 

## S4 method for signature 'list'
svc(x) 

## S4 method for signature 'character'
svc(x, layer="", query="", extent=NULL, filter=NULL)

Arguments

x

SpatVector, character (filename), list with SpatVectors, or missing

...

Additional SpatVectors

layer

character. layer name to select a layer from a file (database) with multiple layers

query

character. A query to subset the dataset in the OGR-SQL dialect

extent

Spat* object. The extent of the object is used as a spatial filter to select the geometries to read. Ignored if filter is not NULL

filter

SpatVector. Used as a spatial filter to select geometries to read (the convex hull is used for lines or points). It is guaranteed that all features that overlap with the extent of filter will be returned. It can happen that additional geometries are returned

Value

SpatVectorCollection

Examples

f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
x <- svc()
x <- svc(v, v[1:3,], as.lines(v[3:5,]), as.points(v))
length(x)
x

# extract
x[3]

# replace
x[2] <- as.lines(v[1,])



rspatial/terra documentation built on Nov. 5, 2024, 5:13 p.m.