Learn R Programming

RPyGeo (version 0.9-3)

rpygeo.build.env: RPyGeo Geoprocessing Environments

Description

Set up a geoprocessing environment for ArcGIS/Python scripting

Usage

rpygeo.build.env(modules = "arcgisscripting", init = "gp = arcgisscripting.create()", workspace = NULL, cellsize = NULL, extent = NULL, mask = NULL, snapraster = NULL, overwriteoutput = 0, extensions = NULL, python.path = "C:\\software\\Python24", python.command = "python.exe") rpygeo.env

Arguments

modules
(Do not modify!) Name of Python module for ArcGIS geoprocessing.
init
(Do not modify!) Python code for initializing the Python geoprocessor.
workspace
Path of ArcGIS workspace (or name of geodatabase) in which to perform the geoprocessing.
cellsize
Default cellsize (default: maximum(?) of inputs - see ArcGIS documentation).
extent, mask, snapraster
Optional datasets or character strings defining the analysis extent and mask and what to snap to - see ArcGIS documentation.
overwriteoutput
Overwrite existing ArcGIS datasets (=1) or not (=0 - default)?
extensions
Names of extensions to be used in geoprocessing; it is usually not necessary to specify this here. Possible values: "Spatial","3d","geostats","network", "datainteroperability".
python.path
Where to find the Python interpreter (depends on Python version).
python.command
Name of the Python command line interpreter executable.

Value

the rpygeo.build.env function.

Details

See ArcGIS documentation. This geoprocessing environment reflects only a small fraction of the ArcGIS environment settings. Future releases of this package may include more than the properties listed above.

See Also

rpygeo.geoprocessor

Examples

Run this code
# Everything in this workspace will be masked with DEM extent
# and have a cellsize of 100m:
## Not run: env.lo <- rpygeo.build.env( mask="clip", cellsize=100 )
# and this is for high-resolution output:
## Not run: env.hi <- rpygeo.build.env( mask="clip", cellsize=1 )

# Slope from different DEMs at different target resolutions
# (which may be different from the original DEM resolution):
## Not run: rpygeo.Slope.sa("srtm-dem","slope-lo",env=env.lo)
## Not run: rpygeo.Slope.sa("laser-dem","slope-hi",env=env.hi)

Run the code above in your browser using DataLab