as.inla.mesh.segment {INLA}R Documentation

Convert sp curve objects to inla.mesh.segment objects.

Description

Convert sp curve objects to inla.mesh.segment objects.

Usage

as.inla.mesh.segment(sp, ...)

inla.sp2segment(sp, ...)

## S3 method for class 'SpatialPoints'
as.inla.mesh.segment(sp, reverse = FALSE, grp = NULL, is.bnd = TRUE, ...)

## S3 method for class 'SpatialPointsDataFrame'
as.inla.mesh.segment(sp, ...)

## S3 method for class 'Line'
as.inla.mesh.segment(sp, reverse = FALSE, crs = NULL, ...)

## S3 method for class 'Lines'
as.inla.mesh.segment(sp, join = TRUE, crs = NULL, ...)

## S3 method for class 'SpatialLines'
as.inla.mesh.segment(sp, join = TRUE, grp = NULL, ...)

## S3 method for class 'SpatialLinesDataFrame'
as.inla.mesh.segment(sp, ...)

## S3 method for class 'SpatialPolygons'
as.inla.mesh.segment(sp, join = TRUE, grp = NULL, ...)

## S3 method for class 'SpatialPolygonsDataFrame'
as.inla.mesh.segment(sp, ...)

## S3 method for class 'Polygons'
as.inla.mesh.segment(sp, join = TRUE, crs = NULL, ...)

## S3 method for class 'Polygon'
as.inla.mesh.segment(sp, crs = NULL, ...)

Arguments

sp

An sp polygon object of class Polygon, Polygons, SpatialPolygons, or SpatialPolygonsDataFrame.

...

Additional arguments passed on to other methods.

reverse

Logical, indicating if the line sequence should be traversed backwards.

grp

Group ID specification for each polygon, as used by inla.mesh.segment(), one ID per polygon.

crs

An optional CRS or inla.CRS object

join

If TRUE, join multiple polygons into a single segment (possibly non-simply connected).

Value

A inla.mesh.segment() object, or a list of inla.mesh.segment() objects.

Author(s)

Finn Lindgren finn.lindgren@gmail.com

See Also

inla.mesh.segment()


[Package INLA version 21.11.22 Index]