Select to view content in your preferred language

how to create a KERNEL as TXT-file?

3399
2
Jump to solution
10-17-2012 12:15 PM
MaximilianSesselmann
Emerging Contributor
Hi experts 😉

I want to apply a "focal statistics" tool ("focal range") to an DEM. In this context I would like to create a individual kernel matrix.
The only thing I know about that: the kernel has to be an txt-file. But how should this txt-file look exactly?
Let me specify, what I need:

- the kernel should be square, 7x7 cells
- the central pixel should calculate the RANGE (maximum-value minus minimum-value) of ONLY the edge-cells of the matrix

This picture may illustrate, what I mean...
[ATTACH=CONFIG]18506[/ATTACH]

I would be very grateful, if someone could help me! It would be ideal, if someone could send me an example-txt-file.
Thanks in advance!
Kind regards,
Max
0 Kudos
1 Solution

Accepted Solutions
MarcinGasior
Frequent Contributor
Try this values for irregular neighbourhood file (txt file also included):
7 7
1 1 1 1 1 1 1
1 0 0 0 0 0 1
1 0 0 0 0 0 1
1 0 0 0 0 0 1
1 0 0 0 0 0 1
1 0 0 0 0 0 1
1 1 1 1 1 1 1


To apply RANGE, choose apropriate Statistics type in tool dialog.

View solution in original post

0 Kudos
2 Replies
MarcinGasior
Frequent Contributor
Try this values for irregular neighbourhood file (txt file also included):
7 7
1 1 1 1 1 1 1
1 0 0 0 0 0 1
1 0 0 0 0 0 1
1 0 0 0 0 0 1
1 0 0 0 0 0 1
1 0 0 0 0 0 1
1 1 1 1 1 1 1


To apply RANGE, choose apropriate Statistics type in tool dialog.
0 Kudos
curtvprice
MVP Alum

Documented here in the help

How Focal Statistics Works

http://resources.arcgis.com/en/help/main/10.2/009z/009z000000r7000000.htm