<?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 to get center coordinates from map viewer? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-get-center-coordinates-from-map-viewer/m-p/678422#M52595</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understand you correctly you'll want to look at&amp;nbsp;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/dataframe-class.htm"&gt;DataFrame Objects&lt;/A&gt;&amp;nbsp;and its extent property&amp;nbsp;(in 10.x) or&amp;nbsp;&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/camera-class.htm"&gt;Camera Objects&lt;/A&gt;&amp;nbsp;(in Pro) which uses the getExtent() - Both of these should return an&amp;nbsp;&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/classes/extent.htm"&gt;Extent Object&lt;/A&gt;&amp;nbsp;from which you can get the XMin, Ymin, Xmax &amp;amp; Ymax properties from to figure out the center point.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Nov 2016 18:00:02 GMT</pubDate>
    <dc:creator>ClintonDow1</dc:creator>
    <dc:date>2016-11-10T18:00:02Z</dc:date>
    <item>
      <title>how to get center coordinates from map viewer?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-get-center-coordinates-from-map-viewer/m-p/678419#M52592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured that this one would be pretty easy, but I'm having trouble finding it via google.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I (with arcpy/python) get current map viewer center coordinates or corner coordinates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm constructing geospatial URL queries, and I want the tool to automatically send the viewer center point, or the 4 corner coordinates, as part of the URL payload.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 17:41:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-get-center-coordinates-from-map-viewer/m-p/678419#M52592</guid>
      <dc:creator>EricEagle</dc:creator>
      <dc:date>2016-11-10T17:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to get center coordinates from map viewer?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-get-center-coordinates-from-map-viewer/m-p/678420#M52593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;mxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\Project\Project.mxd"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
df &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListDataFrames&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;#the 1st data frame&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; df&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; df&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;XMin
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; df&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;XMax

&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; df&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;YMin
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; df&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;YMax
&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>Sun, 12 Dec 2021 04:35:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-get-center-coordinates-from-map-viewer/m-p/678420#M52593</guid>
      <dc:creator>LukeWebb</dc:creator>
      <dc:date>2021-12-12T04:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to get center coordinates from map viewer?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-get-center-coordinates-from-map-viewer/m-p/678421#M52594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great! Thanks Luke!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 17:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-get-center-coordinates-from-map-viewer/m-p/678421#M52594</guid>
      <dc:creator>EricEagle</dc:creator>
      <dc:date>2016-11-10T17:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to get center coordinates from map viewer?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-get-center-coordinates-from-map-viewer/m-p/678422#M52595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understand you correctly you'll want to look at&amp;nbsp;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/dataframe-class.htm"&gt;DataFrame Objects&lt;/A&gt;&amp;nbsp;and its extent property&amp;nbsp;(in 10.x) or&amp;nbsp;&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/camera-class.htm"&gt;Camera Objects&lt;/A&gt;&amp;nbsp;(in Pro) which uses the getExtent() - Both of these should return an&amp;nbsp;&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/classes/extent.htm"&gt;Extent Object&lt;/A&gt;&amp;nbsp;from which you can get the XMin, Ymin, Xmax &amp;amp; Ymax properties from to figure out the center point.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 18:00:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-get-center-coordinates-from-map-viewer/m-p/678422#M52595</guid>
      <dc:creator>ClintonDow1</dc:creator>
      <dc:date>2016-11-10T18:00:02Z</dc:date>
    </item>
  </channel>
</rss>

