ArcGIS Geoprocessing Tools {RPyGeo} | R Documentation |
Wrappers for a small selection of ArcGIS geoprocessing
functions based on the rpygeo.geoprocessor
.
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.Curvature.sa(in.raster, out.curvature.raster, z.factor = 1, out.profile.curve.raster = NULL, out.plan.curve.raster = NULL, ...) rpygeo.Delete.management(in.data, data.type = NULL, ...)
in.raster, in.data, out.raster, out.curvature.raster,
out.profile.curve.raster, out.plan.curve.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 . |
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.
ArcGIS 9.2 online help for the georpocessing tools can be accessed through the following URLs:
The function return NULL
if no error occurred, otherwise
a character vector containing the error message.
Alexander Brenning
rpygeo.geoprocessor
, rpygeo.build.env
# 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: rpygeo.geoprocessor("Slope_sa",c("dem","slope")) # Same: rpygeo.geoprocessor("Slope_sa('dem','slope')") # Same, using the more convenient wrapper: rpygeo.Slope.sa("dem","slope") ## End(Not run) # Three at a time or separately: ## Not run: date() rpygeo.geoprocessor("Slope_sa('dem','slope')", "Aspect_sa('dem','aspect')", "Hillshade_sa('dem','hshd')") date() # ~20 sec on my computer rpygeo.Slope.sa("dem","slope") rpygeo.Aspect.sa("dem","aspect") rpygeo.Hillshade.sa("dem","hshd") date() # ~50 sec rpygeo.Delete.management("slope") rpygeo.Delete.management("aspect") rpygeo.Delete.management("hshd") ## End(Not run) # 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)) # Same: rpygeo.EucDistance.sa("rail.shp","raildist",maxdist=1000) ## End(Not run) # 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)