The moving window analysis tool summarizes attributes on length based ‘windows’ centered around ‘seed points’.
- The Moving Window Summary requires a Stream Branch or similar field to identify tributary routing. The moving window can summarize numeric data fields only.
- In ArcMap navigate to Geomorphic Network and Analysis Toolbox / Utilities / Moving Window Summary in ArcToolbox.
- Specify the Stream Network Polyline Feature Class to run the summary over.
- Specify a Stream name or Branch Field that is used to make continuous stretches of the stream. For Example, GNAT uses a “Stream Branch ID” system.
- Specify the Seed Point Distance to use for spacing the seed points along the network. Seed points will start at 1/2 the distance of the largest window size in order to retain all window sizes for every seed point.
- Specify the window size(s) you want to use. Each window size will provide a summary at each seed point.
- Specify the Attribute Fields that will be used to Calculate Statistics. Numeric (Float, Double or Integer types only).
- Specify the output Moving Windows and Seed Point Feature classes .
- (Optional) specify a Temporary workspace. If one is not specified, the “in_memory” workspace will be used.
- (Optional) Specify Riverscapes project and outputs.
- Click OK to run the tool.
The Line network on which the Moving Window analysis will be generated. **
- Contains the network attributes for which the moving window summary will be calculated.
- The Line Network must have tributary topology information as an attribute to dissolve the network (i.e. GNIS names, Stream Order, etc)
Stream Route ID
The field that contains a unique ID for each Stream/Route. The tool will dissolve based on this ID, so as to create the longest continuous river segments for generating the Seed Points.
Seed Point Distance
Distance between seed points. Seed Points represent the center of each window, and multiple windows are aligned on each seed point. The first seed point is located at half the distance of the largest window size from the ends of each stream route. This is to ensure that each seed point has every window size associated with it.
Window size (in meters) to be generated at each seed point. Multiple window sizes can be specified.
Generate Statistics Fields
Select the fields to generate statistics on. Only Numeric (Float, Double Integer) types are allowed.
In the output workspace you will find:
Points feature class that contain the calculated attribute for each window size, centered on each seed point feature. This layer contains the following attributes:
RouteID: The same attribute as the
StreamBranchIDspecified in the inputs.
SeedID: Unique ID for each seed point. Can be used to join back to Window line features in Moving Window Lines.
- Attribute summaries will saved in fields that are named using the following structure
wXXThe first part of the field name contains “w” followed by the first two digits fo the window size.
WAWeighted Average (by length of segment)
ATRBThe first few letters of the original attribute field for that statistic generated.
Moving Window Lines
The line features that represent the moving windows. These features will overlap both in window spacing (seed distance) and window sizes. This layer contains the following attributes:
SeedID: Unique id for each seed point. This can be used to join back to the individual seed points.
Window size: Size of the window (due to geometric rounding, the actual shape length may be slightly larger or smaller than the window size).
- Line Network is dissolved by user specified “StreamRoute” Field.
- Iterate through each Stream Route
- Generate Seed Points starting at a distance of 1/2 largest window size, using a spacing distance as provided by user.
- for each seed point:
- For each window size provided by user,
- find the upper distance and lower distance of window centered on the seed point.
- Use the distances to find segment along line (arcpy geometry method)
- For each window size provided by user,
- Generate Feature classes of Seed Points and windows
- Intersect the Windows with the Original Line network.
- Read the Intersected Line Network into Python Dictionaries
- Add new fields to store calculated statistics to Seed Points
- Calculate statistics for each statistic type for each attribute, for each seed and window size .
- Save outputs to user specified destinations.
- Code Repository https://github.com/Riverscapes/arcGNAT
- Software Architecture Python 2.7 with standard library and the following 3rd-Party Dependencies:
- ArcGIS version 10.4 or higher.
- Code for this tool written and maintained by Kelly Whitehead at South Fork Research.
- Use Python Dictionaries and Cursors to generate statistics instead of arcpy Summary Statistics tool.
- Tool initialized.