Hot answers tagged

5

At the bottom of the help page for each tool, ESRI provides a list of the environments that can impact the tool's processing. For example, the Resample help page does not include Mask in its list. It does not include Cell Size in its list either, because the cell size option that is a direct and required input to the tool would overwrite it anyway. The ...


4

You are confusing terms and thus, confusing us. The expected input for kriging prediction in the gstat krige function is a systematic array of points and not polygons. It would also be nice if you provided a reproducible code example of what you have tried. You can use the extent of an sp object to create an array of points for the kriging prediction using ...


3

The results of zonal stat is one line per unique value in your raster, so this cannot be converted into a new raster without information about the position of each value. What you can do is joining your table with the original raster with zone values and then work on it. Make sure that you first "build raster attribute table" in order to do the join.


3

You can try using the Topology Checker Plugin to identify all the polygons in your layer that overlap. Just add your polygon layer in the Topology Rule Settings window, in the rules add must not overlap. Validate to check the errors (effectively identifying all the overlapping polygons). Alternatively you could add your data to PostGIS and use spatial ...


2

In addition to the tool pointed out by HDunn, you can use Extract Multi Values to Points if you have many raster data with the same point shapefile. Here is another snippet from ArcGIS help. import arcpy from arcpy.sa import * from arcpy import env env.workspace = "c:/sapyexamples/data" ExtractMultiValuesToPoints("observers.shp", [["elevation", "ELEV"], ...


1

One way to do this would be to add an attribute to your polygon layer, say "VALUE", and assign it numeric value of 1000 or more. Then convert the polygon layer to a raster. In arcpy using the spatial analyst module these rasters can be multiplied easily. elevRast = arcpy.Raster("path/elevrast") polyRast = arcpy.Raster("path/polygonraster") resultRast = ...


1

If you don't have the spatial analyst extension or want to use Numpy, you can convert your x and y point coordinates to the row and column that is close to that point. The Extract Values tools have many more options, and produce slightly different results than those in the code below. I'm not advocating one method over another. I also don't know if this ...


1

Tool cannot understand condition. Try whereClause= '"Value > %s"' %threshold BTW it is not clear what you are trying to achieve. I guess Con can do it easier. Please expand your question Flowacc= arcpy.Raster(path) Con(Flowacc>threshold, 1)


1

If you're already using ArcPy, You might as well use the Extract Values to Points tool (assuming you have Spatial Analyst extension) Here's the code snippet from ESRI's site ExtractValuesToPoints("rec_sites.shp", "elevation", "C:/sapyexamples/output/outValPnts","INTERPOLATE", "VALUE_ONLY") Iterate over your raster ...


1

Try something like this: import arcpy Set the workspace to the folder where you have your data arcpy.env.workspace="Path:\to\your\data\" for raster in arcpy.ListRasters(): Create an object storing the st. dev. for the raster file: stdev_object=arcpy.GetRasterProperties_management(raster, "STD") Store the numeric value of st. dev. in the ...


1

I'll give it a go. Begin by loading your raster. rast = arcpy.sa.Raster(pathtorasterfile) Find the mean, standard deviations, minimum and maximum: meanValue = rast.mean std = rast.standardDeviation minR = rast.minimum - .1 #just a little buffer room maxR = rast.maximum + .1 #just a little buffer room Setup the bounds: target = meanValue + (2*std) ...



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