ZonalPipe: Create a zonal file if it does not exist and calculate the...

Description Usage Arguments Value

Description

Create a zonal file if it does not exist and calculate the zonal stats by calling the myZonal function. Modified from http://www.guru-gis.net/efficient-zonal-statistics-using-r-and-gdal/

Usage

1
2
3
4
ZonalPipe(ctryCode, admLevel, ctryPoly, nlType, configName, path.in.shp,
  path.in.r, path.out.r, path.out.shp, zone.attribute, nlStats,
  gadmVersion = pkgOptions("gadmVersion"),
  gadmPolyType = pkgOptions("gadmPolyType"), custPolyPath = NULL)

Arguments

ctryCode

the ctryCode of interest

admLevel

The country admin level of interest

ctryPoly

the SpatialPolygonsDataFrame country polygon to process

nlType

character The nlType of interest

configName

character the type of raster being processed

path.in.shp

The path to the country shapefile

path.in.r

The path to the raster tile

path.out.r

The path where to save the output zonal raster

path.out.shp

The path to save the output zonal shapefile (Ignored)

zone.attribute

The zonal attribute to calculate

nlStats

The stats to calculate

gadmVersion

The GADM version to use

gadmPolyType

The format of polygons to download from GADM

custPolyPath

Alternative to GADM. A path to a custom shapefile zip

Value

TRUE/FALSE


Rnightlights documentation built on Aug. 29, 2019, 5:02 p.m.