1

I need to create a buffer with a predefined area, my inputs are points, at first I tried it by calculating the area that each buffer may have and then giving the radius as an input, but then I have to dissolve the buffers polygons so the area change.

Is there some tool that can do this?

4
  • Area is pi * r * r, so r is sqrt( area / pi ), certainly, but if your points' buffers overlap you've got an NP Hard problem on your hands. It doesn't make sense that this would have needed to be solved. Perhaps you should take a step back and explain why you need this.
    – Vince
    Jul 20, 2019 at 3:02
  • Are you creating single polygon?
    – FelixIP
    Jul 20, 2019 at 5:24
  • If you need an ArcPy solution then please provide a code attempt. However, it sounds like you should explain more to figure what the GUI offers first.
    – PolyGeo
    Jul 20, 2019 at 5:33
  • the idea is that all the polygons must sum a final area, but they overlap so I have to merge them Jul 21, 2019 at 3:53

1 Answer 1

1

You can get very accurate estimate by using any root finding algorithm, e.g. bisection.

At given dimensions:

enter image description here

total area of 3 circles is 94247.7796. We can get very close to the same area for dissolved polygon by simply playing with radius:

import arcpy, math
from arcpy import env
resultFC="c:/scratch/scratch.gdb/dissolved"
target=94247.779608
result=arcpy.GetCount_management("POINTS")
nNodes=int(float(result.getOutput(0)))
##find lower limit for radius and set upper one
low=math.pow(target/nNodes/math.pi,0.5)
high=5*low
g=arcpy.Geometry()
iterCount=0
while True:
    if (high-low)<0.01:break
    mid=(high+low)/2
    pgon=arcpy.Buffer_analysis("POINTS",g, mid, "FULL", "ROUND", "ALL")[0]
    curArea=pgon.area
    if curArea<target:low=mid
    else:high=mid
    iterCount+=1
arcpy.AddMessage("\nTarget = {:6.2f}\nArea = {:6.2f}\nRadius = {:6.2f}\nIterations = {}\n".
                 format(target,curArea,mid,iterCount))
arcpy.CopyFeatures_management([pgon],resultFC)

enter image description here

Script messages:

  • Target = 94247.78
  • Area = 94245.82
  • Radius = 110.97
  • Iterations = 16

As one can see the difference between target and result is a couple of square meters or 0.002%.

1
  • it works pretty fine, thank you Jul 24, 2019 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.