I am passing an extent into my script tool and I want to check to make sure it is WGS84 and if it isn't I convert it using projectAs; however, when it is WGS84 if I project it the extent's xmin, xmax, ymin, ymax gets messed up. How can I compare them so I don't project it if it's already in decimal degrees? Here is what I have, but it doesn't seem to work:
boundingBox <SPAN class="operator token">=</SPAN> None
WGS84 <SPAN class="operator token">=</SPAN> SpatialReference<SPAN class="punctuation token">(</SPAN><SPAN class="number token">4326</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token"># Project our extent to GPS lat long if it is not already</SPAN>
<SPAN class="keyword token">if</SPAN> extent <SPAN class="operator token">and</SPAN> extent<SPAN class="punctuation token">.</SPAN>spatialReference <SPAN class="keyword token">is</SPAN> <SPAN class="operator token">not</SPAN> WGS84<SPAN class="punctuation token">:</SPAN>
boundingBox <SPAN class="operator token">=</SPAN> extent<SPAN class="punctuation token">.</SPAN>projectAs<SPAN class="punctuation token">(</SPAN>WGS84<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>