Description Usage Arguments Examples
Function to test the use of rowcols and lonlats in getCtryNlData as input to the nlStats parameter.
The function gets the top numPts brightest pixels in a sub-polygon or zone and looks at increasing neighbouring distances looking for the distance to the first pixel that is 1/2 the value of the central pixel.
1 |
col |
character parameter to tell the package to pass in the colrow values i.e. column and row indices as per the country polygon |
row |
character parameter to tell the package to pass in the colrow values i.e. column and row indices of non-NA pixels as per the country polygon |
lon |
character parameter to tell the package to pass in the lonlat values i.e. column and row indices of non-NA pixels as per the country polygon |
lat |
character parameter to tell the package to pass in the lonlat values i.e. column and row indices of non-NA pixels as per the country polygon |
val |
character variable which will hold the raster values found in in the raster |
numPts |
integer The number of top pixels to detect |
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
pkgReset();
system.time(rastGFT92 <- getCtryNlData(ctryCode = "NGA",
admLevel = "lowest", nlTypes = "OLS.Y", nlPeriods = "1992",
removeGasFlares = F, ignoreMissing=FALSE, nlStats = list("myfun")))
pkgOptions(extractMethod="gdal",cropMaskMethod="gdal");
system.time(gdalGFT92 <- getCtryNlData(ctryCode = "NGA",
admLevel = "lowest", nlTypes = "OLS.Y", nlPeriods = "1992",
removeGasFlares = F, ignoreMissing=FALSE, nlStats="myfun"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.