22

I was struggling to do exactly the same thing, but for various reasons I'm committed to using QGIS. I tried using v.rast.stats using the GRASS plugin and also via the Sextante plugin. The latter approach failed, because it seems to attach the stats to a temporary vector layer which it then deletes. The GRASS plugin worked, but it doesn't deal with ...


22

Statist plugin is going to be your friend here: IMHO - it beats ESRI approach hands down with both functionality and aesthetics. For looking at groupings of your data I'd also recommend Group Stats plugin: Although (afaik) it doesn't work with single variables, it comes really handy for getting quick summaries of most important parameters of distribution ...


16

Introduction Because this issue (of discrepancies in standard deviations, variances, or other statistical summaries) comes up periodically, especially when a thoughtful and careful GIS analyst checks their work, I thought it would be good to share the "forensic analysis" of the discrepancy so that readers can carry out similar checks in their own ...


13

Use 'extract' to overlay polygon features from a SpatialPolygonsDataFrame (which can be read from a shapefile using maptools:readShapeSpatial) on a raster, then use 'table' to summarise. Example: > c=raster("cumbria.tif") # this is my CORINE land use raster > summary(spd) Object of class SpatialPolygonsDataFrame [...] > nrow(spd) # how many ...


13

You can use GetStatistics Method to get the stats. eg. stats = ds.GetRasterBand(1).GetStatistics(0,1) it will return (Min, Max, Mean, StdDev) so the xml can be read: <PAMDataset> <PAMRasterBand band="1"> <Metadata> <MDI key="STATISTICS_MINIMUM">stats[0]</MDI> <MDI key="STATISTICS_MAXIMUM">stats[1]&...


12

Create a raster object using the full path to your raster. Raster objects have the properties minimum and maximum. >>> rastFullPath = r"C:\Rasters\rasters.gdb\Slope" >>> rast = arcpy.Raster (rastFullPath) >>> rast.minimum 0.0 >>> rast.maximum 64.9616928100586 Or you can use your method and convert the output from unicode ...


11

A rencent journal article I came across discusses exactly what @Aksel in another answer (Sun and Wong, 2010) (It is available here for free online, but that link is void of pictures of the maps as far as I can tell). Essentially they suggest they prefer the overlay approach as opposed to the small multiple approach (i.e. making two maps, one showing the ...


11

Two "summarize" operations will do it. This is a basic operation requiring no extra licenses. First compute a field that concatenates Field1 and Field2. (If your table is not editable or should not be modified, do these operations on a copy of it.) It's a good idea to delimit the concatenation; here I have used "|" as a delimiter. Field 1 Field 2 ...


10

By default, QGIS does not calculate the full range for a raster. The range it calculates by default is 2% - 98%, see the 'Cumulative count cut' option in the 'Load min/max values' section of the dialog box. This is just the first option, which is why (I suspect) it is the default. To get the full range, choose the option below it marked 'Min/max', then ...


10

To learn the processing module in Python, the easiest solution for me is: execute the Processing command (from the Toolbox), for example v.to.rast.val examine the "processing_qgis.log" file in the ".qgis2/processing/" folder where you can examine all the running algorithms: ALGORITHM|Mon Oct 28 2013 12:30:34|processing.runalg("grass:v.to.rast.value","/...


10

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 ...


9

One class of solutions uses Multidimensional scaling. This addresses exactly your question: given a set of distances (often obtained among points in a high dimensional space), find an embedding in one, two, or three dimensions that preserves the distances as closely as possible. This figure is an MDS rendering of distances among all 183 top-ten Hollywood ...


9

I don't know how to do this with Field Calculator, but I do know a workaround. Run Summary Statistics in ArcToolbox with COUNT on the [name] field. This will create another table where each unique [name] entry will have next to it the number of times it appears in the original layer. Then Join this table back to your original layer, with the [name] ...


9

Create a polygon using Vector > Research Tools >Polygon from layer extent. here layer is the raster in question. Activate/ Install Zonal statistics Plugin. Use Zonal statistics plugin where the raster is the one whose sum is required and the polygon is the one you created from layer extent. Enter output column prefix (say stats_). Run the plugin. Open the ...


9

This uses the Summary Statistics tool rather than Summarize from the Attribute Table window but I think achieves the correct values - you may just need to re-order and delete some fields once you are satisfied the correct values are coming through.


9

It is a bug. Something terribly wrong with cell count. Correct mean (9.0452380952381) times correct number of non-empty cells (420) divided by 297 (that is a cell count reported by tool) results in 12.7912457912458. That is a wrong average reported by tool. Results of my own toy size grids test:


9

There is a bug that seems to correspond to what you're experiencing - it's registered as BUG-000084883 - The 'Ignore NoData in calculations' option in Zonal Statistics as Table tool {and Zonal Statistics tool} is not honored when checked off, producing incorrect results. It occurs with 10.3 and 10.2.2 but not 10.1. Did you try the tool with this version?


8

Assuming the columns appear in time order, the first row (for example) indicates that total construction through each period went 0, 0+45 = 45, 45+135 = 180, 180+405 = 585, 585+1010 = 1595, ..., 2230+0 = 2230. Construction was halfway through at 2230/2 = 1115. This occurred during period 4, because at the end of period 3 the total was 585, at the end of ...


8

What about the Summary Statistics tool? (Updated 2015-11-05) Available statistics types are: SUM—Adds the total value for the specified field. MEAN—Calculates the average for the specified field. MIN—Finds the smallest value for all records of the specified field. MAX—Finds the largest value for all records of the specified field. RANGE—Finds the range of ...


8

GetStatistics will reuse previously computed statistics if they exist (i.e computed before you set the NoData value). You can use stats = band.ComputeStatistics(0) instead of GetStatistics to force the statistics to be recomputed.


8

You can use a Python numpy array and a .sum() operation to sum all of the floating point values in the array. ArcGIS has an easy interface to convert raster data to a numpy array by using RasterToNumPyArray (arcpy) # Import the arcpy site package import arcpy, numpy # Your input floating point raster raster = r'C:\temp\floating_point_raster.tif' # Convert ...


7

I think you need to include a Case Field. If you do not see this on the tool dialog, be sure to increase its size or use the slider bar on the right hand side to see it. From Summary Statistics help: "If a Case field is specified, statistics will be calculated separately for each unique attribute value. The Output Table will contain only one record if no ...


7

kappa does not quantifies the level of agreement between two datasets. It represents the level of agreement of two dataset corrected by chance. The reason why you have a large difference between kappa and overall accuracy is that one of the classes (class 1) accounts for the large majority of your map, and this class is well described. Overall accuracy is ...


7

If the rasters have the same basis (extent, resolution etc) then you just get the values and plot them. Something like: plot(values(r1), values(r2)) I'm not sure exactly what the "correlation of determination" is, but the simple "correlation" can be computed by: cor(values(r1), values(r2)) Note these are both dependent on the rasters having identical ...


7

That is simply indicating that the value is a Unicode string. You can use this unicode string in most situations. However, if you need to fully control the type, convert it to float format. test = unicode('261.22') >>> test u'261.22' >>> type(test) <type 'unicode'> test2 = float(test) >>> test2 261.22 >>> type(...


7

From your comment I understand that you are not looking for percentile but a given percentage of your range. You can use the raster calculator Con("raster" >= (0.9 * ("raster".maximum - "raster".minimum) + "raster".minimum), 1) of course 0.9 could be replaced by any value (this is an example with 10%). Note that the results will be a raster with 1 or ...


7

The Modifiable Aerial Unit Problem (MAUP) is a change of support issue associated with arbitrary aggregate units. Two classic examples are census tracks and wildlife game units. These have been found to be arbitrary political units and the underlying statistical response in demography acts independent of the unit. Because of this, the unit is not an accurate ...


6

I wanted to report back and here i am. Spacedman's solution worked great and i was able to export all information for every polygon in my shape. Just in case someone has the same problem, here is how i preceded: ... tab <- apply(ovR,table) # Calculate percentage of landcover types for each polygon-field. # landcover is a datastream with the names of ...


6

Finally found it: In Saga-GIS open category-polygons and data-grid, then shapes->grid->grid value->grid statistics for polygons


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