<?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 MakeFeatureLayer where_clause selection not maintained during projection in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/makefeaturelayer-where-clause-selection-not/m-p/700627#M23216</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="plain" name="code"&gt;#import, environment etc.. is omitted for brevity&amp;nbsp; prjString = "PROJCS['World_Mercator',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Mercator'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',0.0],PARAMETER['Standard_Parallel_1',0.0],UNIT['Meter',1.0]];-20037700 -30198300 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision"&amp;nbsp; #Create a layer based only on rows with 'src' attribute equal to 'YVR' arcpy.MakeFeatureLayer_management("FlightPaths", "YVR_layer", "\"src\" = 'YVR'")&amp;nbsp; #Project the layer data arcpy.Project_management("YVR_layer", "YVR_Proj", prjString)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem I'm encountering is that Project is selecting the full source data set rather than the layer selection. The arcpy.MakeFeatureLayer_management operation has created the layer 'YVR_layer' from 'FlightPaths' successfully and selected the desired rows. When I pass 'YVR_layer' to arcpy.Project_management it projects all the rows from 'FlightPaths' rather than those from 'FlightPaths' as selected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea why this may be happening. Data is included below.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 May 2012 13:49:28 GMT</pubDate>
    <dc:creator>CyrilleMedard_de_Chardon</dc:creator>
    <dc:date>2012-05-18T13:49:28Z</dc:date>
    <item>
      <title>MakeFeatureLayer where_clause selection not maintained during projection</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makefeaturelayer-where-clause-selection-not/m-p/700627#M23216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="plain" name="code"&gt;#import, environment etc.. is omitted for brevity&amp;nbsp; prjString = "PROJCS['World_Mercator',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Mercator'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',0.0],PARAMETER['Standard_Parallel_1',0.0],UNIT['Meter',1.0]];-20037700 -30198300 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision"&amp;nbsp; #Create a layer based only on rows with 'src' attribute equal to 'YVR' arcpy.MakeFeatureLayer_management("FlightPaths", "YVR_layer", "\"src\" = 'YVR'")&amp;nbsp; #Project the layer data arcpy.Project_management("YVR_layer", "YVR_Proj", prjString)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem I'm encountering is that Project is selecting the full source data set rather than the layer selection. The arcpy.MakeFeatureLayer_management operation has created the layer 'YVR_layer' from 'FlightPaths' successfully and selected the desired rows. When I pass 'YVR_layer' to arcpy.Project_management it projects all the rows from 'FlightPaths' rather than those from 'FlightPaths' as selected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea why this may be happening. Data is included below.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 13:49:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makefeaturelayer-where-clause-selection-not/m-p/700627#M23216</guid>
      <dc:creator>CyrilleMedard_de_Chardon</dc:creator>
      <dc:date>2012-05-18T13:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: MakeFeatureLayer where_clause selection not maintained during projection</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makefeaturelayer-where-clause-selection-not/m-p/700628#M23217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Selection and definition query on layers are not supported by the Project tool: &lt;/SPAN&gt;&lt;STRONG&gt;all&lt;/STRONG&gt;&lt;SPAN&gt; features in the dataset referenced by the layer will be projected. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to project selected features only, consider using the Copy Features tool. Copy Features only copies selected features and honors the output coordinate system geoprocessing environment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, after Make Feature Layer, set the output coordinate system environment with your desired coordinate system and then run Copy Features.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 15:18:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makefeaturelayer-where-clause-selection-not/m-p/700628#M23217</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2012-05-18T15:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: MakeFeatureLayer where_clause selection not maintained during projection</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makefeaturelayer-where-clause-selection-not/m-p/700629#M23218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Over on &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://gis.stackexchange.com/questions/24266/using-arcpy-what-is-the-most-efficient-way-of-projecting-a-selection-from-a-larg/25553#25553" rel="nofollow" target="_blank"&gt;Stack Exchange GIS&lt;/A&gt;&lt;SPAN&gt; I have posted some code to demonstrate that what Cyrille is trying to do will work if you do the Make Feature Layer with a where clause by starting on a shapefile.&amp;nbsp; It does not if you start on a file geodatabase feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Consequently, it appears to be a bug with either Make Feature Layer or Project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The workaround of using Copy Features on the file geodatabase feature class to create an equivalent shapefile first is not desirable so I think the next step should be to find/submit a bug report on this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think Nobbir's workaround should work too, and be preferable because it does not duplicate data, but I don't think Cyrille's procedure should not work on a feature class when it does on a shapefile.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Graeme&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 May 2012 03:08:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makefeaturelayer-where-clause-selection-not/m-p/700629#M23218</guid>
      <dc:creator>GraemeBrowning</dc:creator>
      <dc:date>2012-05-19T03:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: MakeFeatureLayer where_clause selection not maintained during projection</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makefeaturelayer-where-clause-selection-not/m-p/700630#M23219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I agree with Graeme that this inconsistent behaviour should be categorized more as a geodatabase bug than something that is not supported.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have used the Copy Features method for my work but was looking for a more efficient manner.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for clearing up the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cyrille&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2012 06:16:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makefeaturelayer-where-clause-selection-not/m-p/700630#M23219</guid>
      <dc:creator>CyrilleMedard_de_Chardon</dc:creator>
      <dc:date>2012-05-21T06:16:28Z</dc:date>
    </item>
  </channel>
</rss>

