scaleSquareShape: Scales square shapefile

Description Usage Arguments Value Note Author(s) Examples

View source: R/shape.R

Description

Scales input square to desired area. Units must be the same. Suggest using scaleShape instead.

Usage

1
scaleSquareShape(inShape, newArea)

Arguments

inShape

A square shapefile

newArea

A number for the desired area

Value

A scaled square shapefile with specified area and projection of inShape

Note

Edited by CDMartinez 14 Dec 15

Author(s)

Created by CDMartinez 03 Dec 15

Examples

1
2
3
4
5
6
library(sp)
points <- rbind(c(250,250),c(250,1750),c(1750,1750),c(1750,250),c(250,250))
shape <- SpatialPolygons(list(Polygons(list(Polygon(points)), 'auOutline')))
shape2 <- scaleSquareShape(inShape = shape,newArea = 1500000)
plot(shape, axes = TRUE)
plot(shape2, add = TRUE, border = 'red')

madorning/energySimMD documentation built on May 22, 2019, 2:40 p.m.