surveyPoints | R Documentation |
This function uses stratified random sampling to generate georeferenced locations for monitoring soil conditions
surveyPoints(soilmap,scorpan,conditionclass,mapproportion)
soilmap |
input classified map of soil condition |
scorpan |
number of scorpan factors that generated teh soil condition map. The range is 1-5 |
conditionclass |
reference class in the soil condition map to be monitored. The class code should be in the map |
mapproportion |
Proportion in percent of the reference class in the soil condition map to be monitored. |
The number of scorpan factors can be assumed but need to be with respect to the soil forming factors.The maximum possible number of factors is 5 irrespective of number of layers in each factor while the minimum number is 1.The soil condition class is the class code in the map which is to be targeted
A spatial points dataframe with projection similar to the soil condition map projection
Christian Thine Omuto
featureRep, imageIndices, pedoTransfer, classCode
library(sp)
library(raster)
ec=suitabinput["ec"]
ph=suitabinput["ph"]
soc=nutrindicator["soc"]
clay=textureinput["clay"]
texture=suitabinput["texture"]
newmap=ec
newmap$ph=ph$ph
newmap$ECe=ECconversion1(ec$ec*0.1,texture$texture,"FAO","1:5", soc$soc,clay$clay)
newmap$salt=saltSeverity(newmap$ECe,newmap$ph,0.84,"FAO")
newmap$salineclass=classCode(newmap$salt,"saltseverity")
newmap$salineclass1=as.factor(newmap$salineclass)
spplot(newmap["salineclass"], main="Salinity Code")
summary(newmap$salt)
summary(newmap$salineclass)
salt=raster(newmap["salt"])
salt1=newmap["salt"]
n_points=surveyPoints(salt1,4,11,80)
length(n_points$new)
spplot(salt1, scales=list(draw=TRUE),sp.layout=list("sp.points",n_points,pch=8,col="cyan"))
spplot(salt, scales=list(draw=TRUE),sp.layout=list("sp.points",n_points,pch=8,col="cyan"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.