<?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: Batch Project issue in Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011475#M59346</link>
    <description>&lt;P&gt;Like &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3374"&gt;@JoeBorgione&lt;/a&gt; mentioned below, run the tool from the geoprocessing toolbox (Data Management, Projections and Transformations). You can do the same thing in ArcMap 10.6.1 if you don't have ArcGIS Pro. If you can get it to work there, you can &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/executing-tools/using-the-results-window.htm#GUID-04B17050-E682-44F4-AFB3-762F1319BCF9" target="_self"&gt;copy the geoprocessing result as a python snippet&lt;/A&gt;&amp;nbsp; and paste it into a text editor. This will give you a starting place to work out from.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Dec 2020 16:38:32 GMT</pubDate>
    <dc:creator>BlakeTerhune</dc:creator>
    <dc:date>2020-12-21T16:38:32Z</dc:date>
    <item>
      <title>Batch Project issue in Python</title>
      <link>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011453#M59340</link>
      <description>&lt;P&gt;I am trying to batch project feature classes from one GDB to another in a stand alone script. This script also includes field mapping from a csv file to a new GDB but that portion of the script works fine. I have ArcMap 10.6.1 installed with Python 2.7.14. I started with with ESRI sample for BatchProject stand alone example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;import csv&lt;BR /&gt;import sys&lt;BR /&gt;import os&lt;BR /&gt;import arcpy&lt;BR /&gt;from arcpy import env&lt;BR /&gt;import BatchProject.py&lt;/P&gt;&lt;P&gt;arcpy.env.workspace = "C:\Data\Pennsylvania\Washington County\MCPExport.gdb" # Set workspace environment&lt;BR /&gt;out_workspace = "C:\\Data\\Pennsylvania\\NG911_TEST.gdb" # Output workspace&lt;BR /&gt;input_features = arcpy.ListFeatureClasses()&amp;nbsp;&lt;BR /&gt;template = "C:\Data\Pennsylvania\NG911_TEST.gdb\ESZ_EMS"&amp;nbsp;&lt;BR /&gt;out_cs = ''&amp;nbsp;transformation = 'NAD_1983_To_WGS_1984_5' # Geographic transformation, if needed&lt;/P&gt;&lt;P&gt;res = arcpy.BatchProject(input_features, out_workspace, out_cs, template, transformation)&lt;/P&gt;&lt;P&gt;Error I get:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Traceback (most recent call last):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Data\Pennsylvania\ETL_Bat_November2020\ETL\washington\etl3.py", line 6, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;import BatchProject.py&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcToolBox\Scripts\BatchProject.py", line 54, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;raise ConversionUtils.GPError(msgCoordinateSystem)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;GPError: Must Enter a Spatial Reference or Template Feature Class.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I have tried various templates and out_cs values but nothing works. I've added. Any help would be appreciated!!&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 15:38:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011453#M59340</guid>
      <dc:creator>DawnBaldridge</dc:creator>
      <dc:date>2020-12-21T15:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Project issue in Python</title>
      <link>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011459#M59341</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;When I see issues like this, one thing I like to try is to only run the code with the required parameters. If that works, I slowly build out from there so I can absolutely confirm which parameters are causing the issue. In regards to the crs parameter, have your tried pointing to a .prj file? I have had success with that in the past.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 16:00:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011459#M59341</guid>
      <dc:creator>NoahKrach</dc:creator>
      <dc:date>2020-12-21T16:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Project issue in Python</title>
      <link>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011461#M59342</link>
      <description>&lt;P&gt;Going even further, try simplifying your parameters too. Instead of running it on everything with&amp;nbsp;arcpy.ListFeatureClasses(), just specify one feature class you know should work (meaning it is in&amp;nbsp;&lt;SPAN&gt;NAD_1983). Try different combinations of specifying a projection or using a template, and with or without the transformation.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 16:07:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011461#M59342</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2020-12-21T16:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Project issue in Python</title>
      <link>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011462#M59343</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I have tried .prj files. And leaving the template blank and trying various versions of WGS84. One being out_cs=arcpy.SpatialReference(4326)&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 16:08:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011462#M59343</guid>
      <dc:creator>DawnBaldridge</dc:creator>
      <dc:date>2020-12-21T16:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Project issue in Python</title>
      <link>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011470#M59344</link>
      <description>&lt;P&gt;If you run the Project Tool in arcgis pro, you will get all the parameters you need from the tool itself.&amp;nbsp; You can then fold them into a script as described in the help&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/project.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/project.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 16:26:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011470#M59344</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-12-21T16:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Project issue in Python</title>
      <link>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011471#M59345</link>
      <description>&lt;P&gt;Hi Blake,&lt;/P&gt;&lt;P&gt;I have tried one shapefile then one feature class, even though it's a batch project. I still get the same error.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 16:27:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011471#M59345</guid>
      <dc:creator>DawnBaldridge</dc:creator>
      <dc:date>2020-12-21T16:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Project issue in Python</title>
      <link>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011475#M59346</link>
      <description>&lt;P&gt;Like &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3374"&gt;@JoeBorgione&lt;/a&gt; mentioned below, run the tool from the geoprocessing toolbox (Data Management, Projections and Transformations). You can do the same thing in ArcMap 10.6.1 if you don't have ArcGIS Pro. If you can get it to work there, you can &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/executing-tools/using-the-results-window.htm#GUID-04B17050-E682-44F4-AFB3-762F1319BCF9" target="_self"&gt;copy the geoprocessing result as a python snippet&lt;/A&gt;&amp;nbsp; and paste it into a text editor. This will give you a starting place to work out from.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 16:38:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011475#M59346</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2020-12-21T16:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Project issue in Python</title>
      <link>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011486#M59350</link>
      <description>&lt;P&gt;After this little tidbit from Blake about copying the results as a python snippet I could really see the correct tool and syntax.&amp;nbsp; My code was off.&amp;nbsp; Should have been using arcpy.BatchProject_management.&lt;/P&gt;&lt;P&gt;Thank you Blake and Joe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;arcpy.BatchProject_management(Input_Feature_Class_or_Dataset="'C:/Data/Pennsylvania/Washington County/MCPExport.gdb/RCL'", Output_Workspace="C:/Data/Pennsylvania/NG911_TEST.gdb", Output_Coordinate_System="GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]", Template_dataset="", Transformation="NAD_1983_To_WGS_1984_5")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 17:14:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-project-issue-in-python/m-p/1011486#M59350</guid>
      <dc:creator>DawnBaldridge</dc:creator>
      <dc:date>2020-12-21T17:14:46Z</dc:date>
    </item>
  </channel>
</rss>

