I am familiarizing myself with the arcgis API for Python, and I would like to view the query I perform on a feature layer as a URL:
from arcgis.features import FeatureLayer
from arcgis.geometry import filters
# get the data from Boulder, CO and the UDFCD endpoints
city_lims = FeatureLayer("https://maps.bouldercolorado.gov/arcgis/rest/services/plan/CityLimits/MapServer/0")
udfcd = FeatureLayer("https://data.digitaldataservices.com/arcgis/rest/services/UrbanDrainage/UDFCDDataRoutineMaintenance/MapServer/0")
# create the spatial filter test
geom_test = filters.intersects(city_lims.properties.extent)
# perform the query, output to local state plane
cob_udfcd = udfcd.query(out_sr=2876,
geometry_filter=geom_test)
cob_udfcd # <-- returns a <FeatureSet>, I want a URL
The documentation mentions additional kwargs that I could enter, and I have a feeling herein lies my answer, but the problem is I have no idea what I would need to enter in order to spit out a URL, and the documentation doesn't offer up much more on kwargs:
Optional dict. Optional parameters that can be passed to the Query function. This will allow users to pass additional parameters not explicitly implemented on the function. A complete list of functions available is documented on the Query REST API.
How do I tell the ArcGIS API to return a URL which represents a query performed on a feature layer?
requests.