0

I am trying to create a custom tool that take x,y coordinates, buffers them and then puts them into a new feature class. Whenever I try to run the tool I get:

ERROR000732 Input Features: Dataset (x, y coordinates) does not exist or is not supported

Here is my script:

import arcpy
import os

point = arcpy.GetParameterAsText(0)

outputFC = arcpy.GetParameterAsText(1)
buffDist = arcpy.GetParameterAsText(2)

arcpy.Buffer_analysis(point, outputFC, buffDist)

Here is the error from the tool after the script is run:

enter image description here

enter image description here

6
  • Coordinates should be float. Could you try this ? Could you show your script ? Commented Sep 23, 2017 at 21:11
  • I have XY coordinates = Point, Output FC = Feature Class and BuffDist = Linear Unit.... Under data type in the parameter properties I do not see Float as an option. The only one that makes sense to me right now is Point.
    – Wahs14
    Commented Sep 23, 2017 at 21:52
  • Related: gis.stackexchange.com/questions/256402/…
    – Erica
    Commented Sep 23, 2017 at 22:07
  • Perhaps try with decimals. Commented Sep 23, 2017 at 22:23
  • Welcome to GIS SE! As a new user be sure to take the Tour. For questions that involve error messages we ask that you show us them in full using text rather than a picture so that they can be searched and also read easily on all devices. There is an edit button beneath your question which will enable you to do that and " and {} buttons that enables you to format any highlighted text nicely.
    – PolyGeo
    Commented Sep 23, 2017 at 22:37

2 Answers 2

1

According to its help page, the Buffer operation requires a feature layer input. When an ArcPy error includes "does not exist or is not supported", and you're sure* the input exists, the remaining option is that it isn't the right type of input. In this case, you can't just pass two numbers -- Buffer was not programmed to be able to handle that.

You're going to need more code in your Python script to turn the point (x, y) into a Point geometry type, and possibly also turn it into a feature layer. I mentioned that in another answer, here (the bit about arcpy.Point).


* Being sure the input exists should include debugging with print(point) or arcpy.AddMessage(point) so your script shows you what it thinks the value of point is. Sometimes it's totally valid, sometimes it's not, and eliminating the easy possibilities saves time.

1

When you use GetParameterAsText, it is literally a string. The input to arcpy.Buffer_analysis requires, in your case, a Point. By converting the string input to a Point object, you should be able to get the tool to run:

point2 = point.split(" ")
point3 = arcpy.Point(float(point2[0]),float(point2[1]))
arcpy.Buffer_analysis(point3, outputFC, buffDist)

Now that I think of it, a quicker way would be to just use GetParameter instead of GetParameterAsText. This will leave your point input as a Point object.

Your Answer

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

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