as.shp {fastshp}R Documentation

Coerce objects to shapefiles

Description

as.shp coerces lists of polygons to adhere to the shp representation.

Usage

as.shp(x)

Arguments

x

object to coerce

Details

Objects of the class "shp" are lists of shapes. Each shape comprises of polygons and has an identifier and a bounding box.

The as.shp method coerces various representations of shape sets into "shp" objects.

Currently the only supported representation to convert from is a list of "x", "y" pairs, e.g.: list(list(x=..., y=...), list(x=..., y=...), ...) where each element of the list defines a shape. The shapes will be assigned sequential identifiers starting at 1.

Value

Object of the class "shp".

Author(s)

Simon Urbanek


[Package fastshp version 0.1-0 Index]