I need help getting the merge to work on this script. I currently do not get an error but features don't merge.
I need the features of wp1 Mile and wp2 Mile to merge into one feature but merge based on the Buff_DIST feild, the attributes with "1" will be one and the ones with "2" will be another.
I think the reason why i get 12 features in the mile1_2 is because there is multiple parcels in the SP
the code i am working with. Should i be using a Dissolve and if so how we i use the dissolve with my current code?
distances <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">"1 Mile"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"2 Mile"</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="keyword token">for</SPAN> distance <SPAN class="keyword token">in</SPAN> distances<SPAN class="punctuation token">:</SPAN>
outfile <SPAN class="operator token">=</SPAN> <SPAN class="string token">"wp%s"</SPAN> <SPAN class="operator token">%</SPAN> distance
arcpy<SPAN class="punctuation token">.</SPAN>Buffer_analysis<SPAN class="punctuation token">(</SPAN>SP<SPAN class="punctuation token">,</SPAN> outfile<SPAN class="punctuation token">,</SPAN> distance<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"FULL"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"ROUND"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">""</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"BUFF_DIST"</SPAN><SPAN class="punctuation token">)</SPAN>
out <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>env<SPAN class="punctuation token">.</SPAN>workspace
lyr <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">"wp1 Mile"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"wp2 Mile"</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="comment token">#shplist = arcpy.ListFeatureClasses(lyr, "Polygon")</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>Merge_management<SPAN class="punctuation token">(</SPAN>lyr<SPAN class="punctuation token">,</SPAN> os<SPAN class="punctuation token">.</SPAN>path<SPAN class="punctuation token">.</SPAN>join<SPAN class="punctuation token">(</SPAN>out<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"mile1_2"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>