I am trying to create a buffer of water locations (point.shp) within a pasture (polygon.shp). When i run a multiring buffer of the water locations the rings extend beyond the pasture fence lines. I need to rings to stop at the fence lines.
you can see from my map that the water locations need to stay within the pastures but as of now the rings go beyond the pasture lines. I was able to clip the buffer by the outside of the polygon file so the rings don't extend beyond the outside perimeter. I need it to do this within the internal fence lines.
Any idea on how I can do this.
Solved! Go to Solution.
Is this more or less what you are trying to get?
You will probably have to script this or créate a model:
Xander, that will work but I have about 110 different pastures that I need to run it for. Any way to automate it so I don't have to do the model 110 different times?
Thanks
If you have some sample data that follows the structure you want to use, I can see if I can come up with a script to process the 110 pastures.
Is this more or less what you are trying to get?
Yes,
That is exactly what I am trying to do. How did you manipulate my data. I only sent a pdf correct? Bigger question is how did you get the buffers to stay within the borders of the individual polygons?
I converted the PDF to raster, changed the raster, did some vectorization and made some edits (added some additional water points).
The unpolished code I used I included below.
import arcpy, os fc_pnt = r"C:\Forum\Pasture\test.gdb\waterpoints" fc_pol = r"C:\Forum\Pasture\test.gdb\FenceAreas" ws = r"C:\Forum\Pasture\test.gdb" arcpy.env.overwriteOutput = True dists="25000;50000;75000;100000;125000;150000;175000;200000" fld_oid = arcpy.Describe(fc_pol).OIDFieldName lst_OIDs = [r[0] for r in arcpy.da.SearchCursor(fc_pol, "OID@")] for oid in lst_OIDs: where = "{0} = {1}".format(arcpy.AddFieldDelimiters(fc_pol, fld_oid),oid) arcpy.MakeFeatureLayer_management(fc_pol, "flpol", where_clause=where) arcpy.MakeFeatureLayer_management(fc_pnt, "flpnt") arcpy.SelectLayerByLocation_management("flpnt", 'intersect', "flpol") fc_buf = os.path.join(ws, "buf_{0}".format(oid)) arcpy.MultipleRingBuffer_analysis(Input_Features="flpnt",Distances=dists, Output_Feature_class=fc_buf,Buffer_Unit="Default", Field_Name="distance",Dissolve_Option="ALL", Outside_Polygons_Only="FULL") fc_bufclip = os.path.join(ws, "buf_{0}clip".format(oid)) arcpy.Clip_analysis(fc_buf,"flpol",fc_bufclip) # ... also merge the buffer layers into a single featureclass
Xander,
I would like to send you a PM.
Andrew
Hi Xander and Andrew,
Not sure if you could revisit this, as I really appreciate your work here on this issue.
I work with multiple farmer/producers who would love this function available in ArcGIS Online.
With another complexity though, can we restrict the buffer growth with line features rather than polygons?
Cheers
Nik