Learn R Programming

geozoning (version 1.0.0)

contourBetween: contourBetween

Description

contourBetween

Usage

contourBetween(map, krigGrid, q1, q2, nbContourBetween = 5)

Arguments

map

: object map defined in package geozoning

krigGrid

: object that can

q1, q2

: 2 quantiles that defined zone

nbContourBetween

: the number of discretisation between q1 and q2

Value

listContours : List of Spatial Lines and the value of quantile that represent the contours generated

Details

: For the given krigGrid, this funtion returns the contourLines of the map following the 2 quantiles that defined at the beginning.

Examples

Run this code
# NOT RUN {
 map=geozoning::mapTest
 ZK=initialZoning(qProb=c(0.55,0.85),map)
 Z=ZK$resZ$zonePolygone # list of zones
 lab = ZK$resZ$lab # label of zones
 plotM(map = map,Z = Z,lab = lab, byLab = FALSE)
 numZ = 7
 Estimation = Transition_Zone_Near_Boundary(map = map, Z = Z, numZ = numZ)
 result = new_krigGrid_for_visualisation(map = map, Z = Z, numZ = numZ, solution = Estimation)
 new_krigGrid = result$new_krigGrid
 new_data = result$new_data
 quant1 = quantile(map$krigData@data$var1.pred,probs = 0.55)
 quant2 = quantile(map$krigData@data$var1.pred,probs = 0.85)
 # plot modified isocontours
 plotM(map = map,Z = Z,lab = lab, byLab = TRUE)
 listContours = contourBetween(map = map, krigGrid = new_krigGrid, q1 = quant1, q2 = quant2)
 for (i in 1:length(listContours)){
    sp::plot(listContours[[i]]$contour,add=TRUE,col = "red")
 }
# }

Run the code above in your browser using DataLab