<?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 gp.project not working with shorthand of prj in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/gp-project-not-working-with-shorthand-of-prj/m-p/679505#M52662</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;System ArcGIS 9.3&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to project using shorthand of 1984 prj.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, it failed and said &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A locator with this name does not exist.&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;Please kindly explain the error cause and advise any modification in need of the code below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;##Script Name: Project shapefiles (batch) ##Description: project multiple shapefiles ##Created By: Elaine Kuo ##Date: 08/05/2012&amp;nbsp; #Import standard library modules import arcgisscripting import os&amp;nbsp; #Create the Geoprocessor object gp = arcgisscripting.create(9.3)&amp;nbsp; #Set the input workspace #GP.workspace = sys.argv[1] #Set the workspace. gp.Workspace= "H:/temp/test1"&amp;nbsp; #Set the output workspace #outWorkspace = sys.argv[2] #Set the workspace. List all of the feature classes in the dataset outWorkspace= "H:/temp"&amp;nbsp; # Set the spatial reference variable cs = "C:/Program Files/ArcGIS/Coordinate Systems/Geographic Coordinate Systems/World/WGS 1984.prj"&amp;nbsp; #Get a list of the featureclasses in the input folder fcs = gp.ListFeatureClasses()&amp;nbsp; # Loop through every item in the list that was just generated for fc in fcs:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # Break out the name, no path or extension, using the describe object. &amp;nbsp;&amp;nbsp;&amp;nbsp; desc = gp.describe(fc) &amp;nbsp;&amp;nbsp;&amp;nbsp; featureName = desc.name&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # Make featureclasses as layers &amp;nbsp;&amp;nbsp;&amp;nbsp; outFeatureClass = outWorkspace + os.sep + gp.ValidateTableName(featureName, outWorkspace) &amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Toolbox = "management" &amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Project(fc, outFeatureClass, cs)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 May 2012 21:00:28 GMT</pubDate>
    <dc:creator>ElaineKuo</dc:creator>
    <dc:date>2012-05-14T21:00:28Z</dc:date>
    <item>
      <title>gp.project not working with shorthand of prj</title>
      <link>https://community.esri.com/t5/python-questions/gp-project-not-working-with-shorthand-of-prj/m-p/679505#M52662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;System ArcGIS 9.3&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to project using shorthand of 1984 prj.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, it failed and said &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A locator with this name does not exist.&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;Please kindly explain the error cause and advise any modification in need of the code below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;##Script Name: Project shapefiles (batch) ##Description: project multiple shapefiles ##Created By: Elaine Kuo ##Date: 08/05/2012&amp;nbsp; #Import standard library modules import arcgisscripting import os&amp;nbsp; #Create the Geoprocessor object gp = arcgisscripting.create(9.3)&amp;nbsp; #Set the input workspace #GP.workspace = sys.argv[1] #Set the workspace. gp.Workspace= "H:/temp/test1"&amp;nbsp; #Set the output workspace #outWorkspace = sys.argv[2] #Set the workspace. List all of the feature classes in the dataset outWorkspace= "H:/temp"&amp;nbsp; # Set the spatial reference variable cs = "C:/Program Files/ArcGIS/Coordinate Systems/Geographic Coordinate Systems/World/WGS 1984.prj"&amp;nbsp; #Get a list of the featureclasses in the input folder fcs = gp.ListFeatureClasses()&amp;nbsp; # Loop through every item in the list that was just generated for fc in fcs:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # Break out the name, no path or extension, using the describe object. &amp;nbsp;&amp;nbsp;&amp;nbsp; desc = gp.describe(fc) &amp;nbsp;&amp;nbsp;&amp;nbsp; featureName = desc.name&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # Make featureclasses as layers &amp;nbsp;&amp;nbsp;&amp;nbsp; outFeatureClass = outWorkspace + os.sep + gp.ValidateTableName(featureName, outWorkspace) &amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Toolbox = "management" &amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Project(fc, outFeatureClass, cs)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 21:00:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gp-project-not-working-with-shorthand-of-prj/m-p/679505#M52662</guid>
      <dc:creator>ElaineKuo</dc:creator>
      <dc:date>2012-05-14T21:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: gp.project not working with shorthand of prj</title>
      <link>https://community.esri.com/t5/python-questions/gp-project-not-working-with-shorthand-of-prj/m-p/679506#M52663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I do suggest not hardcoding the path. Here's how you do that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Set the spatial reference variable
prjHome = arcpy.GetInstallInfo()["InstallDir"]
cs = prjHome + "/Coordinate Systems/Geographic Coordinate Systems/World/WGS 1984.prj"
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, note that you may have to supply a transformation for the Project run to work if the datums are different. The best way to find matches is to run the tool interactively between the two coordinate systems - the popup will give you a choice of transformations to use. Use of transformations is documented in the online help &lt;/SPAN&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Geographic%20transformation%20methods" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN&gt;, with details in a "geographic_transformations"&amp;nbsp; pdf file in the install folder's Documentation folder.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:37:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gp-project-not-working-with-shorthand-of-prj/m-p/679506#M52663</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-12T04:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: gp.project not working with shorthand of prj</title>
      <link>https://community.esri.com/t5/python-questions/gp-project-not-working-with-shorthand-of-prj/m-p/679507#M52664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. transformation:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It is not in need to change from Behrmann WGS 1984 to WGS 1984.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Please kindly correct me if it is wrong.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; Also thanks for not hardcoding the path.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; However, my version is ArcGIS 9.3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please kindly suggest any modification from ArcGIS 10 to 9.3.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 03:31:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gp-project-not-working-with-shorthand-of-prj/m-p/679507#M52664</guid>
      <dc:creator>ElaineKuo</dc:creator>
      <dc:date>2012-05-15T03:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: gp.project not working with shorthand of prj</title>
      <link>https://community.esri.com/t5/python-questions/gp-project-not-working-with-shorthand-of-prj/m-p/679508#M52665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for the answer.&lt;BR /&gt;&lt;BR /&gt;1. transformation:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It is not in need to change from Behrmann WGS 1984 to WGS 1984.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Please kindly correct me if it is wrong.)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No, sounds fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;2.&amp;nbsp; Also thanks for not hardcoding the path.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; However, my version is ArcGIS 9.3&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please kindly suggest any modification from ArcGIS 10 to 9.3.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use "gp" instead of "arcpy": &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;A href="&amp;lt;/span&amp;gt;&amp;lt;a" target="_blank"&gt;GetInstallInfo" rel="nofollow" target="_blank"&amp;gt;http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=GetInstallInfo_method]GetInstallInfo&lt;/A&gt;&lt;SPAN&gt; method (9.3 help) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 13:34:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gp-project-not-working-with-shorthand-of-prj/m-p/679508#M52665</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-05-15T13:34:23Z</dc:date>
    </item>
  </channel>
</rss>

