hi
how to convert featureclass object to featureset object using python and how to convert featureset into featureclass.
please help me with some small code snippet.
Thanks to all for suggestions.
GP service always use data referenced in cities variable.
Do you want the GP service to always use the data referenced in the cities variable? Or, do you want to supply a different cities layer each run?
There is a sample script at the bottom of the page that Dan linked to. But the command is
<SPAN class="n">feature_set</SPAN><SPAN class="o">.</SPAN><SPAN class="n">load</SPAN><SPAN class="p">(</SPAN><SPAN class="n">feature_class</SPAN><SPAN class="p">)</SPAN>
try using your "cities" as the feature_class input and see if that works.
I found in the documentation that ArcGIS server accepts featureset as input and output, but not featureclass. Do i need to convert following script to publish gp service ? If yes how ?
import arcpy
Buffer_distance = arcpy.GetParameterAsText(0)
citybuffer = arcpy.GetParameterAsText(1)
cities = "C:\\project\\test.gdb\\cities"
arcpy.Buffer_analysis(cities, citybuffer, Buffer_distance, "FULL", "ROUND", "NONE", "")
did you see Featureset in the help files and some of its arcpy methods
FeatureSet—Help | ArcGIS for Desktop
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.