Provide access to (virtually any) ArcGIS geoprocessing tool from within R by running Python geoprocessing without writing Python code or touching ArcGIS.
The package utilizes the ArcPy Python site-package or the ArcGIS API
in order to access ArcGIS functionality. The function
rpygeo_build_env can be applied to generate an ArcPy or arcgis
Maintainer: Alexander Brenning [email protected]
Jannes Muenchow (0000-0001-7834-4717) [contributor]
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# load the ArcPy module related to ArcGIS Pro (and save it as a R # object called "arcpy_m") in R and also set the overwrite parameter # to FALSE and add some extensions. Note that we do not have to set the path # because the Python version is located in the default location # (C:/Program Files/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/)in this example. ## Not run: arcpy <- rpygeo_build_env(overwrite = TRUE, extensions = c("3d", "Spatial", "na"), pro = TRUE) ## End(Not run) # Suppose we want to calculate the slope of a Digtial Elevation Model. # It is possible to get the description of any ArcPy function as a R list: ## Not run: py_function_docs("arcpy$Slope_3d") # Now we can run our computation: ## Not run: arcpy$Slope_3d(arcpy$Slope_3d(in_raster = "dem.tif", out_raster = "slope.tif")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.