Learn R Programming

geozoning (version 1.0.0)

extensionLine: extensionLine

Description

extensionLine

Usage

extensionLine(contourL = NULL, step = NULL, bdSP, superLines)

Arguments

contourL

contour line

step

grid step as returned by calStep

bdSP

list, contains x and y coordinates of map boundaries

superLines

object returned by superLines(bdSP)

Value

a list

Details

closes contour lines by extending them to their interesection with the map border

Examples

Run this code
# NOT RUN {
data(mapTest)
step=mapTest$step
xsize=mapTest$xsize
ysize=mapTest$ysize
cL=contourLines(seq(step, xsize-step, by=step),seq(step, ysize-step, by=step),
               mapTest$krigGrid, levels = c(5,7))
plot(mapTest$boundary,type="l",col="red")
lines(cL[[1]])#contour line is not closed
lines(geozoning:::extensionLine(cL[[1]],step,sp::SpatialPoints(mapTest$boundary),
     geozoning:::superLines(mapTest$boundary)),col="red") #contour line is closed
# }

Run the code above in your browser using DataLab