area2asc: Converts a Polygon to Raster

Description Usage Arguments Details Value Author(s) See Also Examples

Description

area2asc converts a polygon map to a raster map of class asc. It is an alias for mcp.rast.

Usage

1
  area2asc(poly, w, border=c("include", "exclude"))

Arguments

poly

a data frame with 2 columns giving the coordinates of a polygon object

w

an object of class kasc, or of class asc

border

a character string indicating what happens when the center of the pixel is located exactly on the limit of the polygon ("include" indicates that the pixel is considered to be inside the polygon).

Details

The raster map is needed to pass the format for the output raster object to the function.

Value

Returns an object of class asc.

Author(s)

Clement Calenge clement.calenge@oncfs.gouv.fr

See Also

hr.rast

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(puechabon)
toto <- puechabon$kasc
loc <- puechabon$locs

## gets the coordinates of the relocations for the wild boar #1
wb1 <- loc[loc$Name == "Chou",]
wb1 <- cbind(wb1$X, wb1$Y)
nbpol <- chull(wb1)
xycoord <- wb1[nbpol,]

## rasterization of wb1
tutu <- area2asc(xycoord, toto)
image(tutu)

polygon(xycoord, lwd = 2)

Example output

Loading required package: ade4
Loading required package: tkrplot
Loading required package: tcltk
Loading required package: shapefiles
Loading required package: foreign

Attaching package: 'shapefiles'

The following objects are masked from 'package:foreign':

    read.dbf, write.dbf

Loading required package: sp

************************************************
************************************************
THE PACKAGE adehabitat IS NOW DEPRECATED!!!!!!!
 It is dangerous to use it, as bugs will no longer be corrected.
It is now recommended to use the packages adehabitatMA, adehabitatLT, adehabitatHR, and adehabitatHS.
These 4 packages are the future of adehabitat.
 They have a vignette explaining in detail how they can be used.
They implement more methods than adehabitat
They are based on the more common and more clever spatial classes implemented in sp.
Bugs are corrected frequently.
Really, avoid to use the classical adehabitat, unless you have a very good reason for it.

*****THIS IS THE VERY LAST WARNING*****
 This is the last version of adehabitat submitted to CRAN (at the time of writing: 2015-03-27).
 THE NEXT VERSION OF adehabitat WILL JUST BE A VIRTUAL PACKAGE LOADING ALL THE PACKAGES DESCRIBED ABOVE.

Warning messages:
1: no DISPLAY variable so Tk is not available 
2: loading Rplot failed 

adehabitat documentation built on Jan. 28, 2018, 5:02 p.m.