Extract the layer names of Spatial Objects

Share:

Description

There are already methods for Raster* objects. This adds methods for SpatialPoints*, SpatialLines*, and SpatialPolygons*, returning an empty character vector of length 1. This function was created to give consistent, meaningful results for all classes of objects plotted by Plot.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
layerNames(object)

## S4 method for signature 'list'
layerNames(object)

## S4 method for signature 'ANY'
layerNames(object)

## S4 method for signature 'Raster'
layerNames(object)

## S4 method for signature '.spadesPlot'
layerNames(object)

## S4 method for signature 'igraph'
layerNames(object)

Arguments

object

A Raster*, SpatialPoints*, SpatialLines*, or SpatialPolygons* object; or list of these.

Author(s)

Eliot McIntire

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.