Hot answers tagged

3

It's very difficult to provide an exact answer without knowing a lot more details, but I'll comment on both the Delete tool and using it inside a GP Service. The Delete tool returns true when it does what you've asked of it. So if you pass it a folder that doesn't exist, it gives True as a result. If it deletes the folder, it says True. You only get False ...


2

This is the coding pattern that I would use do that: input_fc = r"C:\Geoprocessing\Model.gdb\input_fc" output_fc = r"C:\Geoprocessing\Model.gdb\output_fc" arcpy.Select_analysis(input_fc, output_fc, where_clause="Field1 >= 0.1")


2

Your question reminds me of Positioning parameters in Python script tool dialog box? and, although I have not tested it, you may want to look into trying to use a stylesheet. Such techniques are further described in this answer to Controlling Categories in Script Validation Tools - Expanding Groups By Default.


2

You need to specify the .tif extension when you save the raster, otherwise it will save to grid format. It is a good practice to explicitly define your input and output rasters. Here are the changes I would make: in_raster = r"C:\image.tif" out_raster = r"C:\Geoprocessing\band_1_rast1.tif" raster1 = arcpy.Raster(in_raster) band1 = ...


1

Index construction is an I/O-intensive task, not generally CPU-bound. It's also likely to involve locks on table extents, and is therefore not amenable to multiprocessing (INDEX requests to a single table in multiple sessions are likely to contend with one another). Similarly, multiple INDEX requests on different tables in a single datafile are likely to ...


1

The lock file should contains the server name and process ID (PID) like MyFeatureClass.MyServerName.57784.63616.sr.lock. The second number in the file name 63616 is the PID. If you have access to the server, got to the task manager under the Detail tab, search for that PID, and under the Command Line column you can identify the service name


Only top voted, non community-wiki answers of a minimum length are eligible