Learn R Programming

geozoning (version 1.0.0)

spnorm: spnorm

Description

spnorm

Usage

spnorm(sp, boundary)

Arguments

sp

object of class Polygons

boundary

list with x and y components, used to normalize sp

Value

a list with components

pn

normalized Polygon

boundaryn

normalized boundary

Details

normalize Polygon according to border limits

Examples

Run this code
# NOT RUN {
#  shape1: result of call to readS on shapefile
z=geozoning::shape1
bb=list(x=z@bbox[1,],y=z@bbox[2,])
p=z@polygons
p1=p[[1]]
P1=p1@Polygons[[1]]
NP1=geozoning:::spnorm(P1,bb)$pn
Nbb=geozoning:::spnorm(P1,bb)$boundaryn
plot(NP1@coords,xlim=Nbb$x,ylim=Nbb$y)
# }

Run the code above in your browser using DataLab