grd2stream User Manual
What is grd2stream?
grd2stream is a plugin that generates streamlines from gridded data. It allows you to:
- Either type in or interactively select seed points to generate the flowlines
- Work with various raster formats through GDAL compatibility
- Configure calculation parameters & save them as presets
Platform Support:
- macOS/Linux: Fully supported
- Windows: Partially supported (still in development)
Getting Started
First-Time Setup
When you first run the plugin on Linux or macOS, it will check for required components:
- If needed, the plugin will offer to install GMT6 (via Miniconda) into an isolated environment
- It will also install the grd2stream command-line utility
- These installations won't affect any existing GMT installations on your system!
Basic Usage
- Click the grd2stream icon in the QGIS toolbar
- Select two raster layers containing X and Y component data
- Configure your parameters (or load a preset)
- Choose how to select your seed point (map click or manual coordinates)
- The plugin will calculate & display the flowline as a vector layer
Configuration Options
Input Parameters
Parameter |
Description |
Default |
Raster 1 |
X-component dataset |
Required |
Raster 2 |
Y-component dataset |
Required |
Backward Steps |
Trace flowline in both upstream & downstream directions |
Off |
Step Size |
Distance increment for integration steps |
min(x_inc, y_inc) / 5 |
Max Integration Time |
Maximum time for integration process |
Unlimited |
Max Steps |
Maximum number of steps to calculate |
10,000 |
Output Format |
Data columns in output layer |
x y dist |
Output Formats
- Default: x y dist (coordinates & distance along flowline)
- Extended: x y dist v_x v_y (includes vector components)
- Full: x y dist v_x v_y time (includes integration time)
Working with Presets
Save time by storing & reusing configurations:
- Save Preset: After configuring parameters, click "Save as Preset" & name it
- Load Preset: Click "Load Preset" to select from saved configurations
- Last Settings: Click "Use Last Settings" to quickly reapply previous configuration
Troubleshooting
Windows Users: Currently, the plugin can only display the command that would be executed. Full Windows support is under development.
Common Issues
- No flowline generated: Ensure seed point was not placed in an area with undefined values
- Missing dependencies: Allow the plugin to install required components when prompted
- Unexpected results: Verify that both input rasters have the same extent, resolution, and coordinate system
For detailed logs, check the QGIS Python console.
License Information
grd2stream QGIS plugin is licensed under GNU GPL v3.
The plugin includes the grd2stream command-line utility by Thomas Kleiner, licensed under the BSD 3-Clause License. See the full license text in lib/LICENSE.txt.