ArcGIS Geoprocessing Tools {RPyGeo}R Documentation

Wrappers for selected ArcGIS functions

Description

Wrappers for a small selection of ArcGIS geoprocessing functions based on the rpygeo.geoprocessor.

Usage

rpygeo.EucDistance.sa(in.data, out.raster, maxdist = NULL, 
    cellsize = NULL, out.direction.raster = NULL, 
    env = rpygeo.env, ...)
rpygeo.Hillshade.sa(in.raster, out.raster, azimuth = 315, 
    altitude = 45, model.shadows = c("NO_SHADOWS", "SHADOWS"), 
    z.factor = 1, ...)
rpygeo.Slope.sa(in.raster, out.raster, 
    unit = c("DEGREE", "PERCENT_RISE"), z.factor = 1, ...)
rpygeo.Aspect.sa(in.raster, out.raster, ...)
rpygeo.Delete.management(in.data, data.type = NULL, ...)

Arguments

in.raster, in.data, out.raster Names of ArcGIS raster or vector datasets or feature classes in a geodatabase (relative to the current workspace defined in a rpygeo.env environment). Shapefiles must include the extension “.shp”.
env A list defining an RPyGeo working environment as built by rpygeo.build.env.
maxdist, cellsize, out.direction.raster,
azimuth, altitude, model.shadows, z.factor,
unit, data.type Arguments to be passed to the Python geoprocessing function. See ArcGIS help files for information on the usage of scripting commands and their arguments.
... Additional arguments to be passed to rpygeo.geoprocessor.

Details

These functions simply try to replicate the behaviour of the ArcGIS/Python geoprocessing functions of the same name. See rpygeo.geoprocessor for details on what happens behind the scenes.

Value

The function return NULL if no error occurred, otherwise a character vector containing the error message.

Author(s)

Alexander Brenning

See Also

rpygeo.geoprocessor, rpygeo.build.env

Examples

# Allow ArcGIS to overwrite existing datasets:
## Not run: rpygeo.env$overwriteoutput = 1
# Calculate the slope of a DEM raster dataset
# in the current ArcGIS workspace:
## Not run: rpygeo.geoprocessor("Slope_sa",c("dem","slope"))
# Same:
## Not run: rpygeo.geoprocessor("Slope_sa('dem','slope')")
# Same, using the more convenient wrapper:
## Not run: rpygeo.Slope.sa("dem","slope")

# Three at a time or separately:
## Not run: date()
## Not run: 
rpygeo.geoprocessor("Slope_sa('dem','slope')",
  "Aspect_sa('dem','aspect')", "Hillshade_sa('dem','hshd')")
## End(Not run)
## Not run: date() # ~20 sec on my computer
## Not run: rpygeo.Slope.sa("dem","slope")
## Not run: rpygeo.Aspect.sa("dem","aspect")
## Not run: rpygeo.Hillshade.sa("dem","hshd")
## Not run: date() # ~50 sec
## Not run: rpygeo.Delete.management("slope")
## Not run: rpygeo.Delete.management("aspect")
## Not run: rpygeo.Delete.management("hshd")

# Calculate the Euclidian distance from railway lines
# up to a max. distance of 1000 map units:
## Not run: 
rpygeo.geoprocessor("EucDistance_sa",
    args=list("rail.shp","raildist",1000))
## End(Not run)
# Same:
## Not run: rpygeo.EucDistance.sa("rail.shp","raildist",maxdist=1000)

# Use MapAlgebra to calculate a distance-decay function:
## Not run: 
rpygeo.geoprocessor("SingleOutputMapAlgebra_sa",
    args=c("exp( raildist / -100 )","distdecay"))
## End(Not run)

# Or why not in just one step if you like MapAlgebra:
## Not run: 
rpygeo.geoprocessor( "SingleOutputMapAlgebra_sa",
    args=c("exp( EucDistance( rail.shp, \#, \#, 1000 ) / -100 )","distdecay") )
## End(Not run)

[Package RPyGeo version 0.9-0 Index]