Select to view content in your preferred language

Publishing Geoprocessing Service

486
2
06-22-2022 02:21 AM
OsamaOthman
Esri Contributor

Hello all,

I need to publish a geoprocessing service based on a python script that takes as a parameter an area of interest (AOI) as a GeoJSON polygon and returns some statistics.

I have two questions:

1. What is the suitable parameter type to use with the ArcGIS Pro tool for the (AOI) that when published will allow the send their polygon in GeoJSON? (Image 1 attached)

2. When I try to publish the service on a standalone table, I don't find the option to share a geoprocessing tool (Image 2 attached), how can I enable it? Is there any settings I need to check in the ArcGIS Server machine?

 

Thanks all

 

 

2 Replies
mattkramer
Occasional Contributor

Hello,

For the first question, I would use the "File" parameter, you would just need some additional validation to ensure that the file type is what you are looking for, either at the beginning of your script or in the validation settings of the tool.

When publishing a geoprocessing tool to the server, you first need to run the tool, you can then share it from the geoprocessing history, here is a link to a page that outlines this workflow: Quick tour of authoring and sharing web tools—ArcGIS Pro | Documentation

 

Hopefully this helps!

0 Kudos
OsamaOthman
Esri Contributor

Thanks @mattkramer  for your response,

I need the users to consume the service using REST API, so I prefer that the users will add the parameter as String in a GeoJSON format rather than a file, but I do not know if there's a parameter type for this or not.

For the second question, I have already run the tool but referring to the attached image (Image 02) there no option to share Geoprocessing tool to the server. I do not know to enable this option.

0 Kudos