Learn R Programming

geozoning (version 1.0.0)

interCB: interCB

Description

interCB

Usage

interCB(co, step, bd = list(x = c(0, 0, 1, 1, 0), y = c(0, 1, 1, 0, 0)),
  envel, disp = 0)

Arguments

co

contour line

step

map grid resolution

bd

map boundary

envel

envelope

disp

info level (0-no info, 1- add lines to plot)

Value

a SpatialPolygons

Details

generates SpatialPolygons object corresponding to intersection of contour with boundary, must be within SpatialPolygons given in envel argument

Examples

Run this code
# NOT RUN {
data(mapTest)
pG=polyToSp2(sp::Polygon(mapTest$boundary)) #SpatialPolygons corresponding to map boundary
cL=contourAuto(list(),mapTest$step,mapTest$xsize,mapTest$ysize,
   mapTest$krigGrid,c(5,7),mapTest$boundary)
ps = geozoning:::interCB(cL[[8]],mapTest$step,mapTest$boundary,pG)#envelope is the whole map
sp::plot(pG)
sp::plot(ps,col="red",add=TRUE)
# }

Run the code above in your browser using DataLab