Is it possible to use the coordinate system from a data frame in the current map document within an update cursor?
I have data in GCS WGS84 and I want to update area/perimeter/length fields across a geodatabase with UTM WGS84 units. I want to acquire a coordinate system for the cursor from the current map data frame coordinate system, not a reference feature class. A piece of my current script is below, which would return useless area/length values from GCS coordinates:
<SPAN class="keyword token">for</SPAN> fc <SPAN class="keyword token">in</SPAN> fcList<SPAN class="punctuation token">:</SPAN>
fc <SPAN class="operator token">=</SPAN> fc <SPAN class="operator token">+</SPAN><SPAN class="string token">"\\"</SPAN>
fieldList <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>ListFields<SPAN class="punctuation token">(</SPAN>fc<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'lengthSize'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="comment token">#lengthSize field</SPAN>
fieldCount <SPAN class="operator token">=</SPAN> len<SPAN class="punctuation token">(</SPAN>fieldList<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>fieldCount <SPAN class="operator token">></SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">print</SPAN> <SPAN class="string token">"perimeterSize field present in: "</SPAN> <SPAN class="operator token">+</SPAN> fc
arcpy<SPAN class="punctuation token">.</SPAN>AddMessage <SPAN class="punctuation token">(</SPAN><SPAN class="string token">"perimeterSize field present in: "</SPAN> <SPAN class="operator token">+</SPAN> fc<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">with</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>da<SPAN class="punctuation token">.</SPAN>UpdateCursor <SPAN class="punctuation token">(</SPAN>fc<SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">'SHAPE@LENGTH'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'lengthSize'</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">as</SPAN> cursor<SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">for</SPAN> row <SPAN class="keyword token">in</SPAN> cursor<SPAN class="punctuation token">:</SPAN>
row<SPAN class="punctuation token">[</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="operator token">=</SPAN> row<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN>
cursor<SPAN class="punctuation token">.</SPAN>updateRow<SPAN class="punctuation token">(</SPAN>row<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN> <SPAN class="string token">"Updating 'lengthSize' field in: "</SPAN> <SPAN class="operator token">+</SPAN> fc
arcpy<SPAN class="punctuation token">.</SPAN>AddMessage <SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Updating 'lengthSize' field in: "</SPAN> <SPAN class="operator token">+</SPAN> fc<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">else</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">print</SPAN> <SPAN class="string token">"No lengthSize field in: "</SPAN><SPAN class="punctuation token">,</SPAN> fc
arcpy<SPAN class="punctuation token">.</SPAN>AddMessage <SPAN class="punctuation token">(</SPAN><SPAN class="string token">"No lengthSize field in: "</SPAN> <SPAN class="operator token">+</SPAN> fc<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></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Is this possible, or does a "describe" (like that found here: http://pro.arcgis.com/en/pro-app/arcpy/get-started/setting-a-cursor-s-spatial-reference.htm) have to be used?
Thanks
Justin