Learn R Programming

geozoning (version 1.0.0)

checkContour: checkContour

Description

checkContour

Usage

checkContour(contourSp, step, refPoint, minSizeNG = 0.001)

Arguments

contourSp

SpatialPolygons corresponding to closed contour line

step

grid resolution

refPoint

referene point

minSizeNG

zone area threshold under which a zone is not admissible

Value

Null if contour is not admissible or a list with components

contourSp

SpatialPolygons corresponding to admissible contour

polyBuff

SpatialPolygons corresponding to gBuffer around admissible contour

Details

check admissibility for contour line: surface >minSizeNG and refPoint close enough

Examples

Run this code
# NOT RUN {
data(mapTest)
cL=contourAuto(list(),mapTest$step,mapTest$xsize,mapTest$ysize,
   mapTest$krigGrid,c(5,7),mapTest$boundary)
pG=polyToSp2(sp::Polygon(mapTest$boundary)) #SpatialPolygons corresponding to map boundary
rgeos::plot(pG)
sp8 = contourToSpp(cL[[8]],0.1)$sp
refPoint = rgeos::gCentroid(sp8)
resp=checkContour(sp8,mapTest$step,refPoint)
rgeos::plot(resp$contourSp,col="red",add=TRUE)
# }

Run the code above in your browser using DataLab