<?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 Split polygon in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/split-polygon/m-p/638262#M49750</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am looking for a way to split a polygon envelope into 4 equal size pieces.&amp;nbsp; I have used the Feature Envelope to Polygon GP tool, I then added fields to get the mid x and mid y of the envelope.&amp;nbsp; Now, I want to split that polygon into 4 pieces.&amp;nbsp; Does anyone know how to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Casey&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Sep 2011 13:25:01 GMT</pubDate>
    <dc:creator>CaseyBentz</dc:creator>
    <dc:date>2011-09-28T13:25:01Z</dc:date>
    <item>
      <title>Split polygon</title>
      <link>https://community.esri.com/t5/python-questions/split-polygon/m-p/638262#M49750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am looking for a way to split a polygon envelope into 4 equal size pieces.&amp;nbsp; I have used the Feature Envelope to Polygon GP tool, I then added fields to get the mid x and mid y of the envelope.&amp;nbsp; Now, I want to split that polygon into 4 pieces.&amp;nbsp; Does anyone know how to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Casey&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 13:25:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/split-polygon/m-p/638262#M49750</guid>
      <dc:creator>CaseyBentz</dc:creator>
      <dc:date>2011-09-28T13:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Split polygon</title>
      <link>https://community.esri.com/t5/python-questions/split-polygon/m-p/638263#M49751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would recommend using the '&lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000002q000000"&gt;Create Fishnet&lt;/A&gt;&lt;SPAN&gt;' tool to create a polygon envelope of 4 equal pieces.&amp;nbsp; You can use a feature class as the extent and then simply specify the number of columns and rows.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 15:44:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/split-polygon/m-p/638263#M49751</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2011-09-28T15:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Split polygon</title>
      <link>https://community.esri.com/t5/python-questions/split-polygon/m-p/638264#M49752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jake.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have just stumbled onto this tool myself.&amp;nbsp; I have a feature class of hundreds of polygons and I want this for each one.&amp;nbsp; I have tried using it in a Model using Make Feature Layer for each one of my polygons and it does not appear to respect the geometry of feature layer but the geometry of the feature class.&amp;nbsp; Any ideas?&amp;nbsp; I have resorted to exporting each feature to its own feature class.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 15:47:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/split-polygon/m-p/638264#M49752</guid>
      <dc:creator>CaseyBentz</dc:creator>
      <dc:date>2011-09-28T15:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Split polygon</title>
      <link>https://community.esri.com/t5/python-questions/split-polygon/m-p/638265#M49753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Casey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to get this to work with the following code.&amp;nbsp; It will loop through each feature in a feature class and create a 2x2 fishnet for each feature.&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
env.workspace = r"C:\temp\python\test.gdb"
env.overwriteOutput = True

fc = "Airports"

rows = arcpy.SearchCursor(fc)
for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; x = row.OBJECTID
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management(fc, "fc_lyr", "OBJECTID = " + str(x))
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows2 = arcpy.SearchCursor("fc_lyr")
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row2 in rows2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XMIN = row2.shape.extent.XMin
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YMIN = row2.shape.extent.YMin
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XMAX = row2.shape.extent.XMax
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YMAX = row2.shape.extent.YMax
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YMIN2 = row2.shape.extent.YMin + 10
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orig_coord = str(XMIN) + " " + str(YMIN)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y_axis = str(XMIN) + " " + str(YMIN2)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; corner_coord = str(XMAX) + " " + str(YMAX)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CreateFishnet_management("Fishnet_" + str(x), orig_coord, y_axis, "0", "0", "2", "2", corner_coord, "NO_LABELS", "", "POLYGON")

del row, rows, row2, rows2&amp;nbsp; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:08:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/split-polygon/m-p/638265#M49753</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-12T03:08:29Z</dc:date>
    </item>
  </channel>
</rss>

