<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I compare spatial references of extents? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131196#M10188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if these links will help or not:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/226543-how-to-output-the-values-of-bounding-box-in-spatial-index-using-python"&gt;https://community.esri.com/thread/226543-how-to-output-the-values-of-bounding-box-in-spatial-index-using-python&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/73902"&gt;projectAs help&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have any experience with projectAs, but I think if you could get the xy's out of the given feature class and then compare their values to a set (or subset) of known values, you should be able to determine if they are DD or something else.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jan 2019 23:25:45 GMT</pubDate>
    <dc:creator>JoeBorgione</dc:creator>
    <dc:date>2019-01-03T23:25:45Z</dc:date>
    <item>
      <title>How do I compare spatial references of extents?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131194#M10186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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:&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;boundingBox &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; None
WGS84 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; SpatialReference&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Project our extent to GPS lat long if it is not already&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; extent &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; WGS84&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; boundingBox &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;projectAs&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;WGS84&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:22:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131194#M10186</guid>
      <dc:creator>KylePerri</dc:creator>
      <dc:date>2021-12-11T07:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare spatial references of extents?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131195#M10187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you put in values that you are testing.&amp;nbsp; the code snippet fails since 'extent' isn't defined&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2019 22:29:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131195#M10187</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-01-03T22:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare spatial references of extents?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131196#M10188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if these links will help or not:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/226543-how-to-output-the-values-of-bounding-box-in-spatial-index-using-python"&gt;https://community.esri.com/thread/226543-how-to-output-the-values-of-bounding-box-in-spatial-index-using-python&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/73902"&gt;projectAs help&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have any experience with projectAs, but I think if you could get the xy's out of the given feature class and then compare their values to a set (or subset) of known values, you should be able to determine if they are DD or something else.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2019 23:25:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131196#M10188</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-01-03T23:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare spatial references of extents?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131197#M10189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An example.... one file in geographic and one in projected coordinates...&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;in_fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\....\arcpytools_demo.gdb\Can_0_big_3"&lt;/SPAN&gt;
desc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
ext &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; desc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent
ext&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name
&lt;SPAN class="string token"&gt;'GCS_WGS_1984'&lt;/SPAN&gt;

in_fc2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\Git_Dan\a_Data\testdata.gdb\polygon"&lt;/SPAN&gt;
desc2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_fc2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
ext2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; desc2&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent
ext2&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name
&lt;SPAN class="string token"&gt;'NAD_1983_CSRS_MTM_9'&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;# ----- now do the comparisons ----&lt;/SPAN&gt;
ext&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&amp;nbsp; &lt;SPAN class="comment token"&gt;# ---- 'GCS_WGS_1984'&lt;/SPAN&gt;
ext&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lowerLeft
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;141.00686645507812&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;41.67692565917997&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;&lt;/SPAN&gt;
ext&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;upperRight
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;52.61888885498041&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;83.11042022705101&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;&lt;/SPAN&gt;

ext2&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&amp;nbsp; &lt;SPAN class="comment token"&gt;# ---- 'NAD_1983_CSRS_MTM_9'&lt;/SPAN&gt;
ext2&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lowerLeft
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300000.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5000000.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;&lt;/SPAN&gt;
ext2&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;upperRight
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300020.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5000020.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# ---- now other properties and test parameters ----&lt;/SPAN&gt;
ext&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;contains&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ext2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;

ext2&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;contains&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ext&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;

ext&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;overlaps&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ext2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;

ext&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;within&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ext2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;

ext2&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;within&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ext&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# ----- from the help&lt;/SPAN&gt;
dir&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ext&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'JSON'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'MMax'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'MMin'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'XMax'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'XMin'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'YMax'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'YMin'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'ZMax'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'ZMin'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; snip&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;', '&lt;/SPAN&gt;contains&lt;SPAN class="string token"&gt;', '&lt;/SPAN&gt;crosses&lt;SPAN class="string token"&gt;', '&lt;/SPAN&gt;depth&lt;SPAN class="string token"&gt;', '&lt;/SPAN&gt;disjoint&lt;SPAN class="string token"&gt;', '&lt;/SPAN&gt;equals&lt;SPAN class="string token"&gt;', '&lt;/SPAN&gt;geohash&lt;SPAN class="string token"&gt;', '&lt;/SPAN&gt;geohashCovers'&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'geohashNeighbors'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'height'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'lowerLeft'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'lowerRight'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'overlaps'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'polygon'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'projectAs'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'spatialReference'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'touches'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'upperLeft'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'upperRight'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'width'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'within'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:22:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131197#M10189</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T07:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare spatial references of extents?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131198#M10190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Extent is a parameter in the script tool, but I've been using the current extent of my map.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 14:59:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131198#M10190</guid>
      <dc:creator>KylePerri</dc:creator>
      <dc:date>2019-01-07T14:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare spatial references of extents?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131199#M10191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then my examples should help if it is an extent object.&amp;nbsp; If it is a string representation of the extent, you may have some parsing to do to get the numeric values&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 15:20:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131199#M10191</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-01-07T15:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare spatial references of extents?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131200#M10192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ended up doing this:&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="" style="color: #0077aa;"&gt;if&lt;/SPAN&gt; extent &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5);"&gt;and&lt;/SPAN&gt; extent&lt;SPAN class="" style="color: #999999;"&gt;.&lt;/SPAN&gt;spatialReference&lt;SPAN class="" style="color: #999999;"&gt;.&lt;/SPAN&gt;linearUnitName &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5);"&gt;==&lt;/SPAN&gt; &lt;SPAN class="" style="color: #669900;"&gt;'Meter'&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; boundingBox &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5);"&gt;=&lt;/SPAN&gt; extent&lt;SPAN class="" style="color: #999999;"&gt;.&lt;/SPAN&gt;projectAs&lt;SPAN class="" style="color: #999999;"&gt;(&lt;/SPAN&gt;SpatialReference&lt;SPAN class="" style="color: #999999;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #990000;"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;It seems to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:22:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131200#M10192</guid>
      <dc:creator>KylePerri</dc:creator>
      <dc:date>2021-12-11T07:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare spatial references of extents?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131201#M10193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;boundingBox &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; None
WGS84 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; SpatialReference&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Project our extent to GPS lat long if it is not already&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; extent &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; WGS84&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; boundingBox &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;projectAs&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;WGS84&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;Your original code used the &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;is&lt;/SPAN&gt; operator, which tests for object identity and not equality.&amp;nbsp; A quick check shows that Esri has implemented equality equivalence with the Spatial Reference class:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; SR1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SpatialReference&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; SR2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SpatialReference&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; 
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; SR1 &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; SR2
&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; SR1 &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; SR2
&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;
‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:22:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-compare-spatial-references-of-extents/m-p/131201#M10193</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T07:22:33Z</dc:date>
    </item>
  </channel>
</rss>

