Hi,
I was wondering if there’s a way in ArcGIS Pro to accomplish the following:
I have specific boundaries, say 3 boundaries, that are fixed, and I want a polygon of x area in acres, say 40 for simplicity. I want to have the program calculate the fourth boundary such that my polygon will satisfy the fixed boundary constraints and total EXACTLY 40 acres.
Years ago I did this in a CAD program. Is this kind of calculation doable in GIS, and if so, how?
There are no built in tools.
Are there only 4 bounds or are there more than 4, but only 3 are fixed?
If there are only 4 bounds, aAre the 3 other bounds fixed and regular in geometry?
The simplest example would be front and both sides are fixed in position and you wish to extend the back line until the required area is reached.
Examples of the geometry you are working with help
Hi Dan,
Ok, here's an example of a shape (the selected one). Say you wanted to use the current shape but reduce the amount of area in a straight E-W slice moving southward from the top, being faithful to the outside borders.
Alternatively, say you wanted to add area to the polygon by filling in the empty space between the selected polygon and the red polygon.
Are there good ways to do this? What do you mean, to extend the back line? How would you do this to reach the desired area?
That is an interesting problem.
The "back" line is your top. So effectively, you want to start moving a line parallel to the bottom of your green area.
Here is an example of how the splitting and area calculations will go. I use numpy and arcpy, so bear with me.
K #---- a polygon in the shape of the letter K
array([[ 0.00, 0.00],
[ 2.00, 10.00],
[ 4.00, 10.00],
[ 3.00, 5.00],
[ 6.00, 10.00],
[ 8.00, 10.00],
[ 5.00, 4.00],
[ 6.00, 0.00],
[ 4.00, 0.00],
[ 3.00, 3.00],
[ 2.00, 0.00],
[ 0.00, 0.00]])
# ---- now a cutting polyline parallel to the x-axis
p_line = np.array([[-1., 7.], [11., 7.]])
# ---- create some arcpy geometries
SR = "NAD 1983 CSRS MTM 9"
pgon = Polygon(Array([Point(*xy) for xy in K]), SR) # --- polygon
pline = Polyline(Array([Point(*xy) for xy in p_line]), SR) # --- cutter polyline
#
# ----- time to slice and dice
pgon.area # --- polygons area first
43.0
# --- cut the polygon to yield a top and bottom part
bits = pgon.cut(pline)
# --- area calculations for the bits
bits[0].area
12.449999999720603
bits[1].area
30.549999998882413
Now the images before and after splitting
Now the cutting and area calculations can obviously be put into a loop stopping when your desired area is obtained.
As for the second options, I would modify the original polygon and extend the vertical eastern line northward until the green-red area is filled in, and repeat the procedure.
Hope this gives you some ideas.
Ok, so from here, how do you apply the code to an existing polygon feature class to actually split a polygon (or just create a line feature class that represents where the cutter stops)? Also, where would you define the orientation of the cutter polyline (N-S, maybe E-W)? I will need some help with that.
create cutters as polyline featureclass. Orient them as you see fit E-W or N-S, just make sure each polyline crosses the polygon boundary... it doesn't need to be exact
I created some polygon/polyline tools you might want to try
Polygon Polyline Tools for Pro - Esri Community
The download link is there in the link. I haven't played with it much lately, so if you have any issues let me know
PS... Only use projected data,. When you split up the polygon, you could do a cumulative sum to get the main bits, then repeat with a fine-tuned slicing around the potential division line. Depends on how accurate you need your divisions. If 8 of 10 slices meet your requirements, then you could union those polygon bits to get one continuous area.
Have fun
PS Transect lines can be used to create the cutters to use in split polygons
Ok, so the Split Polys tool in your toolkit would be sufficient to accomplish this task then?