as.spacejamr: Initialize a new spacejamr object

View source: R/spacejamr.R

as.spacejamrR Documentation

Initialize a new spacejamr object

Description

Creates a new spacejamr object that for further analysis

Usage

as.spacejamr(path, guess_crs = TRUE)

Arguments

path

the path to a shapefile as a string.

guess_crs

whether to try to guess the coordinate reference system of the supplied shapefile

Details

The returned spacejamr object will contain a window object containing a geographical boundary and its coordinate reference system. Since any simulated point process will be simulated in two dimensions, the coordinate reference system of the supplied shapefile should be a projected coordinate reference system or 'guess_crs' should be set to TRUE. In that case, the coordinate reference system will be set to the most appropriate coordinate reference system for the shapefile. Note that guessing the coordinate reference system will take longer than if one is already set.

Value

a spacejamr object containing two items. window: object of class 'owin' that stores geographical boundaries. crs: integer value referring to the coordinate reference system of the geographical boundaries.

Author(s)

Darren Colby
Email: dscolby@gmail.com

Examples


ri <- as.spacejamr(system.file("shape/ri.shp", package = "spacejamr"))



spacejamr documentation built on April 2, 2022, 1:07 a.m.