I'm trying to create a way users can select features from our WFS that's running on ArcGIS Server and have it convert them in KMZ or shapefile. We will be using WebApp builder. I'm pretty comfortable with creating a widget or publishing a geoprocessing tool. I'm good with Python and JavaScript. I'm just wondering what is the best approach. I looked into FME Server, but that costs a lot of money. I'm wondering if there is a way to do it with GDAL - org2org. The way we do it now, is the user has to select the features with the select tool in Web AppBuilder. Export it as a GeoJSON and then ship it off to a 3rd party called https://geoconverter.hsr.ch/ . We really do not want to be sending our data there.

Any ideas on how I can do this?

I also tried the clip and ship method Esri has recommend but still it will not convert to KMZ unless you have the iterability extension. https://enterprise.arcgis.com/en/server/10.3/publish-services/linux/gp-service-example-clip-and-ship.htm

  • You should be able to do it all in WebApp builder. Create a geoprocessing tool to generated the KMZ or SHP and "share" it as a geoprocessing service on your ArcGIS Server. Then use the Geoprocessing widget in WebApp builder to run the geoprocessing service, which will result in a link that can be used to download the resulting file(s). Sep 25 '20 at 3:37
  • @SonofaBeach . I tried that but I couldn't get that to work. So your saying I should keep looking into this method. I think I might look more into this then.
    – Lukas
    Sep 25 '20 at 3:43
  • I have done something very similar. The only tricky bit I'm unsure of is how to send the selected records to the geoprocessing service. In my case, my geoprocessing service had a few parameters that the user could configure which defined which feature should be included, so manually selecting features was not something that I looked into. Sep 25 '20 at 4:53
  • PS. This should be possible, though. See: support.esri.com/en/technical-article/000014552 . And also: doc.arcgis.com/en/web-appbuilder/create-apps/widget-select.htm Sep 25 '20 at 4:58
  1. Create a tool that does what you require in ArcMap or ArcGIS Pro. You can create the tool either with Model Builder or using a Python script. The tool should have an OUTPUT PARAMETER for the location of the output file generated.
  2. Test it to make sure that it generates the file that you require in ArcMap or ArcGIS Pro.
  3. After a successful run of the tool, publish it as a geoprocessing service.
  4. Test the geoprocessing service in ArcMap or ArcGIS Pro to make sure it works as expected.
  5. In WebApp builder app, add a Geoprocessing widget and configure it to call your geoprocessing service.
  6. Test the geoprocessing widget to make sure it works with all features of the input feature class.
  7. In WebApp builder app, add a Select widget and configure it to send to a Geoprocessing widget.


After the geoprocessing tool has completed, it will display a link that can be clicked to download the file that was specified for the output parameter.

I have done something very similar, but have not used selected input (instead, my tool had some other input parameters which defined which features to include). But according to the documentation linked above, this should work.

Note that when publishing the geoprocessing service (which is done from the result of a successful run of the tool), it is best to hard-code the value for the output parameter, and not let the user enter this for the geoprocessing service. You should make sure all other input parameters are blank to avoid unwanted default parameters. I only mention this because when you publish a geoprocessing service, it requires a successful run of a tool, and this usually requires all input parameters to be specified, and these will end up being defaults for the geoprocessing service, if you're not careful.

  • interesting! This was a similar work flow that I was approaching. I will try this work flow. What does the OUTPUT PARAMETER look like in python.
    – Lukas
    Sep 25 '20 at 13:49
  • In the Python script it should be, arcpy.SetParameterAsText(0, AbsoluteFilePath) - change 0 to whatever number your output parameter is in the script tool. In the script tool, make sure that parameter is a file and that it is configured as Output and not Input. Sep 25 '20 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.