<?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 Select a feature by XY coordinates in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219956#M16959</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have three point features and a line feature. Each points of the point features are connected by the line feature (network). I am working on transfering attributes from the point features to the line feature. I previously have done that using Arcpy and Xtools. However, due to the processing time efficiency, I prefer to do that using Arcpy only. This will be possible if I can select a point feature based on the XY coordinate of an end point of selected network line. Is it possible to select a point feature by XY coordinate? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gi-Choul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Aug 2012 18:36:36 GMT</pubDate>
    <dc:creator>Gi-ChoulAhn</dc:creator>
    <dc:date>2012-08-20T18:36:36Z</dc:date>
    <item>
      <title>Select a feature by XY coordinates</title>
      <link>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219956#M16959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have three point features and a line feature. Each points of the point features are connected by the line feature (network). I am working on transfering attributes from the point features to the line feature. I previously have done that using Arcpy and Xtools. However, due to the processing time efficiency, I prefer to do that using Arcpy only. This will be possible if I can select a point feature based on the XY coordinate of an end point of selected network line. Is it possible to select a point feature by XY coordinate? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gi-Choul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 18:36:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219956#M16959</guid>
      <dc:creator>Gi-ChoulAhn</dc:creator>
      <dc:date>2012-08-20T18:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Select a feature by XY coordinates</title>
      <link>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219957#M16960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If this is a network I would look into the Infrastructure Network Editing Template as there are already prebuilt functions within the Dynamic Value table to do this for you. Although if you are looking for a python method I would recommend using SelectLayerByAttribute&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using this method you could pass a query to this tool assuming you have X and Y coordinate fields in your attribute table.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 12:41:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219957#M16960</guid>
      <dc:creator>KenCarrier</dc:creator>
      <dc:date>2012-08-21T12:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Select a feature by XY coordinates</title>
      <link>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219958#M16961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you, Ken, for your reply. I don't populate X Y coordinate fields in the attribute table. The point features are stored in file geodatabase and are pretty big. I don't modify attribute tables of the point features during my program run. But I see your point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does that mean that selecting a feature by XY coordinates is not possible in Python besides attribute selection?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gi-Choul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 16:53:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219958#M16961</guid>
      <dc:creator>Gi-ChoulAhn</dc:creator>
      <dc:date>2012-08-21T16:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select a feature by XY coordinates</title>
      <link>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219959#M16962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The only other thing I can think of is this;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Add XY Coordinates tool to an in memory object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Perform a SelectLayerByAttribute &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once you have your selection do your processing&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 17:28:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219959#M16962</guid>
      <dc:creator>KenCarrier</dc:creator>
      <dc:date>2012-08-21T17:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Select a feature by XY coordinates</title>
      <link>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219960#M16963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's interesting, Ken. I would like to see an example of setting up "in memory with X,Y coordinate points". Could you share one?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gi-Choul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 17:38:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219960#M16963</guid>
      <dc:creator>Gi-ChoulAhn</dc:creator>
      <dc:date>2012-08-21T17:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Select a feature by XY coordinates</title>
      <link>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219961#M16964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I solved my problem using pretty basic approach. For a selected line, I (1) retrieved XY coordinates of start and end of the line, (2) used SelectLayerByLocation to find any point features intersected by the line, (3) extracted XY coordinates of the intersected points, and (4) finally compared the start and end XY coordinates of the line with XY coordinates from point features. Once FROM point and TO point were identified, attribute transfer was just a matter of reading attribute from point and writing to the line attribute. This process was looped through the whole line segments.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gi-Choul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2012 16:13:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-a-feature-by-xy-coordinates/m-p/219961#M16964</guid>
      <dc:creator>Gi-ChoulAhn</dc:creator>
      <dc:date>2012-08-23T16:13:49Z</dc:date>
    </item>
  </channel>
</rss>

