Today I read a GIS SE user opinion in Using Geometry.distance_to() in ArcGIS API for Python that:
it appears that ArcGIS API for Python uses ArcPy internally
This surprised me because I do not think that this is the case.
Does the ArcGIS API for Python use ArcPy internally or are they two independent Python libraries that nevertheless may call some common underlying libraries?
1 Answer 1
Yes the ArcGIS API for Python can use the arcpy
package if it is available in the current environment. arcpy
is not required, but enables some additional functionality if available.
For example:
- the
arcgis.features.from_featureclass
function accepts optional parameters ifarcpy
is installed; - the
arcgis.features.from_table
function requiresarcpy
; and - some geometry and spatial reference object methods require
arcpy
.
The distance_to
method referred to in the question you linked to requires either arcpy
or shapely
.