Modules

GeoNet Defaults

The geonet_defaults.m is one of the core files in GeoNet. This file sets the default values to the global parameters.

Most of the parameters are logical in nature, that is a value of 0 will be treated as false and a value of 1 will be treated as true.

Parameters which are not logical are the ones which can be assigned values other than 0 and 1.

The default parameters have been divided into five categories:

  1. Reporting and file handling parameters
  2. Figure properties parameters
  3. Data graphics parameters
  4. Raster and Shapefile writing parameters
  5. GeoNet processing parameters

Reporting and file handling

Parameters.doReport=1;

This parameter decides if you want to do reporting of the various steps while running GeoNet processing for a given tiff file.

Parameters.doFileOutput=0;

This parameter decides if you want to do file output or not.

Parameters.fileOutputPath=fullfile(pwd);

This parameter will place all the output files in the present working directory. The file output path can be changed to a desired location by changing the Parameters.demDataFilePath in the geonet_prepare.m file. For more information please check geonet_prepare sections on Parameters.demDataFilePath.

back to top

Figure properties

Parameters.doPlot=1;

This parameter decides if you want to do plotting of figures. For more information on plotting options please see below.

Parameters.doResetFiguresOnStart=1;

This will reset the figure number to 1 on a new run of GeoNet.

Parameters.graphTitleFontSize=13;

This parameter sets the font size of the title of graph.

Parameters.graphFontSize=12;

This parameter sets the font size of the horizontal and vertical axis title.

Parameters.graphFontName='Arial';

This parameter sets the font of the main title of the figure and the horizontal and vertical axis.

Parameters.graphLabelSize=12;

This parameter sets the size of the labels on the graph.

Parameters.graphTickSize=5;

This parameter sets the size of the ticks on the graph.

Parameters.graphMarkerSize1=30;

Parameters.graphMarkerSize2=20;

Parameters.graphMarkerSize3=10;

The above three parameters set the size of he markers on the graph, three different marker sizes are used in all the plots in GeoNet.

Parameters.graphLineWidth=1;

This parameter sets the width of the lines on the graph.

Parameters.colorMapClipLowerQuantile=0.01;

Parameters.colorMapClipUpperQuantile=0.99;

This parameter sets the minimum and maximum color map values on a color bar.

Parameters.doPlotEverything=0;

This parameter plots everything by overriding the logical options for each plot.

Parameters.imageVerticalExaggerate=500.0; % vertical scaling for 3d surfaces

This parameter sets the vertical scales for a 3D surface.

Parameters.imageVerticalShift=1.0; % vertical offset for stream lines and channel

This parameter sets a vertical offset of 1.0 for streams lines and channel heads on 3D surfaces.

Parameters.imageShadingCameraLightAzimuth=45.0;

This parameter sets the camera lighting azimuth for image shading in 3D surfaces.

Parameters.imageShadingCameraLightAngle=15.0;

This parameter sets the camera lighting angle for image shading in 3D surfaces.

back to top

Data graphics

Parameters.doPlotRawDEM=0;

This is a logical parameter that plots the raw DEM input to the GeoNet project.

Parameters.doPlotRawDEMAndHull=0;

This is a logical parameter that plots the raw DEM along with the internal and external hulls of the raw DEM.

Parameters.doPlotPeronaMalikFilteredDEM=0;

This is a logical parameter that plots the DEM after being filtered by using the Perona Malik filtering option to reduce noise and enhance likely channelized pixels.

Parameters.doPlotDEMSlope=0;

This is a logical parameter that plots the slope of the filtered DEM.

Parameters.doPlotDEMCurvature=0;

This is a logical parameter that plots the curvature of the filtered DEM.

Parameters.doPlotDrainageArea=0;

This is a logical parameter that plots the drainage area of the filtered DEM.

Parameters.doPlotDrainageAreaOnDEM=0;

This is a logical parameter that plots the drainage area on the DEM. This is a 3D plot that uses the 3D figure properties.

Parameters.doPlotDrainageAreaPlusOutletsOnDEM=0;

This is a logical parameter that plots the drainage area along with outlets for each watershed on the DEM.

Parameters.doPlotDrainageAreaAndNetworkOnDEM=1;

This is a logical parameter that plots the drainage area and the drainage network on the DEM.

Parameters.doPlotDrainageFlow=0;

This is a logical parameter that plots the drainage flow.

Parameters.doPlotDrainageFlowOnDEM=0;

This is a logical parameter that plots the drainage flow on the DEM.

Parameters.doPlotDrainageFlowPlusOutletsOnDEM=0;

This is a logical parameter that plots the drainage flow along with the outlets for each watershed on the DEM.

Parameters.doPlotDrainageFlowAndNetworkOnDEM=0;

This is a logical parameter that plots the drainage flow along with the drainage network on the DEM.

Parameters.doPlotBasinIndex=1;

This is a logical parameter that plots the basins or the watershed indexed by a number.

Parameters.doPlotBasinIndexOnDEM=1;

This is a logical parameter that plots the basins or the watersheds indexed by a number on the DEM.

Parameters.doPlotSubBasinIndex=0;

This is a logical parameter that plots the subbasins or subwatersheds.

Parameters.doPlotSubBasinIndexOnDEM=1;

This is a logical parameter that plots the the subbasins or subwatersheds on the DEM.

Parameters.plotOrderThreshold=1;

This is a logical parameter that determines the plot order for subbasin plots.

Parameters.doPlotStrahlerOrder=1;

This is a logical parameter that plots the Strahler order of the flow in the region of interest.

Parameters.doPlotStrahlerOrderOnDEM=0;

This is a logical parameter that plots the Strahler order of the flow in the region of interest on the DEM.

Parameters.doPlotHortonOrder=1;

This is a logical parameter that plots the Horton order of the flow in the region of interest.

Parameters.doPlotHortonOrderOnDEM=0;

This is a logical parameter that plots the Horton order of the flow in the region of interest on the DEM.

Parameters.doPlotCurvatureQuantileQuantile=0;

This is a logical parameter that plots the curvature quantile of the region of interest.

Parameters.doPlotLocalCost=0;

This is a logical parameter that plots the local cost calculated by the cost function.

Parameters.doPlotGeodesicDistance=1;

This is a logical parameter that plots the geodesic distance calculated from the fast marching algorithm.

Parameters.doPlotGeodesicDistanceAsDEM=0;

This is a logical parameter that plots the geodesic distance calculated from the fast marching algorithm on the DEM.

Parameters.doPlotDrainageSkeleton=0;

This is a logical parameter that plots the drainage skeleton of the region of interest.

Parameters.doPlotChannelHeadsOnDrainageSkeleton=1;

This is a logical parameter that plots the drainage skeleton with the channel heads.

Parameters.doPlotHistogramUnsortedSkeletonElements=0;

This is a logical parameter that plots the frequency histogram for the unsorted connected components of the skeleton.

Parameters.doPlotHistogramSortedSkeletonElements=0;

This is a logical parameter that plots the frequency histogram for the sorted connected components of the skeleton.

Parameters.doPlotChannelHeadsOnDEM=0;

This is a logical parameter that plots the channel heads on the DEM.

Parameters.doPlotHistogramAreaChannelHeads=0;

This is a logical parameter that plots the frequency histogram of the contributing area at the channel heads.

Parameters.doPlotDrainagePaths=1;

This is a logical parameter that plots the drainage paths identified.

Parameters.doPlotDrainagePathsOnGeodesicDistance=1;

This is a logical parameter that plots the drainage paths identified on the geodesic distance DEM.

Parameters.doPlotDrainagePathsOnDEM=1;

This is a logical parameter that plots the drainage paths on the DEM.

back to top

Raster and Shapefile writing

Parameters.doWriteDEMagain=1;

This is a logical parameter that writes the raw DEM as a tiff file.

Parameters.doWritePeronaMalikFiltered=1;

This is a logical parameter that writes the filtered Perona Malik DEM as a tiff file.

Parameters.doWriteDrainageArea=1;

This is a logical parameter that writes the drainage area as a tiff file.

Parameters.doWriteDrainageFlow=1;

This is a logical parameter that writes the drainage flow as a tiff file.

Parameters.doWriteSlope=1;

This is a logical parameter that writes the slope as a tiff file.

Parameters.doWriteCurvature=1;

This is a logical parameter that writes the curvature as a tiff file.

Parameters.doWriteDrainageSkeleton=1;

This is a logical parameter that writes the drainage skeleton as a tiff file.

Parameters.doWriteCurvatureSkeleton=1;

This is a logical parameter that writes the curvature skeleton as a tiff file.

Parameters.doWriteAreaSkeleton=1;

This is a logical parameter that writes the area skeleton as a tiff file.

Parameters.doWriteGeodesicSkeleton=1;

This is a logical parameter that writes the geodesic skeleton as a tiff file.

Parameters.doWriteGeodesicDistance=1;

This is a logical parameter that writes the geodesic distance calculated over the region of interest as a tiff file.

Parameters.doWriteChannelHeads=1;

This is a logical parameter that writes the channel heads as a shapefile.

Parameters.doWriteDrainagePaths=1;

This is a logical parameter that writes the drainage paths as a shapefile.

back to top

GeoNet processing parameters

GeoNet uses 3 user-defined parameters:

- Number of iterations for nonlinear filtering (Parameters.nFilterIterations): We set this value to 50 and seldom change it. Please see Passalacqua et al. (2010a; b) for a detailed analysis of this parameter.

- Contributing area threshold (Parameters.flowThresholdForSkeleton): The contributing area threshold is simply used to “clean up” or “thin” the curvature skeleton by eliminating pixels with very small contributing areas for the purpose of subsequent accurate channel centerline extraction of the whole network. This threshold area is NOT used to impose a channel initiation area and has to be set to a value smaller than the minimum channel initiation area. Some indication of a reasonable range can be obtained from the slope-area plot or from visual inspection of the lidar data and a crude calculation of some of the smallest channel initiation areas.

- Search box for automatic end point identification of channel centerlines (Parameters.endPointSearchBoxSize): The size of this box is important for the automatic detection of channel interruptions (channel end points) and channel heads in order to trace channels as geodesic curves and guarantee continuity of channels through disruptions such as bridges or any other local change in curvature. We recommend looking at the results with the default value. If the default box size is too large with respect to the distance between channel heads (resulting in missed channel heads from the skeleton), the box size should be reduced.

Users are free to experiment with the code. We thus provide information on any GeoNet processing parameter below. However, please note that only the above 3 are likely to change for your application of interest (particularly, the contributing area threshold).

Parameters.demUtmZone=54;

This parameter sets the UTM zone of the input tiff file.

Parameters.diffusionMethod='PeronaMalik2';

This parameter sets the diffusion method for Perona Malik filtering. The type of diffusion methods supported are PeronaMalik1, PeronaMalik2, Tukey, rampPreserving

Parameters.diffusionTimeIncrement=0.1;

This parameter sets the time increment for the nonlinear diffusion method set above.

Parameters.diffusionSigmaSquared=0.05;

This parameter sets the squared value of the sigma for the nonlinear diffusion method.

Parameters.nFilterIterations=50;

This parameter sets the number of nonlinear filtering iterations that should be run for the region of interest.

Parameters.yxPixelSizeRatio=1.0;

This is a flow routing parameter that sets the pixel ratio: length of pixel in the x-direction to length of pixel in the y-direction.

Parameters.doFloodingFlag=1;

This is a flow routing parameter that sets the flag to perform flooding operation in the flow_route.c file.

Parameters.reciprocalLocalCostFn

This parameter defines the local cost function that should be used for calculating the geodesic distance on the region of interest from a given outlet. A combination of accumulation area, skeleton derived from the curvature array and the mean accumulation area is used by default for this parameter.

Parameters.thresholdAreaSubBasinIndexing=3000;

This parameter is used to set an accumulation area threshold value to compute subbasins in a watershed.

Parameters.thresholdPercentAreaForDelineation=0.0;

This parameter is used to set what portion of the DEM should be tracked for drainage.

Parameters.demSmoothingQuantile=0.9;

This parameter is used to set to smooth small scale variability (noise) and enhance the remaining portion of the landscape. For high resolution topography applications this value is set to 0.9.

Parameters.curvatureCalcMethod='geometric';

This parameter decides what kind of method should be used to measure curvature of the landscape. Based on our analyses, geometric curvature performs best in natural hilly landscapes, while Laplacian helps in flat and engineered landscapes. See Passalacqua et al. [2012].

Parameters.thresholdQqCurvature=1;

This parameter sets the threshold for the q-q plot of the curvature above which the curvature values are treated to be channelized pixels. This threshold is automatically computed within the code.

Parameters.flowThresholdForSkeleton=50;

This parameter sets the area threshold value to clean up the skeleton. This value has to be smaller than channel initiation.

Parameters.endPointSearchBoxSize=50;

This parameter specifies the end point search box size for finding channel heads.

Parameters.doTrueGradientDescent=1;

This parameter sets the method to true gradient descent while calculating the geodesics.

Parameters.doRandomizeFlowDirections=1;

This parameter sets the option that flow directions will be randomized while computation of the Dinf area in the flow_route.c MEX file.

Parameters.flowRandomizeJitterAmplitude=0.2;

This parameter sets the option for the jitter amplitude inside the flow_route.c MEX file.

Parameters.doNewChannelHeadsMethod=1;

This parameter sets the option to use a new method to find channel heads in GeoNet (beta version).

back to top

GeoNet Prepare

This mfile (MATLAB file) is used to prepare the input and output file paths to be used for the installation of GeoNet.

The mfile is divided into three portions:

  1. Input and output file paths
  2. Raster and Shapefile naming
  3. Metadata preparation

Input and output file paths

After preparing the tiff file, a folder is created in a location suitable to the user with the same name as the name of the tiff file.

The tiff file is placed inside this folder and a tiff file name is assigned to the variable Parameters.demDataFileName.

Parameters.demDataFileName

This parameter has to be set in the template. It is usually the name of the tiff file.

Parameters.demDataFilePath

This parameter is used to set the input file path. The input file path is the folder location which contains the input tiff file.

E.g.:

If the input file location on a Windows system is E:\Research\GeoNet\Data\skunk

Then,

Parameters.demDataFileName = skunk;

Parameters.demDataFilePath = fullfile('E:','Research',...

'GeoNet','Data',Parameters.demDataFileName);

The paths for the MAC OS and Unix OS are set similarly.

Raster and Shapefile naming

Parameters.demAgainFileName ...

= [Parameters.demDataFileName,'_again'];

This parameter sets the name of the raster data file written to the disk after being read by GeoNet.

Parameters.peronaMalikFilteredFileName ...

= [Parameters.demDataFileName,'_peronaMalikFiltered'];

This parameter sets the name of the raster data file written to the disk after being filtered by the Peron-Malik filtering operation.

Parameters.accumulationAreaFileName ...

= [Parameters.demDataFileName,'_accumulationArea'];

This parameter sets the name of the accumulation area raster data file.

Parameters.slopeFileName ...

= [Parameters.demDataFileName,'_slope'];

This parameter sets the name of the raster file containing the slope values.

Parameters.curvatureFileName ...

= [Parameters.demDataFileName,'_curvature'];

This parameter sets the name of the raster data file containing the curvature values.

Parameters.skeletonFileName ...

= [Parameters.demDataFileName,'_skeleton'];

This parameter sets the name of the raster data file containing the skeleton of the likely channelized pixels.

Parameters.curvatureSkeletonFileName ...

= [Parameters.demDataFileName,'_curv_skeleton'];

This parameter sets the name of the curvature skeleton raster file.

Parameters.areaSkeletonFileName ...

= [Parameters.demDataFileName,'_area_skeleton'];

This parameter sets the name of the area skeleton raster file.

Parameters.geodesicDistanceFileName ...

= [Parameters.demDataFileName,'_geodesic_distance'];

This parameter sets the name of the geodesic distance raster file.

Metadata Preparation

GeoNet uses an option to either use the goetiffwrite_user mfile or the new geotiffwrite function in the mapping toolbox provided by MATLAB.

Both functions require metadata of the tiff file. These metadata are prepared in this section and passed inside the geonet_procesing mfile for

defining projections in the raster files which are then written to the disk during GeoNet processing. More information about the metadata can be found at

http://www.remotesensing.org/geotiff/spec/geotiff6.html#6.2

Parameters.option.GTModelTypeGeoKey = 1;

This parameter sets the value of the model type code. This value can be:

1: if the model type is projected coordinate system,

2: if the model type is geographic latitude longitude system

3: if the model type is geocentric X, Y, Z coordinate system.

The default value is set to 1.

Parameters.option.GTRasterTypeGeoKey = 1;

This parameter sets the value of the raster type code. This value can be:

1 if the raster pixel is area

2 if the raster pixel is point

The default value is set to be 1.

Parameters.option.GeographicTypeGeoKey = 4326;

This parameter sets the geographic coordinate system key.

The possible values are:

[ 4000, 4199] = EPSG GCS Based on Ellipsoid only

[ 4200, 4999] = EPSG GCS Based on EPSG Datum

4326 = WGS_84

Parameters.option.GeogGeodeticDatumGeoKey = 6326;

This parameter sets the geographic datum key.

The possible values are:

[ 6000, 6199] = EPSG Datum Based on Ellipsoid only

[ 6200, 6999] = EPSG Datum Based on EPSG Datum

[ 6322, 6327] = WGS Datum

Parameters.option.GeogLinearUnitsGeoKey = 9001;

There are several kinds of units that may be used for the raster data; linear units, angular units, units of time (e.g. for radar-return), CCD-voltages.

The possible values are:

Linear_Meter = 9001

Linear_Foot = 9002

Linear_Foot_US_Survey = 9003

Linear_Foot_Modified_American = 9004

The key should be set depending on the linear unit of the tiff file.

Usually all lidar LAS files are in meters and hence by default the linear unit of meters is set as default.

Parameters.option.GeogEllipsoidGeoKey = 7030;

This parameter sets the Ellipsoid key used for the projected raster data.

The possible values are:

[7000, 7999] = EPSG Ellipsoid codes

Ellipse_WGS_84 = 7030

baseline = 32600;

The baseline defines the start position of the key depending upon the UTM zone.

Parameters.option.ProjectedCSTypeGeoKey = 32600+Parameters.demUtmZone;

This parameter defines the projected coordinate system key. As of now only UTM projections are supported. The possible values are

WGS72 / UTM northern hemisphere : 322zz where zz is UTM zone number

WGS72 / UTM southern hemisphere : 323zz where zz is UTM zone number

WGS72BE / UTM northern hemisphere : 324zz where zz is UTM zone number

WGS72BE / UTM southern hemisphere : 325zz where zz is UTM zone number

WGS84 / UTM northern hemisphere : 326zz where zz is UTM zone number

WGS84 / UTM southern hemisphere : 327zz where zz is UTM zone number

US State Plane (NAD27) : 267xx/320xx

US State Plane (NAD83) : 269xx/321xx

Parameters.option.ProjLinearUnitsGeoKey = 9001;

This parameter sets the linear units of the projected coordinate system.

Parameters.option.VerticalCSTypeGeoKey = 5030;

This parameter sets the vertical coordinate system geo key.

The possible values are:

[ 5000, 5099] = EPSG Ellipsoid Vertical CS Codes

[ 5100, 5199] = EPSG Orthometric Vertical CS Codes

Parameters.option.VerticalUnitsGeoKey = 9001;

This parameter sets the vertical units of the coordinate system.

Parameters.demProjectionInfo = ‘UTM Zone 10N with NAD83’

This is the projected coordinate system parameter.

Parameters.option.PCSCitationGeoKey = Parameters.demProjectionInfo;

This parameter is used to specify the projected coordinate system.

back to top

GeoNet executable file (exec mfile)

The executable file is a gateway file to all the other mfiles necessary for a successful run of the GeoNet package. The file is broadly divided into

  1. Set defaults parameter values
  2. Point to the source of the DTM data
  3. Geonet processing choices
  4. Prepare processing parameters
  5. Run GeoNet

Set default parameter values

This section calls the geonet_defaults mfile and sets the necessary parameter values.

Point to source DEM data

This section points to the location of the tiff file.

Parameters.demDataFileName = 'skunk';

The tiff extension is not required.

GeoNet processing choices

The default values should be treated only as guideline and specific to the example data sets provided. User-defined parameters in GeoNet:


Parameters.nFilterIterations (default likely works)

Parameters.flowThresholdForSkeleton (depends on landscape in analysis - has to be smaller than channel initation)

Parameters.endPointSearchBoxSize (start with default)

Prepare processing parameters

After setting the default values, geonet_prepare is called to prepare the parameters described in the geonet prepare section. If wanted, these parameters can be re-assigned new values after the geonet_prepare function call is finished.

Run GeoNet

geonet_processing is called for the complete processing of the tiff file.

back to top