Tag Info

New answers tagged

1

It looks like you are configuring a Python script tool in a standard toolbox so I replaced your python-toolbox tag (which is for Python toolboxes) with one for python-script-tool. To set irrdist you are reading the 4th parameter (indexed as 3) but you have not shown us how that parameter has been configured on the tool dialog. I suspect that you are not ...


1

I think you need to have the Fields as the first column in the Value Table in order to use the parameter dependency: import arcpy import pythonaddins class Toolbox(object): def __init__(self): """Define the toolbox (the name of the toolbox is the name of the .pyt file).""" self.label = "Toolbox" self.alias = "" ...


1

That line of code simply has to be changed to: fc = arcpy.GetParameterAsText(0) # 0 assumes that it is the first parameter defined on your tool dialog but you also need to configure the parameter on your tool dialog. I recommend reviewing: Accessing parameters in a script tool Understanding script tool parameters.


1

You want to make use of Python functions. This allows you to make dynamic tasks and allows for code re-usability. If you are wanting to make an input optional, say related to your question Calculating geometry for feature class with x/y and Lat/Long values in different projections? you could do this: import arcpy def getLatLong(fc, lat_field, ...


2

The warning saying 'Northing and Easting must be in decimal form' doesn't have anything to do with the Proj4 params. You're getting that error as you are either: not putting anything in the test North/East fields, or putting non-numeric values in (i.e a coordinate in degrees, minutes, seconds) and then clicking calculate. You don't have to test. Just ...



Top 50 recent answers are included