Local Statistical Features

Hi everyone,
I’m wondering if SNAP allows to derive statistical features of local patches. This idea comes from a paper that says:

“Since the morphological structure of an urban neighborhood is one of the essential factors that local
climate zone classes try to describe, it is natural to derive features describing the local neighborhood.
It has been shown that simple statistical parameters of a local neighborhood the mean and standard
deviation are suitable features for the classification in [13,25]. In our global-scale task, we extracted five
statistical parameters: maximum, minimum, mean, standard deviation, and median of local patches.
Since the ground sampling distance (GSD) of the LCZ map was suggested to be 100 ms [3,25], the local
patch in this work was defined as a size of 10 by 10 pixels, corresponding to the suggested 100 meters
GSD. Those parameters were derived from all four polarimetric features (Pol-Baseline), resulting in 20
features. We named the local statistical feature the Stat-Feature.”

which is from https://www.mdpi.com/2220-9964/7/9/379?type=check_update&version=1. This is applied to SAR data.

Is there any way of doing this analysis in SNAP?


You can subset your data if you know the location of the central pixel with the Subset function.

As Ana said you can do subsets, but you can also define masks of for your 10x10 pixel patches.
Afterwards you can select the drawn geometry in the statistics dialog:

Another option is the pixel extractor (Raster / Export / Export Pixel Values). Here you can define geo-locations and extract a window around them. The statistical computation can then be done in external software like Excel.

And there is the StatisticsOp. It is only available from the command line. It is briefly explained here: A StatisticsOp graph

So you can choos between several options which fits your workflow best.

1 Like

Thanks to both of you,
but what if I want to create a new raster band for each statistical feature? For instance, a mean band where each pixel corresponds to the mean value of the 10x10 window centered at that pixel.

There is the filter tool in Raster tab.

Your raster band needs to be selected to use the tool.

Examples of the tool:





That’s the one! Thanks!

1 Like