Hi,
I actually want to create a Geoprocessing Service published from a Python Toolbox and ArcGIS Pro 2.8.3.
From a third party service I get geojson in my server-side process which I can transform into esri json or Features / FeatureLayer. But from there, how do I provide these features as output of my geoprocessing service? What kind of output data format do I have to use?
Docu says the server only supports a few data formats like GPFeatureRecordSetLayer which expects a special json input. But how can I automatically get such a json from my features?
search_results = arcpy.Parameter(
displayName="Search Results",
name="search_results",
datatype="GPFeatureRecordSetLayer",
parameterType="Derived",
direction="Output")
Esri Json doesn't seem to work.
esri_search_data = r"{0}\search_data.json".format(arcpy.env.scratchFolder)
arcpy.FeaturesToJSON_conversion(search_data_path, esri_search_data)
esri_data = self.read_textfile(esri_search_data)
parameters[1].value = esri_data
As a result the client should create a feature layer.
My geoprocessing service should be used mainly by ArcGIS Pro clients. Optionally it would be great if the output could be used by esri web clients as well like Esri JS API.
Does anybody know how this can be achieved?