New answers tagged

0

There's a good solution in one of the answers on this page: https://geonet.esri.com/thread/25945 arcpy.env.overwriteOutput = 1 arcpy.CheckOutExtension('Spatial') arcpy.env.scratchWorkspace = outPath arcpy.env.workspace = dataPath #create a list of rasters in the workspace rasters = arcpy.ListRasters('','') i = 0 #loop through rasters in list ...


7

Here is a python solution, using arcpy to access the data and numpy to calculate the statistical values. Using arcpy.da.SearchCursor() write the values to a list. Use python.numpy.percentile() to find the threshold percentile values that you want to use to identify outliers, lets take your example and drop the lowest 10% and highest 10% of values. If you ...


1

I'm going to go ahead and convert my comment to an answer. I'm assuming you've named your last field incorrectly. I think you may have meant it to be "B0R010" and not "B0R0010". Also, you may need to ensure that all fields are in the file. Also, check your indentation, as per @Jacob F's comment.


2

If you are looking for an automated way to do this, or just a way to do this at all, you could: Perform a query on your table WHERE: NEAR_DIST >= 40 AND NEAR_DIST <=500 Divide how many records are returned (e.g. 800) by how many total records you have (e.g. 1000). For example 800/1000 * 100 = 80% If you want to automate this you could do this in ...


0

you are right that you can use the field calculator, but you could also do this with a cursor. With the field calculator, you can define a function that take all your fields as input and gives the position of the field as an output. argmax(!field1!,!field2!,!field3!,...,!field15!) def argmax(a,b,c,...o): mylist = [a,b,c,...o] return mylist.index(...


1

You should use strings for naming objects instead of integers as this could cause confusion. The following script runs for me which use the following line to split the multiple input rasters: layers = input.split(';') ##Example=name ##input=multiple raster ##maximum=output raster import glob, os, processing from PyQt4.QtCore import QFileInfo from qgis....



Top 50 recent answers are included