surveyPoints: A function to generate georeferenced locations for monitoring...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/surveyPoints.R

Description

This function uses stratified random sampling to generate georeferenced locations for monitoring soil conditions

Usage

1
surveyPoints(soilmap,scorpan,conditionclass,mapproportion)

Arguments

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.

Details

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

Value

A spatial points dataframe with projection similar to the soil condition map projection

Author(s)

Christian Thine Omuto

See Also

featureRep, imageIndices, pedoTransfer, classCode

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(sp)
library(rgdal)
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,soc$soc,clay$clay,texture$texture,"1:5", "FAO")
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"))

soilassessment documentation built on Aug. 31, 2020, 1:06 a.m.