<?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 Project 2: Batch reprojection tool for vector datasets Penn State in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/project-2-batch-reprojection-tool-for-vector/m-p/295789#M22863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;This is my first time posting to a discussion board. I am in the process of taking Penn State's Geog 485 course on Python and GIS and I am stuck on an exercise.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;Here is the url of the exercise: &lt;A _jive_internal="true" class="" href="https://community.esri.com/discussion/create.jspa?sr=cmenu&amp;amp;containerType=14&amp;amp;containerID=1&amp;amp;draftID=31201"&gt;https://community.esri.com/discussion/create.jspa?sr=cmenu&amp;amp;containerType=14&amp;amp;containerID=1&amp;amp;draftID=31201&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;If anyone has any suggestion on how to make this code work or what I am doing wrong, I would really appreciate it&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="python" name="code"&gt;import arcpy&amp;nbsp; #Set workspace environment arcpy.env.workspace = "C:\\Users\\jtodd\\Dropbox\\PennState_OnlineCourses\\WCGIS\\Geog485\\Lesson2\\Lesson2Data"&amp;nbsp;&amp;nbsp; #Input feature classes input_features = arcpy.ListFeatureClasses()&amp;nbsp;&amp;nbsp; #Output workspace output_workspace = "C:\\Users\\jtodd\\Dropbox\\PennState_OnlineCourses\\WCGIS\\Geog485\\Lesson2\\Lesson2Data\\results"&amp;nbsp;&amp;nbsp; #template dataset template = "Ferries.shp"&amp;nbsp;&amp;nbsp; try: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #Geographic transformation - Determines 'template' spatial reference &amp;nbsp;&amp;nbsp;&amp;nbsp; desc = arcpy.Describe(template) &amp;nbsp;&amp;nbsp;&amp;nbsp; templateSR = desc.spatialReference &amp;nbsp;&amp;nbsp;&amp;nbsp; #print templateSR.Name #Check to make sure code is working up to this point&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for featureClass in input_features: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; desc = arcpy.Describe(featureClass) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fcListSR = desc.SpatialReference &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #print fcListSR.Name #Check to make sure code is working up to this point&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if fcListSR.Name != templateSR.Name: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DefineProjection_management(input_features, templateSR) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(arcpy.GetMessages(0))&amp;nbsp;&amp;nbsp; except arcpy.ExecuteError: &amp;nbsp;&amp;nbsp;&amp;nbsp; print(arcpy.GetMessages(2))&amp;nbsp;&amp;nbsp; except Exception as ex: &amp;nbsp;&amp;nbsp;&amp;nbsp; print(ex.args[0])&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Oct 2014 14:24:26 GMT</pubDate>
    <dc:creator>JordanLumber</dc:creator>
    <dc:date>2014-10-02T14:24:26Z</dc:date>
    <item>
      <title>Project 2: Batch reprojection tool for vector datasets Penn State</title>
      <link>https://community.esri.com/t5/python-questions/project-2-batch-reprojection-tool-for-vector/m-p/295789#M22863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;This is my first time posting to a discussion board. I am in the process of taking Penn State's Geog 485 course on Python and GIS and I am stuck on an exercise.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;Here is the url of the exercise: &lt;A _jive_internal="true" class="" href="https://community.esri.com/discussion/create.jspa?sr=cmenu&amp;amp;containerType=14&amp;amp;containerID=1&amp;amp;draftID=31201"&gt;https://community.esri.com/discussion/create.jspa?sr=cmenu&amp;amp;containerType=14&amp;amp;containerID=1&amp;amp;draftID=31201&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;If anyone has any suggestion on how to make this code work or what I am doing wrong, I would really appreciate it&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="python" name="code"&gt;import arcpy&amp;nbsp; #Set workspace environment arcpy.env.workspace = "C:\\Users\\jtodd\\Dropbox\\PennState_OnlineCourses\\WCGIS\\Geog485\\Lesson2\\Lesson2Data"&amp;nbsp;&amp;nbsp; #Input feature classes input_features = arcpy.ListFeatureClasses()&amp;nbsp;&amp;nbsp; #Output workspace output_workspace = "C:\\Users\\jtodd\\Dropbox\\PennState_OnlineCourses\\WCGIS\\Geog485\\Lesson2\\Lesson2Data\\results"&amp;nbsp;&amp;nbsp; #template dataset template = "Ferries.shp"&amp;nbsp;&amp;nbsp; try: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #Geographic transformation - Determines 'template' spatial reference &amp;nbsp;&amp;nbsp;&amp;nbsp; desc = arcpy.Describe(template) &amp;nbsp;&amp;nbsp;&amp;nbsp; templateSR = desc.spatialReference &amp;nbsp;&amp;nbsp;&amp;nbsp; #print templateSR.Name #Check to make sure code is working up to this point&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for featureClass in input_features: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; desc = arcpy.Describe(featureClass) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fcListSR = desc.SpatialReference &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #print fcListSR.Name #Check to make sure code is working up to this point&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if fcListSR.Name != templateSR.Name: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DefineProjection_management(input_features, templateSR) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(arcpy.GetMessages(0))&amp;nbsp;&amp;nbsp; except arcpy.ExecuteError: &amp;nbsp;&amp;nbsp;&amp;nbsp; print(arcpy.GetMessages(2))&amp;nbsp;&amp;nbsp; except Exception as ex: &amp;nbsp;&amp;nbsp;&amp;nbsp; print(ex.args[0])&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 14:24:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/project-2-batch-reprojection-tool-for-vector/m-p/295789#M22863</guid>
      <dc:creator>JordanLumber</dc:creator>
      <dc:date>2014-10-02T14:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Project 2: Batch reprojection tool for vector datasets Penn State</title>
      <link>https://community.esri.com/t5/python-questions/project-2-batch-reprojection-tool-for-vector/m-p/295790#M22864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you repost the code it is on one line&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 00:57:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/project-2-batch-reprojection-tool-for-vector/m-p/295790#M22864</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-03-14T00:57:08Z</dc:date>
    </item>
  </channel>
</rss>

