<?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: Trying to project a layer in a Python script in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249237#M8555</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This seems like related problem, I'm updating an arcgisscripting 9.3 python script to arcpy.&amp;nbsp; The In_Memory layer errors out on the Project geoprocess.&lt;BR /&gt;&lt;BR /&gt;ERROR 000944: Output feature class cannot be in the in_memory workspace.&lt;BR /&gt;&lt;BR /&gt;Here's the test code, minus the bogus projection info string.&lt;BR /&gt;&lt;BR /&gt;import sys, string, os, shutil, arcpy&lt;BR /&gt;&lt;BR /&gt;# Create the Geoprocessor object and set variables&lt;BR /&gt;arcpy.env.overwriteOutput = 1&lt;BR /&gt;&lt;BR /&gt;Ticket_Envelope = r"C:\Temp\Matt.shp"&lt;BR /&gt;Ticket_Layer = r"In_Memory\Ticket_Layer"&lt;BR /&gt;arcpy.Project_management(Ticket_Envelope, Ticket_Layer, "blah blah blah", "", "")&lt;BR /&gt;&lt;BR /&gt;So "In_Memory" feature classes seem to work like normal, with other geoprocesses in ArcPy.&amp;nbsp; However, Projection appears to be an exception And\Or a bug.&amp;nbsp; Any insight?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Matthew,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is actually a known limitation in the software.&amp;nbsp; The error message description can be found here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00vp0000000m000944.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00vp0000000m000944.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, the help section for the Project tool now mentions that "Although in-memory feature classes are valid input to the tool, output cannot be in the in_memory workspace."&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000007m000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000007m000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 May 2011 16:04:45 GMT</pubDate>
    <dc:creator>DarrinChristy</dc:creator>
    <dc:date>2011-05-25T16:04:45Z</dc:date>
    <item>
      <title>Trying to project a layer in a Python script</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249227#M8545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to write a python script to do a batch extraction of pixel values.&amp;nbsp; I have a feature class in a file geodatabase that has about 6500 records in it, and I also have a list of rasters.&amp;nbsp; I am trying to write code that will select one point at a time based on an attribute called 'cellnum', scroll through the list of rasters and see if the point overlaps with any of the rasters, and if it does, it will extract the pixel value.&amp;nbsp; However, the points are in WGS84 and my rasters are all in different UTM zones.&amp;nbsp; I need to reproject the selected point to match the raster in question (the script doesn't do on-the-fly projections).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, when I try to reproject the selected point, I get errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy
from arcpy import env

env.overwriteOutput = True
env.workspace = "C:/Data/Project.gdb"
env.scratchWorkspace = env.workspace
sort = "points"
inlyr = "in_memory\\sort"
newlyr = "in_memory\\sort2"
hypdir = arcpy.ListRasters("")

arcpy.MakeFeatureLayer_management(sort, inlyr)

rows = arcpy.SearchCursor(inlyr)
for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; center = row.getValue("cellnum")
&amp;nbsp;&amp;nbsp;&amp;nbsp; Expression = "\"cellnum\" = " + str(center)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; if center == 0:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(inlyr, "NEW_SELECTION", Expression)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point = arcpy.SearchCursor(inlyr)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i in point:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for scene in hypdir:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; des = arcpy.Describe(scene)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; descr = arcpy.Describe(inlyr)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sr1 = des.spatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sr2 = descr.spatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if sr1 != sr2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Matching projections..."
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Project_management(inlyr, newlyr, str(sr1.exportToString()))&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000944: Output feature class cannot be in the in_memory workspace.&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;I understand that.&amp;nbsp; So I change 'newlyr' to be "C:/Data/temp_sort.lyr", and I get this error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Create output feature class failed&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;I've tried this also, newlyr = "C:/Data/Project.gdb/temp_sort", but still get an error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Runtime error &amp;lt;type 'exceptions.IOError'&amp;gt;: C:/Data/Project.gdb/temp_sort does not exist&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd rather not reproject the entire point file each time if I don't have to.&amp;nbsp; This script will be run in the future with other datasets that could be much larger.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm at my wit's end.&amp;nbsp; Can anyone shed some light?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a million in advance, this has been giving me headaches for over a week now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 14:14:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249227#M8545</guid>
      <dc:creator>ChristinaHerrick1</dc:creator>
      <dc:date>2011-02-10T14:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to project a layer in a Python script</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249228#M8546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can reproject a Feature Class on the cursor, &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000039000000.htm"&gt;there is an optional Spatial Reference argument you can send to arcpy.SearchCursor&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 16:00:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249228#M8546</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2011-02-10T16:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to project a layer in a Python script</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249229#M8547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In my experience this just does not work. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And it doesn't appear that it was intended to work that way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the documentation for the SearchCursor the spatialReference parameter is defined as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The Spatial Reference of the feature class&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if that param is designed to reproject the fc on the cursor then the doc is poor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Additionally, in the topic named "Setting a cursor's spatial reference" there is the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;By default, the spatial reference of the geometry returned from a search cursor is the same as the feature class opened by the cursor. You can also set the spatial reference on an update or insert cursor.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;which doesn't sound promising for SearchCursor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on some tests i did the spatial reference is not considered when creating the SearchCursor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I wish that it were jscheirer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to get UTM15N measures for features that are in Web Mercator and that would be perfect for me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 17:44:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249229#M8547</guid>
      <dc:creator>KevinGooss</dc:creator>
      <dc:date>2011-02-16T17:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to project a layer in a Python script</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249230#M8548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please file a bug.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 18:21:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249230#M8548</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2011-02-16T18:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to project a layer in a Python script</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249231#M8549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am experiencing this behavior as well. I have noticed that when you drop the sort parameter the issue is not present.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought the forums were for the exchange of ideas to arrive at solutions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;having someone from esri reply and say 'file a bug' is not very helpful nor is it in the spirit of what these forums are used for. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If KG22 files a bug that doesn't help cfw2, myself or any other esri software or forum user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What we need is a workaround for the issue and that typically comes from a lively discussion of the issue on these forums. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's disconcerting to have an esri representative chime in with a solution that doesn't work. Then not take the time to offer a helpful tip or suggestion to arrive at an answer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I alone on this one?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 18:40:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249231#M8549</guid>
      <dc:creator>KG</dc:creator>
      <dc:date>2011-02-16T18:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to project a layer in a Python script</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249232#M8550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please file an issue with Esri tech support so it can be investigated, tested and fixed for a future SP, Quick Fix, or release.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 00:02:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249232#M8550</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2011-02-17T00:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to project a layer in a Python script</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249233#M8551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Using the spatial reference information in the search cursor seems to have worked for me.&amp;nbsp; I'm using a point feature class within a file geodatabase that is in WGS84, and I'm checking each point for overlap with a list of rasters.&amp;nbsp; I have something that looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env
from arcpy import management as dm

inspace = "C:/test"
env.workspace = inspace

sort = "pointfile"
hypdir = arcpy.ListRasters("","TIF")

dm.MakeFeatureLayer(sort,inlyr)
for scene in hypdir:
&amp;nbsp;&amp;nbsp; des = arcpy.Describe(scene)
&amp;nbsp;&amp;nbsp; sr1 = des.spatialReference

&amp;nbsp;&amp;nbsp; rows = arcpy.SearchCursor(inlyr, "", sr1)
&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID = row.getValue("ID")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Expression = "\"ID \" = " + str(ID)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dm.SelectLayerByAttribute(inlyr, "NEW_SELECTION", Expression&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;... and so on.&amp;nbsp; Since my rasters are all in different UTM zones, the extracted values would all be 'Null' without the 'sr1' parameter in the search cursor (that's what prompted me to originally post).&amp;nbsp;&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:23:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249233#M8551</guid>
      <dc:creator>ChristinaHerrick1</dc:creator>
      <dc:date>2021-12-11T12:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to project a layer in a Python script</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249234#M8552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Web Mercator? Isn't this just a sop for a simple sphere that G**gle insists that must be used to map the world? Its not a proper projection because it has no datum. I think that is why there is no projection using a cursor option. Try pretending it is WGS84 and suck hard on the registration errors, which is evident on every road network overlay of the images in GE or GM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use the projection option on cursors and it works for me. I can even get the transform between two datums to work as well if I match the projection names exactly to suit the transform.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I could not find an easy way to project a shape object. I had to write out a temporary featureclass to the scratch workspace, not in_memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(I got the shape object from an interactive pick using a tool, and then I needed the pick coordinate in lat/long to query a server.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 00:46:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249234#M8552</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2011-03-09T00:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to project a layer in a Python script</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249235#M8553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My experience has been that when a feature layer has a selection set, then the coordinates returned by a cursor fail to project. No error, they just aren't projected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Mar 2011 00:02:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249235#M8553</guid>
      <dc:creator>StevePeaslee</dc:creator>
      <dc:date>2011-03-12T00:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to project a layer in a Python script</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249236#M8554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This seems like related problem, I'm updating an arcgisscripting 9.3 python script to arcpy.&amp;nbsp; The In_Memory layer errors out on the Project geoprocess.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000944: Output feature class cannot be in the in_memory workspace.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the test code, minus the bogus projection info string.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import sys, string, os, shutil, arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Create the Geoprocessor object and set variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.overwriteOutput = 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ticket_Envelope = r"C:\Temp\Matt.shp"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ticket_Layer = r"In_Memory\Ticket_Layer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Project_management(Ticket_Envelope, Ticket_Layer, "blah blah blah", "", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So "In_Memory" feature classes seem to work like normal, with other geoprocesses in ArcPy.&amp;nbsp; However, Projection appears to be an exception And\Or a bug.&amp;nbsp; Any insight?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2011 22:07:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249236#M8554</guid>
      <dc:creator>MattDeitemeyer</dc:creator>
      <dc:date>2011-03-17T22:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to project a layer in a Python script</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249237#M8555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This seems like related problem, I'm updating an arcgisscripting 9.3 python script to arcpy.&amp;nbsp; The In_Memory layer errors out on the Project geoprocess.&lt;BR /&gt;&lt;BR /&gt;ERROR 000944: Output feature class cannot be in the in_memory workspace.&lt;BR /&gt;&lt;BR /&gt;Here's the test code, minus the bogus projection info string.&lt;BR /&gt;&lt;BR /&gt;import sys, string, os, shutil, arcpy&lt;BR /&gt;&lt;BR /&gt;# Create the Geoprocessor object and set variables&lt;BR /&gt;arcpy.env.overwriteOutput = 1&lt;BR /&gt;&lt;BR /&gt;Ticket_Envelope = r"C:\Temp\Matt.shp"&lt;BR /&gt;Ticket_Layer = r"In_Memory\Ticket_Layer"&lt;BR /&gt;arcpy.Project_management(Ticket_Envelope, Ticket_Layer, "blah blah blah", "", "")&lt;BR /&gt;&lt;BR /&gt;So "In_Memory" feature classes seem to work like normal, with other geoprocesses in ArcPy.&amp;nbsp; However, Projection appears to be an exception And\Or a bug.&amp;nbsp; Any insight?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Matthew,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is actually a known limitation in the software.&amp;nbsp; The error message description can be found here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00vp0000000m000944.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00vp0000000m000944.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, the help section for the Project tool now mentions that "Although in-memory feature classes are valid input to the tool, output cannot be in the in_memory workspace."&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000007m000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000007m000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2011 16:04:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-project-a-layer-in-a-python-script/m-p/249237#M8555</guid>
      <dc:creator>DarrinChristy</dc:creator>
      <dc:date>2011-05-25T16:04:45Z</dc:date>
    </item>
  </channel>
</rss>

