Monday 21 August 2017

Create Point Feature with XY and Generate Multiple Buffers (ArcPy Tool)


I am trying to set up a custom tool via a python script in ArcMap. I want the tool to be able to create a point feature with X/Y input and then pass that point into the buffers.


My thinking is that someone could use the tool to find what is inside the radius from their given point that they input themselves without having to create a feature class first (I hope that makes it clearer).


Am I doing this right by creating the point feature and using the GetParameterAstext string? What exactly would go in the multiple ring buffer at the bottom?


import arcpy
import os

# Create a Point object from coordinates then set up buffer rings
pnt.X = arcpy.GetParameterAsText(0)
pnt.Y = arcpy.GetParameterAsText(1)

arcpy.Point(pnt.X, pnt.Y) = arcpy.GetParameterAsText(2)

BuffRing1 = arcpy.GetParameterAsText(3)
BuffRing2 = arcpy.GetParameterAsText(4)

distances = [BuffRing1, BuffRing2]
measure = ['miles']

arcpy.MultipleRingBuffer_analysis()


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...