Learn R Programming

fsr (version 2.0.1)

create_empty_pgeometry: Create an empty pgeometry object

Description

create_empty_pgeometry() builds an empty pgeometry object of a specific type.

Usage

create_empty_pgeometry(type)

Value

An empty pgeometry object.

Arguments

type

A character value indicating the spatial plateau data type of the pgeometry object. It can be either "PLATEAUPOINT", "PLATEAULINE", "PLATEAUREGION", "PLATEAUCOMPOSITION" or "PLATEAUCOLLECTION".

Details

The create_empty_pgeometry() function creates a new pgeometry object with no components. To add new components to this object, you should use spa_add_component(). The components added to this object must be compatible with the type of the empty pgeometry object.

Examples

Run this code
# Creating an empty plateau point object
empty_plateau_point <- create_empty_pgeometry("PLATEAUPOINT")
empty_plateau_point

# Creating an empty plateau line object
empty_plateau_line <- create_empty_pgeometry("PLATEAULINE")
empty_plateau_line

# Creating an empty plateau region object
empty_plateau_region <- create_empty_pgeometry("PLATEAUREGION")
empty_plateau_region

# Creating an empty plateau composition object
empty_plateau_composition <- create_empty_pgeometry("PLATEAUCOMPOSITION")
empty_plateau_composition

# Creating an empty plateau collection object
empty_plateau_collection <- create_empty_pgeometry("PLATEAUCOLLECTION")
empty_plateau_collection

Run the code above in your browser using DataLab