<?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 Python Toolbox Spatial Reference Input Parameter in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-spatial-reference-input-parameter/m-p/1167246#M54367</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The GPSpatialReference datatype within an input parameter invokes a nice user experience to select the sr...&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TylerTownes_0-1650662759989.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39685iA5FFABAB65AE4B86/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TylerTownes_0-1650662759989.png" alt="TylerTownes_0-1650662759989.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Accessing the &lt;SPAN&gt;GPSpatialReference parameter returns the following sample string&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision'&lt;/P&gt;&lt;P&gt;However, my source code is using spatially enabled dataframes (SEDFs).&amp;nbsp; SEDFs deal better with WKIDs than the string above.&lt;/P&gt;&lt;P&gt;So, I see two potential options if I want to keep the gui sr selector:&lt;/P&gt;&lt;P&gt;1) change to another data type that uses the gui sr selector and assigs a WKID, or,&lt;/P&gt;&lt;P&gt;2) Convert that string above to a WKID or something an SEDF will ingest.&lt;/P&gt;&lt;P&gt;Any ideas how to convert that string to WKID, or know a better parameter data type?&lt;/P&gt;&lt;P&gt;Last resort:&lt;/P&gt;&lt;P&gt;1) change datatype to string and collect the WKID directly.&amp;nbsp; Not as end user friendly.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Tyler&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Apr 2022 22:52:45 GMT</pubDate>
    <dc:creator>TylerTownes</dc:creator>
    <dc:date>2022-04-22T22:52:45Z</dc:date>
    <item>
      <title>Python Toolbox Spatial Reference Input Parameter</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-spatial-reference-input-parameter/m-p/1167246#M54367</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The GPSpatialReference datatype within an input parameter invokes a nice user experience to select the sr...&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TylerTownes_0-1650662759989.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39685iA5FFABAB65AE4B86/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TylerTownes_0-1650662759989.png" alt="TylerTownes_0-1650662759989.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Accessing the &lt;SPAN&gt;GPSpatialReference parameter returns the following sample string&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision'&lt;/P&gt;&lt;P&gt;However, my source code is using spatially enabled dataframes (SEDFs).&amp;nbsp; SEDFs deal better with WKIDs than the string above.&lt;/P&gt;&lt;P&gt;So, I see two potential options if I want to keep the gui sr selector:&lt;/P&gt;&lt;P&gt;1) change to another data type that uses the gui sr selector and assigs a WKID, or,&lt;/P&gt;&lt;P&gt;2) Convert that string above to a WKID or something an SEDF will ingest.&lt;/P&gt;&lt;P&gt;Any ideas how to convert that string to WKID, or know a better parameter data type?&lt;/P&gt;&lt;P&gt;Last resort:&lt;/P&gt;&lt;P&gt;1) change datatype to string and collect the WKID directly.&amp;nbsp; Not as end user friendly.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Tyler&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 22:52:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-spatial-reference-input-parameter/m-p/1167246#M54367</guid>
      <dc:creator>TylerTownes</dc:creator>
      <dc:date>2022-04-22T22:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox Spatial Reference Input Parameter</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-spatial-reference-input-parameter/m-p/1167287#M54377</link>
      <description>&lt;P&gt;I had a couple of thoughts:&lt;/P&gt;&lt;P&gt;1) Notice the behavior of&amp;nbsp;both the&amp;nbsp;&lt;SPAN&gt;GPSpatialReference and&amp;nbsp;GPCoordinateSystem.&amp;nbsp; If you type in:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TylerTownes_0-1650721640263.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39689i612F8319408FE946/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TylerTownes_0-1650721640263.png" alt="TylerTownes_0-1650721640263.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;...the field converts it to the string above.&amp;nbsp; That makes me wonder how to access the same conversion dictionary that the toobox module is using.&lt;/P&gt;&lt;P&gt;2) I posted a general Python topic question of how to best normalize this html table&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jshelp/gcs.html" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jshelp/gcs.html.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See post at:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-questions/pd-read-html-parameters-https-developers-arcgis/td-p/1167264" target="_blank"&gt;https://community.esri.com/t5/python-questions/pd-read-html-parameters-https-developers-arcgis/td-p/1167264&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Reading html tables is a general topic I would like to get better at so the topic stands alone.&amp;nbsp; However, as it relates to the current situation, the idea would be to read it in and use it as a look up table.&amp;nbsp; The&amp;nbsp;4326 wkid matched the string exactly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thx.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tyler&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2022 13:54:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-spatial-reference-input-parameter/m-p/1167287#M54377</guid>
      <dc:creator>TylerTownes</dc:creator>
      <dc:date>2022-04-23T13:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox Spatial Reference Input Parameter</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-spatial-reference-input-parameter/m-p/1167298#M54381</link>
      <description>&lt;UL&gt;&lt;LI&gt;Leave the parameter as&amp;nbsp;&amp;nbsp;GPSpatialReference,&lt;/LI&gt;&lt;LI&gt;Access the&amp;nbsp;SpatialReference object using parameters[N].value (not valueAsText)&lt;/LI&gt;&lt;LI&gt;Get the WKID using the &lt;A href="https://pro.arcgis.com/en/pro-app/2.8/arcpy/classes/spatialreference.htm#P_GUID-ABFF41D0-C10F-42DD-971C-07B1FB918002" target="_self"&gt;SpatialReference.factoryCode&lt;/A&gt; property&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Sat, 23 Apr 2022 23:18:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-spatial-reference-input-parameter/m-p/1167298#M54381</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2022-04-23T23:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox Spatial Reference Input Parameter</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-spatial-reference-input-parameter/m-p/1167302#M54382</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10780"&gt;@Luke_Pinner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perfect.&amp;nbsp; Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2022 23:56:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-spatial-reference-input-parameter/m-p/1167302#M54382</guid>
      <dc:creator>TylerTownes</dc:creator>
      <dc:date>2022-04-23T23:56:16Z</dc:date>
    </item>
  </channel>
</rss>

