2

I have two datasets - a vector dataset with land cover data and a point dataset. I'm wondering is it possible to create buffers around the points to a set area (not distance) while excluding certain habitats from the buffer.

So the buffer can be any shape, as long as its the required area, but includes only habitats of interest and excludes any polygons with unsuitable habitat.

Any suggestions?

8
  • 2
    Suggest you add some images to your question to explain your issue because when you say things like "..can be any shape...", that's way too vague!
    – Hornbydd
    Commented Feb 6, 2023 at 18:56
  • 1
    gis.stackexchange.com/questions/209047/…
    – FelixIP
    Commented Feb 6, 2023 at 19:24
  • 2
    What's the difference between what you're asking here and doing a normal buffer and an Erase/Difference/Intersect afterward?
    – Vince
    Commented Feb 6, 2023 at 19:52
  • @Hornbydd apologies, will try to come up with images. Essentially the buffer shape would be determined by the amount of unsuitable habitat in area around the point - since I want the area covered by the buffer to be fixed, the buffer would grow until it reached that size, depending on the extent of unsuitable habitat close to the points. Commented Feb 6, 2023 at 21:30
  • @Vince with an erase/difference/intersect I cant guarantee the area covered by the buffer will be e.g. 1 km2 since the amount of unsuitable habitat will vary point by point. I dont want the buffer to be a specified radius but a specified area (when unsuitable habitat is accounted for). Commented Feb 6, 2023 at 21:33

1 Answer 1

1

Dissolve suitable land to single feature: enter image description here

Add target area field to your points table:

enter image description here

it can be any positive number.

Add empty polygonal layer with numerical field called AREA to your map:

enter image description here

Script below will constrict 'square' buffers of given (target) area around your points:

import arcpy

suitable,points,buffers = "suitable","points","buffers"
##collection of points and target areas
pointsList = [[shp,target] for shp,target in arcpy.da.SearchCursor(points, ("Shape@","target"))]
##shape of suitable land
g = arcpy.Geometry()
goodLand = arcpy.management.CopyFeatures(suitable,g)[0]

curT=arcpy.da.InsertCursor(buffers,("SHAPE@","AREA"))
for pnt,target in pointsList:
    low = 0.0
    high = pow(target,0.5)
    while True:
        middle=0.5*(low+high)
        rect = pnt.buffer(middle).extent.polygon
        pgon = goodLand.intersect(rect,4)
        curArea=pgon.area
        if (high-low)<0.01: break
        if curArea<target:low=middle
        else:high=middle
    curT.insertRow((pgon,curArea))

OUTPUT:

enter image description here

enter image description here

high = 10*pow(target,0.5)

2
  • Thanks very much Felix that should work pretty well for me ! Commented Feb 8, 2023 at 12:37
  • See correction at the end of my post. Use it if you see underestimates of target.
    – FelixIP
    Commented Feb 8, 2023 at 19:10

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