<?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: Select features by bounding rectangle in Python in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/select-features-by-bounding-rectangle-in-python/m-p/669743#M22283</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you looked at the Split tool in Analysis toolbox - Extract toolset? It splits input features into multiple output feature classes by specified polygon features, taking the values of a text field of the polygons as the output file names, providing the text values are unquie. You just need to have a text field in your fishnet feature class with a unique string for each polygon. Does this tool do what you wanted?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Aug 2010 21:46:47 GMT</pubDate>
    <dc:creator>DanLee</dc:creator>
    <dc:date>2010-08-06T21:46:47Z</dc:date>
    <item>
      <title>Select features by bounding rectangle in Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-features-by-bounding-rectangle-in-python/m-p/669740#M22280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Howdy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently attempting to 'tile' a line shapefile (a river &amp;amp; stream layer) by selecting the line features which are contained within bounding rectangles. These bounding rectangles comprise a fishnet which has been converted to a polygon shapefile. The fishnet's attribute table is populated by values for the upper left and bottom right geographic coordinates of each individual bounding rectangle. The fishnet is 60x60, therefore the output should be 3600 individual line shapefiles. Unfortunately, I only have the single, giant 60x60 fishnet. Even if I decided to make small extent rectangles to do the query, I would need 3600 of them...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to write a Python script which will accomplish this task, and was considering gp.selectlayerbyattribute or gp.selectlayerbylocation. I could also use gp.searchcursor to grab the coordinates of each rectangle. However, I'm not quite sure how to select features from one layer based upon the attributes or location of another layer using Python (nor do I think that such a query would work for my project). I also do not know how I would use the coordinate output of gp.searchcursor for a spatial query in Python. Hope this all makes sense.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be easy to loop this 3600 times if I knew how to go about selecting the features. I'll eventually have to convert the 3600 .shp files to .lyr, and then do a Layer to KML in Python..... but that requires no more than 10 lines of code, which I already have.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Much appreciated,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Craig&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 18:22:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-features-by-bounding-rectangle-in-python/m-p/669740#M22280</guid>
      <dc:creator>CraigMalkmes</dc:creator>
      <dc:date>2010-07-30T18:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Select features by bounding rectangle in Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-features-by-bounding-rectangle-in-python/m-p/669741#M22281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Why don't you do a line on polygon intersect?&amp;nbsp; it would be a lot quicker.&amp;nbsp; then you could use Dan Patterson's split layer by attribute script @ &lt;/SPAN&gt;&lt;A href="http://arcscripts.esri.com/details.asp?dbid=14127"&gt;http://arcscripts.esri.com/details.asp?dbid=14127&lt;/A&gt;&lt;SPAN&gt; to export to individual shapefiles.&amp;nbsp; if you really want to code, take a look here &lt;/SPAN&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=297920&amp;amp;mc=5#msgid930410"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=297920&amp;amp;mc=5#msgid930410&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this should get you started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 19:42:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-features-by-bounding-rectangle-in-python/m-p/669741#M22281</guid>
      <dc:creator>JeffLee</dc:creator>
      <dc:date>2010-07-30T19:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Select features by bounding rectangle in Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-features-by-bounding-rectangle-in-python/m-p/669742#M22282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Probably the most efficient method would be to figure out what tile contained each line features centroid. That way you didn't have to break any of the line feature into two or more pieces.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use the FeaturetoPoint or FeatureVerticesToPoint tools and then the intersect or identity tools to identify what tile each point resides in.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 20:12:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-features-by-bounding-rectangle-in-python/m-p/669742#M22282</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2010-07-30T20:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Select features by bounding rectangle in Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-features-by-bounding-rectangle-in-python/m-p/669743#M22283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you looked at the Split tool in Analysis toolbox - Extract toolset? It splits input features into multiple output feature classes by specified polygon features, taking the values of a text field of the polygons as the output file names, providing the text values are unquie. You just need to have a text field in your fishnet feature class with a unique string for each polygon. Does this tool do what you wanted?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Aug 2010 21:46:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-features-by-bounding-rectangle-in-python/m-p/669743#M22283</guid>
      <dc:creator>DanLee</dc:creator>
      <dc:date>2010-08-06T21:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select features by bounding rectangle in Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-features-by-bounding-rectangle-in-python/m-p/669744#M22284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Requires ArcInfo license...nice if you have it&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000800000006000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000800000006000000.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Aug 2010 00:59:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-features-by-bounding-rectangle-in-python/m-p/669744#M22284</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2010-08-07T00:59:46Z</dc:date>
    </item>
  </channel>
</rss>

