Tag Info

New answers tagged

5

Create some simple test rasters in R: > m=matrix(1:9,3,3) > m2 = matrix(c(9,2,3,4,1,5,6,8,7),3,3) Then we can trivially compute the covariance between these matrices: > cov(c(m),c(m2)) [1] 2.125 and I would wager doing the computation by hand would get the same result. What does layerStats do? > D = stack(raster(m),raster(m2)) > ...


0

Pre-processing: Create fishnet - polygons with extent=extent of overlapping polygons. Calculate field ID = FID. Spatial join overlapping polygons with fishnet polygons using HAVE_THEIR_CENTER_IN. Dissolve polygons, case field fishnet's ID Use Minimum Bounding geometry on step 3 output. Black polygons in below picture are outputs of step 4 (minBound in ...


0

Convert raster to points Intersect points with polygons, output type POINT Statistics on raster value, using polygon id as case field. You might consider to split the area, if raster too big


2

I would use Tabulate Area (Spatial Analyst) rather than Zonal Statistics if you are after proportions. import arcpy from arcpy import env from arcpy.sa import * env.workspace = "C:/sapyexamples/data" TabulateArea("zonedata.shp", "IDStr", "valueraster", "VALUE", "C:/sapyexamples/output/areatable.dbf", 2)


2

Your best bet for this approach would definitely be a cursor. You can create a python tool that takes 2 inputs: Feature class/table in question multi-value parameter for all the fields you are interested in The code to grab all this information is pretty straightforward: import math, itertools, arcpy FC = arcpy.GetParameterAsText(0) fields = ...


3

for MIN, MAX and MEAN, you can use the summary statistics and compute the global values accross the fields using the field calculator (min is min of min, max is max of max and mean is mean of mean in this case). For the standard deviation, it is a bit more complicated but still possible based on the partitioning of the sum of squares. Var_tot = ...


3

If there is, I do not know it, but if you are using an RDBMS then maybe a view or trigger can be used to maintain a field like that. For a file geodatabase there are some ArcGIS Ideas that, if implemented, would make this easy for you: Add the ability to add dynamic calculated field with formula based on other fields Dynamic Fields for Shape Features and ...



Top 50 recent answers are included