Arcpy.jl is a Julia wrapper around ESRI's arcpy python package.
Please note that you need an ArcGIS license for this package to work.
This wrapper allows users of Circuitscape.jl to interface
with arcpy while staying within the Julia environment and taking advantage of its parallel computing abilities.
- Make sure you have ArcGIS installed on your system. Note that it works only on Windows.
- Open Julia. Run:
Pkg.clone("https://github.com/ranjanan/Arcpy.jl")- Now we need Julia to point to the python executable shipped with your copy of ArcGIS. To do that, do:
ENV["PYTHON"] = "/path/to/arcgis/python"
Pkg.build("Arcpy")If all goes well, you should see a message from Julia that PyCall is now linked to your ArcGIS's python, and
using Arcpyshould just work.
If you have arcpy python code that looks like:
import arcpy # loads python package
arcpy.some_arcpy_function(args...) the corresponding Julia code should look like:
using Arcpy
Arcpy.some_arcpy_function(args...)with a small number of excpetions, such as
arcpy.env.workspace = "some/workspace"should be written as
Arcpy.setenv(:workspace, "some/workspace")Since arcpy has hundreds of functions, it is possible that not everything is wrapped. If you would like a particular wrapped, please open an issue.