<?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: ArcGIS Pro Spatial Reference in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67519#M380</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan - that's what I thought; map and map frame don't seem to have any concept of spatial reference, even though from the help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"A &lt;SPAN class="usertext"&gt;Map&lt;/SPAN&gt; in &lt;SPAN class="ph"&gt;ArcGIS Pro&lt;/SPAN&gt; represents a collection of&amp;nbsp; tabular and symbolized geographic layers and also persists information like coordinate system, default views of the data, and various other metadata."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So clearly the map works with the CRS - it just doesn't allow the poor old user access to it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe in the next version...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, Roger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Feb 2016 02:49:47 GMT</pubDate>
    <dc:creator>RogerLoweth</dc:creator>
    <dc:date>2016-02-10T02:49:47Z</dc:date>
    <item>
      <title>ArcGIS Pro Spatial Reference</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67514#M375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't figure out how to get the equivalent of this arcpy.mapping code into arcpy.mp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #008000;"&gt;# Set the CRS values based on the current data frame CRS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;# get the map document&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument(&lt;SPAN style="color: #800000;"&gt;"CURRENT"&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;# get the data frame&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; df = arcpy.mapping.ListDataFrames(mxd)[0]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = df.spatialReference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 02:04:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67514#M375</guid>
      <dc:creator>RogerLoweth</dc:creator>
      <dc:date>2016-02-10T02:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Spatial Reference</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67515#M376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Roger... have you seen the migration documentation ? ... &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/migratingfrom10xarcpymapping.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/migratingfrom10xarcpymapping.htm"&gt;Migrating from arcpy.mapping to ArcGIS Pro—ArcPy | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 02:12:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67515#M376</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-02-10T02:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Spatial Reference</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67516#M377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan - yes, I'm looking at it now. I can see how to do it by referencing a layer, but what if I don't have any layers when I invoke my tool?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 02:16:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67516#M377</guid>
      <dc:creator>RogerLoweth</dc:creator>
      <dc:date>2016-02-10T02:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Spatial Reference</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67517#M378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried doing this, but it doesn't work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;# get the map document&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; p = arcpy.mp.ArcGISProject(&lt;SPAN style="color: #800000;"&gt;"CURRENT"&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000;"&gt;# get the data frame&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m = p.listMaps(&lt;SPAN style="color: #800000;"&gt;"Map"&lt;/SPAN&gt;)[0]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = m.spatialReference&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 02:17:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67517#M378</guid>
      <dc:creator>RogerLoweth</dc:creator>
      <dc:date>2016-02-10T02:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Spatial Reference</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67518#M379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;from the help topic&lt;/P&gt;&lt;P&gt;get the current document&lt;/P&gt;&lt;P&gt;get the first dataframe called "yosemite national park"&lt;/P&gt;&lt;P&gt;get a list of the layers&lt;/P&gt;&lt;P&gt;do stuff with the layer IF it supports showlabels&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p = arcpy.mp.ArcGISProject("CURRENT") &lt;/P&gt;&lt;P&gt;m = p.listMaps("Yosemite National Park")[0]&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;for lyr in m.listLayers():&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if lyr.supports("SHOWLABELS"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lblClasses = lyr.listLabelClasses()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yours&lt;/P&gt;&lt;P&gt;get the current project&lt;/P&gt;&lt;P&gt;get the first dataframe called Map&lt;/P&gt;&lt;P&gt;try to get its spatial reference which... it works... will just return a spatial reference object and not its name&lt;/P&gt;&lt;P&gt;so even if that works you might want m.spatialReference.name (check spelling is it S or small s in spatialReference)&lt;/P&gt;&lt;P&gt;So see&lt;/P&gt;&lt;P&gt; &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/introduction-to-arcpy-mp.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/introduction-to-arcpy-mp.htm"&gt;Introduction to arcpy.mp—ArcPy | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp; and &lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/map-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/map-class.htm"&gt;Map—ArcPy | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt; but here is the only place you are going to get the SR&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/classes/spatialreference.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/classes/spatialreference.htm"&gt;SpatialReference—ArcPy Classes | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp; since the map and map frame apparently don't have any concept of SR that I can find...however, I haven't fully explored all, and all hasn't been ported yet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 02:35:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67518#M379</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-02-10T02:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Spatial Reference</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67519#M380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan - that's what I thought; map and map frame don't seem to have any concept of spatial reference, even though from the help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"A &lt;SPAN class="usertext"&gt;Map&lt;/SPAN&gt; in &lt;SPAN class="ph"&gt;ArcGIS Pro&lt;/SPAN&gt; represents a collection of&amp;nbsp; tabular and symbolized geographic layers and also persists information like coordinate system, default views of the data, and various other metadata."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So clearly the map works with the CRS - it just doesn't allow the poor old user access to it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe in the next version...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, Roger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 02:49:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-pro-spatial-reference/m-p/67519#M380</guid>
      <dc:creator>RogerLoweth</dc:creator>
      <dc:date>2016-02-10T02:49:47Z</dc:date>
    </item>
  </channel>
</rss>

