<?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: ReProject Error In Script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347784#M27270</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks MZCOYLE. That was in fact the correct Syntax.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Learning something new everyday I work with python.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Apr 2013 13:46:17 GMT</pubDate>
    <dc:creator>ChristopherClark1</dc:creator>
    <dc:date>2013-04-08T13:46:17Z</dc:date>
    <item>
      <title>ReProject Error In Script</title>
      <link>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347778#M27264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;At the end of a script I run a Projection, but I keep getting the following Error&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PYTHON ERRORS:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback info:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; File "G:\Scripts\BARRIER_MERGE_edits.py", line 48, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.Project_management(GRADIENT_BAR_PT, GRADIENT_BARH83, outCS, CSTRANS)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error Info:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000622: Failed to execute (Project). Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000628: Cannot set input into parameter out_coor_system.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a piece of the script and the defined variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;outCS = "NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602_Feet"
CSTRANS = '"NAD_1927_To_NAD_1983_NADCON", "NAD_1983_To_HARN_WA_OR"'

arcpy.Project_management(GRADIENT_BAR_PT, GRADIENT_BARH83, outCS, CSTRANS)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas on where I am going wrong here? I appreciate the help!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:22:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347778#M27264</guid>
      <dc:creator>ChristopherClark1</dc:creator>
      <dc:date>2021-12-12T16:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: ReProject Error In Script</title>
      <link>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347779#M27265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are using 10.1, you supply the coordinate systems differently.&amp;nbsp; Instead of using a reference to the prj file (the folder is no longer there), you can use the WKID for the output coordinate system.&amp;nbsp; In this case the factory code for the State Plane South HARN is 2927.&amp;nbsp; You can create a spatial reference object but I have found that you can get it to work by just supplying the WKID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;CSTRANS = '"NAD_1927_To_NAD_1983_NADCON", "NAD_1983_To_HARN_WA_OR"' # WKID is 2927&amp;nbsp; arcpy.Project_management(GRADIENT_BAR_PT, GRADIENT_BARH83, 2927, CSTRANS)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 12:09:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347779#M27265</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-04-08T12:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: ReProject Error In Script</title>
      <link>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347780#M27266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;outCS = "NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602_Feet"&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Is not a string representation of CS. Use Spatial Reference object instead i.e. supposing you're using arcmap 10.1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
arcpy.SpatialReference("NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602_Feet")
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;or &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.SpatialReference(2927)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Arek&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:22:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347780#M27266</guid>
      <dc:creator>ArkadiuszMatoszka</dc:creator>
      <dc:date>2021-12-11T16:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: ReProject Error In Script</title>
      <link>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347781#M27267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have changed the code to :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Project_management(GRADIENT_BAR_PT, GRADIENT_BARH83, 2927, CSTRANS)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I get this error now :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error Info:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000365: Invalid geographic transformation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (Project).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The variable that is my Geographic transformation is &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CSTRANS = '"NAD_1927_To_NAD_1983_NADCON", "NAD_1983_To_HARN_WA_OR"'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And it works in when I use that transformation in the tool, so I think it is a syntax error, or just a format error. Those are the correct transformations maybe I have just entered them wrong somehow?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THanks for the 2927 tip, I had no idea!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 13:10:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347781#M27267</guid>
      <dc:creator>ChristopherClark1</dc:creator>
      <dc:date>2013-04-08T13:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: ReProject Error In Script</title>
      <link>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347782#M27268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe this is the correct syntax.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
CSTRANS = '"NAD_1927_To_NAD_1983_NADCON + NAD_1983_To_HARN_WA_OR"'&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:22:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347782#M27268</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2021-12-11T16:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: ReProject Error In Script</title>
      <link>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347783#M27269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah in the help docs they say you need to create the spatial reference object first, but I found out you can just supply the WKID without creating the SR object first and it seems to project it properly.&amp;nbsp; As for the transformation error, I would maybe take that parameter out and see if it works.&amp;nbsp; It *should* automatically do the proper transformation from the NAD 27 to NAD 83.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 13:28:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347783#M27269</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-04-08T13:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: ReProject Error In Script</title>
      <link>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347784#M27270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks MZCOYLE. That was in fact the correct Syntax.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Learning something new everyday I work with python.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 13:46:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reproject-error-in-script/m-p/347784#M27270</guid>
      <dc:creator>ChristopherClark1</dc:creator>
      <dc:date>2013-04-08T13:46:17Z</dc:date>
    </item>
  </channel>
</rss>

