How can I implement a select Features by Location with the ArcGIS Python API?
I would like to select all features from a Point layer in a feature service that are within 0.5 meters from a feature in a Polyline layer in the same feature service. Both layers have the same spatial reference
Total number of point features is 35, total number of line features is 1
returns 35 features
I've tried this:
# Create a Polyline first, because directly feeding cl_line.query(where='1=1').features.geometry into the spatial query on the points doesn't seem to work as a geometry_filter
from arcgis.geometry import Polyline
cl = Polyline(cl_line.query(where='1=1').features.geometry)
point_feature_layer.query(where='1=1',geometry_filter=cl, distance=0.5, units='esriSRUnit_Meter')
also returns 35 features, so the geometry_filter doesn't seem to work
Any ideas what I'm doing wrong here?