In this thread Split a Shapele polygons equally , Jayanta Poddar provides a solution in case you have Parcel Fabric.
I think I may have done something in the past using Python, and there may be some tools already developed to solve this challenge . Any specific requirements about the output shapes of the polygons?
I would just need 5 blocks of 40 acres. Nothing fancy
So, it doesn't matter how the polygons are shaped? No restrictions whatsoever?
You are correct sir. If this helps, this is a mining plan that can only mine 40 acres each year. The goal is to span 40 acres over the span of 5 years. I have researched other options throughout the forum and the most often cited solution was the fishnet tool which didn't help me much at all. I figured there would be a pragmatic tool readily available in ArcGIS give this task might often occur in the real world.
Is it possible for you to share the polygon (attach it to the thread)? I found another thread and the code could be adapted to create the 5 polygon.
As Xander Bakker is suggesting, I would suppose there would be some preferences that may lead to the optimal shapes. The first thing that comes to mind is a pragmatic "what it the minimum sized strip of land that can be mined?". This may be governed by something as simple as the minimum-sized bulldozer/excavator that it is practical/economical to work with. This may come into play as the output of the split may include a long thin sliver.
Also, for economies of scale, would it be best if the polygon was all compact, or would it instead be OK to sprawl?
Or is there there a central processing location, then the whole site needs to be split into 5 with each "slice" touching the central area?
If you have not already, I'd come up with all the factors that need to be considered. This is important as once those are established, that may lead to totally different solution processes on the technical side to come up with the split. There are several folks on GeoNet who are really good at the many ways to "slice and dice" a polygon, but to get them involved the criteria would need to be known, as the solutions are varied and explaining them can get complicated.
Chris Donohue, GISP
The Python script by FC Basson in https://community.esri.com/thread/181265 might meet your needs.
FC provided a nice implementation here
https://community.esri.com/thread/181265#comment-627648
based on percentage.. but whatever.
As pointed out... in the absence of rules of division, you will get a litany of …. "ya but..." people wanting it to be a 'real' lot.... it has to be oriented to the road... it is too skinny/fat/round/square.
Unless you have a gazillion to do. Make a really fine fishnet of known area. Select the ones that fall within the polygon... dump the rest. You will have an approximation of the total area by the fishnet cells within the polygon area. Do some math... to subdivide into 4, simply choose 25% of the cells, repeat with the next 25% etc etc.
Ignoring the fiddly-bits around the edges, you will have one approximation of the subdivision of the polygon. It may not be the best looking, and may not be fancy, but it is done by approximation. From that, you can fine-tune or refine the problem
Based on the script mentioned before I created something.
It simply moves a vertical lines from left to right and starts to cut the polygon until a polygon is found that is within the tolerance.
See code below:
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">main</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="comment token"><SPAN># based on: </SPAN><A class="jive-link-comment-small" href="https://community.esri.com/thread/181265#comment-627648" target="_blank">https://community.esri.com/message/627405#comment-627648</A></SPAN> <SPAN class="comment token"><SPAN># author: </SPAN><A class="jive-link-profile-small jiveTT-hover-user" data-containerid="-1" data-containertype="-1" data-objectid="20360" data-objecttype="3" href="https://community.esri.com/people/fcbassongis" target="_blank">https://community.esri.com/people/fcbassongis</A></SPAN> <SPAN class="keyword token">import</SPAN> arcpy <SPAN class="comment token"># path to input and output featurecladss</SPAN> fc_in <SPAN class="operator token">=</SPAN> r<SPAN class="string token">'C:\GeoNet\SplitPolygon\Surface Mining Plan.shp'</SPAN> fc_out <SPAN class="operator token">=</SPAN> r<SPAN class="string token">'C:\GeoNet\SplitPolygon\datos.gdb\split_polygons06'</SPAN> <SPAN class="comment token"># number of splits</SPAN> splits <SPAN class="operator token">=</SPAN> <SPAN class="number token">5</SPAN> <SPAN class="comment token"># get first (only) polygon and extent</SPAN> polygon <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>da<SPAN class="punctuation token">.</SPAN>SearchCursor<SPAN class="punctuation token">(</SPAN>fc_in<SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="string token">'SHAPE@'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN>next<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN> extent <SPAN class="operator token">=</SPAN> polygon<SPAN class="punctuation token">.</SPAN>extent sr <SPAN class="operator token">=</SPAN> polygon<SPAN class="punctuation token">.</SPAN>spatialReference <SPAN class="comment token"># start creating vertical lines and cut polygon</SPAN> stepsize <SPAN class="operator token">=</SPAN> <SPAN class="number token">0.2</SPAN> total_area <SPAN class="operator token">=</SPAN> polygon<SPAN class="punctuation token">.</SPAN>area tolerance <SPAN class="operator token">=</SPAN> total_area <SPAN class="operator token">*</SPAN> <SPAN class="number token">0.0001</SPAN> split_polygons <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN> d <SPAN class="operator token">=</SPAN> extent<SPAN class="punctuation token">.</SPAN>XMin <SPAN class="operator token">+</SPAN> stepsize work_pol <SPAN class="operator token">=</SPAN> polygon i <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN> <SPAN class="keyword token">while</SPAN> d <SPAN class="operator token"><</SPAN> extent<SPAN class="punctuation token">.</SPAN>XMax<SPAN class="punctuation token">:</SPAN> i <SPAN class="operator token">+=</SPAN> <SPAN class="number token">1</SPAN> <SPAN class="keyword token">if</SPAN> i <SPAN class="operator token">%</SPAN> <SPAN class="number token">100</SPAN> <SPAN class="operator token">==</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">print</SPAN> <SPAN class="string token">"step: {}"</SPAN><SPAN class="punctuation token">.</SPAN>format<SPAN class="punctuation token">(</SPAN>i<SPAN class="punctuation token">)</SPAN> percentage <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>d <SPAN class="operator token">-</SPAN> extent<SPAN class="punctuation token">.</SPAN>XMin<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">/</SPAN> <SPAN class="punctuation token">(</SPAN>extent<SPAN class="punctuation token">.</SPAN>width<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">*</SPAN> <SPAN class="number token">100.0</SPAN> vertical_line <SPAN class="operator token">=</SPAN> CreateVerticalLine<SPAN class="punctuation token">(</SPAN>d<SPAN class="punctuation token">,</SPAN> extent<SPAN class="punctuation token">,</SPAN> sr<SPAN class="punctuation token">)</SPAN> left_pol<SPAN class="punctuation token">,</SPAN> right_pol <SPAN class="operator token">=</SPAN> CutPolygon<SPAN class="punctuation token">(</SPAN>work_pol<SPAN class="punctuation token">,</SPAN> vertical_line<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">if</SPAN> <SPAN class="operator token">not</SPAN> left_pol <SPAN class="keyword token">is</SPAN> None <SPAN class="operator token">and</SPAN> <SPAN class="operator token">not</SPAN> right_pol <SPAN class="keyword token">is</SPAN> None<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">if</SPAN> abs<SPAN class="punctuation token">(</SPAN>left_pol<SPAN class="punctuation token">.</SPAN>area <SPAN class="operator token">-</SPAN> total_area <SPAN class="operator token">/</SPAN> splits<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token"><</SPAN> tolerance<SPAN class="punctuation token">:</SPAN> split_polygons<SPAN class="punctuation token">.</SPAN>append<SPAN class="punctuation token">(</SPAN>left_pol<SPAN class="punctuation token">)</SPAN> work_pol <SPAN class="operator token">=</SPAN> right_pol d <SPAN class="operator token">+=</SPAN> stepsize <SPAN class="keyword token">if</SPAN> len<SPAN class="punctuation token">(</SPAN>split_polygons<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">==</SPAN> splits <SPAN class="operator token">-</SPAN> <SPAN class="number token">1</SPAN><SPAN class="punctuation token">:</SPAN> split_polygons<SPAN class="punctuation token">.</SPAN>append<SPAN class="punctuation token">(</SPAN>right_pol<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">break</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>CopyFeatures_management<SPAN class="punctuation token">(</SPAN>split_polygons<SPAN class="punctuation token">,</SPAN> fc_out<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">def</SPAN> <SPAN class="token function">CreateVerticalLine</SPAN><SPAN class="punctuation token">(</SPAN>d<SPAN class="punctuation token">,</SPAN> extent<SPAN class="punctuation token">,</SPAN> sr<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN> pnt1 <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>Point<SPAN class="punctuation token">(</SPAN>d<SPAN class="punctuation token">,</SPAN> extent<SPAN class="punctuation token">.</SPAN>YMin <SPAN class="operator token">-</SPAN> <SPAN class="number token">1</SPAN><SPAN class="punctuation token">)</SPAN> pnt2 <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>Point<SPAN class="punctuation token">(</SPAN>d<SPAN class="punctuation token">,</SPAN> extent<SPAN class="punctuation token">.</SPAN>YMax <SPAN class="operator token">+</SPAN> <SPAN class="number token">1</SPAN><SPAN class="punctuation token">)</SPAN> polyline <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>Polyline<SPAN class="punctuation token">(</SPAN>arcpy<SPAN class="punctuation token">.</SPAN>Array<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">[</SPAN>pnt1<SPAN class="punctuation token">,</SPAN> pnt2<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> sr<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">return</SPAN> polyline <SPAN class="keyword token">def</SPAN> <SPAN class="token function">CutPolygon</SPAN><SPAN class="punctuation token">(</SPAN>polygon<SPAN class="punctuation token">,</SPAN> polyline<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">try</SPAN><SPAN class="punctuation token">:</SPAN> polygons <SPAN class="operator token">=</SPAN> polygon<SPAN class="punctuation token">.</SPAN>cut<SPAN class="punctuation token">(</SPAN>polyline<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">return</SPAN> polygons<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> polygons<SPAN class="punctuation token">[</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="keyword token">except</SPAN> Exception <SPAN class="keyword token">as</SPAN> e<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">return</SPAN> None<SPAN class="punctuation token">,</SPAN> None <SPAN class="keyword token">if</SPAN> __name__ <SPAN class="operator token">==</SPAN> <SPAN class="string token">'__main__'</SPAN><SPAN class="punctuation token">:</SPAN> main<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
This results in:
... including a multipart polygon (in green)
ArcGIS Pro has now this tool that can subdivide polygons:
Subdivide Polygon—Data Management toolbox | ArcGIS Desktop
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.