<?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: Projecting features to dataset in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/projecting-features-to-dataset/m-p/220590#M17046</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the help Dan. I ended up just projecting the dataset as a whole. I hadn't realized the project tool supported that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 May 2011 18:51:56 GMT</pubDate>
    <dc:creator>MathewCoyle</dc:creator>
    <dc:date>2011-05-26T18:51:56Z</dc:date>
    <item>
      <title>Projecting features to dataset</title>
      <link>https://community.esri.com/t5/python-questions/projecting-features-to-dataset/m-p/220588#M17044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all, I am having some problems projecting data from a dataset into another dataset. The output always seems to go to the root output geodatabase location, instead of the defined dataset. I've tried making the output dataset the workspace and still it does not go there. Is this working as intended and I am just missing something? Here is the code below. I eventually hope to be able to loop through multiple datasets, but I have it hardcoded to just get it to do one for now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am able to do other exports and I checked to make sure they have the same spatial reference. Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
sde = r"D:\sde_transit\sde1.gdb\\"
output = r"D:\sde_transit\sdeNAD83.gdb\\"
arcpy.env.workspace = sde
outCS = r"C:\Program Files (x86)\ArcGIS\Desktop10.0\Coordinate Systems\Projected Coordinate Systems\UTM\NAD 1983\NAD 1983 UTM Zone 12N.prj"
transformation = r"NAD_1927_To_NAD_1983_NTv2_Canada"
inCS = r"C:\Program Files (x86)\ArcGIS\Desktop10.0\Coordinate Systems\Projected Coordinate Systems\UTM\NAD 1927\NAD 1927 UTM Zone 12N.prj"

dsList = arcpy.ListDatasets("", "Feature")
fcList = arcpy.ListFeatureClasses("","",dsList[3])
for feature in fcList:
 desc = arcpy.Describe(feature)
 print desc.name
 featout = output+dsList[3]+"\\"+desc.name
 print featout
 arcpy.Project_management(feature, featout, outCS, transformation, inCS)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2011 16:40:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/projecting-features-to-dataset/m-p/220588#M17044</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-05-25T16:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Projecting features to dataset</title>
      <link>https://community.esri.com/t5/python-questions/projecting-features-to-dataset/m-p/220589#M17045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;this should get ya going. I didn't see the need for the .describe since your end goal is to loop through datasets/features anyway. Take note of the "*" wildcards in the listdatasets and listfeatureclasses methods. You could enter "utilities*" to only loop through all feat. datasets that begin with "utilities".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;dsList = arcpy.ListDatasets("*", "Feature")
for dataset in dsList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.workspace = sde + "\\" + dataset
&amp;nbsp;&amp;nbsp;&amp;nbsp; fcList = arcpy.ListFeatureClasses("*")
&amp;nbsp;&amp;nbsp;&amp;nbsp; for feature in fcList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.workspace = dataset + "\\" + feature
 featout = output + dataset + "\\" feature
 print featout
 arcpy.Project_management(feature, featout, outCS, transformation, inCS)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:45:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/projecting-features-to-dataset/m-p/220589#M17045</guid>
      <dc:creator>danbecker</dc:creator>
      <dc:date>2021-12-11T10:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Projecting features to dataset</title>
      <link>https://community.esri.com/t5/python-questions/projecting-features-to-dataset/m-p/220590#M17046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the help Dan. I ended up just projecting the dataset as a whole. I hadn't realized the project tool supported that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 18:51:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/projecting-features-to-dataset/m-p/220590#M17046</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-05-26T18:51:56Z</dc:date>
    </item>
  </channel>
</rss>

