com.esri.arcgis.geoprocessing.tools.spatialanalysttools
Class TopoToRaster
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.spatialanalysttools.TopoToRaster
- All Implemented Interfaces:
- GPTool
public class TopoToRaster
- extends AbstractGPTool
Interpolates a hydrologically correct raster raster surface from point, line, and polygon data.
The Topo to Raster tool is contained in the Spatial Analyst Tools tool box.
Usage tips:
- The best results will be obtained if all input data is stored in the same planar coordinate system and has the same ZUNITS. Unprojected data (latitude/longitude) can be used; however, the results may not be as accurate, particularly at high latitudes.
- Topo to Raster will only use four input data points for the interpolation of each output cell. All additional points are ignored. If too many points are encountered by the algorithm, an error may occur indicating the point dataset has too many points. The maximum number of points that can be used is NRows * NCols, where NRows is the number of rows in the output raster and NCols is the number of columns.
- When the input feature type is CONTOUR, the algorithm first generates a generalized morphology of the surface based on the curvature of the contours. The algorithm then implements the contours as a source of elevation information. Contours are best suited for large-scale data where the contours and corners are reliable indicators of streams and ridges. At smaller scales it can be just as effective, and less expensive, to digitize corner points of contours and use them as an input point feature class.
- Representing braided streams or using arcs to represent two sides of a stream may not produce reliable results. Stream data always takes priority over point or contour data; therefore, elevation data points that conflict with descent down each stream are ignored. Stream data is a powerful way of adding topographic information to the interpolation, further ensuring the quality of the output DEM.
- Typical values for the Tolerance 1 and Tolerance 2 settings are:
- To make experimentation with the inputs and parameters easier, use the Topo to Raster dialog box to create an output parameter file, which can be modified in any text editor and used as input to the Topo to Raster by File tool.
Constructor Summary |
TopoToRaster()
Creates the Topo to Raster tool with defaults. |
TopoToRaster(Object inTopoFeatures,
Object outSurfaceRaster)
Creates the Topo to Raster tool with the required parameters. |
TopoToRaster
public TopoToRaster()
- Creates the Topo to Raster tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
TopoToRaster
public TopoToRaster(Object inTopoFeatures,
Object outSurfaceRaster)
- Creates the Topo to Raster tool with the required parameters.
Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.
- Parameters:
inTopoFeatures
- the Topo class specifies the input features containing the z-values to be interpolated into a surface raster. there are six types of data accepted inputs to the Topo class: TopoPointElevation, TopoContour, TopoStream, TopoSink, TopoBoundary, TopoLake. the PointElevation, Contour and Sink types of feature input can have a field specified that contains the z-values. There is no Field option for Boundary, Lake or Stream input types.outSurfaceRaster
- the output interpolated surface raster.
getInTopoFeatures
public Object getInTopoFeatures()
- Returns the Input feature data parameter of this tool .
This parameter is the Topo class specifies the input features containing the z-values to be interpolated into a surface raster. there are six types of data accepted inputs to the Topo class: TopoPointElevation, TopoContour, TopoStream, TopoSink, TopoBoundary, TopoLake. the PointElevation, Contour and Sink types of feature input can have a field specified that contains the z-values. There is no Field option for Boundary, Lake or Stream input types.
This is a required parameter.
- Returns:
- the Input feature data
setInTopoFeatures
public void setInTopoFeatures(Object inTopoFeatures)
- Sets the Input feature data parameter of this tool .
This parameter is the Topo class specifies the input features containing the z-values to be interpolated into a surface raster. there are six types of data accepted inputs to the Topo class: TopoPointElevation, TopoContour, TopoStream, TopoSink, TopoBoundary, TopoLake. the PointElevation, Contour and Sink types of feature input can have a field specified that contains the z-values. There is no Field option for Boundary, Lake or Stream input types.
This is a required parameter.
- Parameters:
inTopoFeatures
- the Topo class specifies the input features containing the z-values to be interpolated into a surface raster. there are six types of data accepted inputs to the Topo class: TopoPointElevation, TopoContour, TopoStream, TopoSink, TopoBoundary, TopoLake. the PointElevation, Contour and Sink types of feature input can have a field specified that contains the z-values. There is no Field option for Boundary, Lake or Stream input types.
getOutSurfaceRaster
public Object getOutSurfaceRaster()
- Returns the Output surface raster parameter of this tool .
This parameter is the output interpolated surface raster.
This is a required parameter.
- Returns:
- the Output surface raster
setOutSurfaceRaster
public void setOutSurfaceRaster(Object outSurfaceRaster)
- Sets the Output surface raster parameter of this tool .
This parameter is the output interpolated surface raster.
This is a required parameter.
- Parameters:
outSurfaceRaster
- the output interpolated surface raster.
getCellSize
public Object getCellSize()
- Returns the Output cell size parameter of this tool .
This parameter is the cell size at which the output raster will be created. this will be the value in the environment if it is explicitly set. Otherwise, it is the shorter of the width or the height of the extent of the input point features, in the input spatial reference, divided by 250.
This is an optional parameter.
- Returns:
- the Output cell size
setCellSize
public void setCellSize(Object cellSize)
- Sets the Output cell size parameter of this tool .
This parameter is the cell size at which the output raster will be created. this will be the value in the environment if it is explicitly set. Otherwise, it is the shorter of the width or the height of the extent of the input point features, in the input spatial reference, divided by 250.
This is an optional parameter.
- Parameters:
cellSize
- the cell size at which the output raster will be created. this will be the value in the environment if it is explicitly set. Otherwise, it is the shorter of the width or the height of the extent of the input point features, in the input spatial reference, divided by 250.
getExtent
public Object getExtent()
- Returns the Output extent parameter of this tool .
This parameter is the Extent class determines the extent for the output raster dataset. interpolation will occur out to the x and y limits, and cells outside that extent will be NoData. For best interpolation results along the edges of the output raster, the x and y limits should be smaller than the extent of the input data by at least 10 cells on each side. the form of the Extent class is: the default extent is the smallest of all extents of the input feature data. extent for the output raster dataset. interpolation will occur out to the x and y limits, and cells outside that extent will be NoData. For best interpolation results along the edges of the output raster, the x and y limits should be smaller than the extent of the input data by at least 10 cells on each side. the default extent is the smallest of all extents of the input feature data.
This is an optional parameter.
- Returns:
- the Output extent
setExtent
public void setExtent(Object extent)
- Sets the Output extent parameter of this tool .
This parameter is the Extent class determines the extent for the output raster dataset. interpolation will occur out to the x and y limits, and cells outside that extent will be NoData. For best interpolation results along the edges of the output raster, the x and y limits should be smaller than the extent of the input data by at least 10 cells on each side. the form of the Extent class is: the default extent is the smallest of all extents of the input feature data. extent for the output raster dataset. interpolation will occur out to the x and y limits, and cells outside that extent will be NoData. For best interpolation results along the edges of the output raster, the x and y limits should be smaller than the extent of the input data by at least 10 cells on each side. the default extent is the smallest of all extents of the input feature data.
This is an optional parameter.
- Parameters:
extent
- the Extent class determines the extent for the output raster dataset. interpolation will occur out to the x and y limits, and cells outside that extent will be NoData. For best interpolation results along the edges of the output raster, the x and y limits should be smaller than the extent of the input data by at least 10 cells on each side. the form of the Extent class is: the default extent is the smallest of all extents of the input feature data. extent for the output raster dataset. interpolation will occur out to the x and y limits, and cells outside that extent will be NoData. For best interpolation results along the edges of the output raster, the x and y limits should be smaller than the extent of the input data by at least 10 cells on each side. the default extent is the smallest of all extents of the input feature data.- Extent (XMin, YMin, XMax, YMax)
getMargin
public int getMargin()
- Returns the Margin in cells parameter of this tool .
This parameter is distance in cells to interpolate beyond the specified output extent and boundary. the value must be greater than or equal to 0 (zero). The default value is 20. if the Extent and TopoBoundary feature dataset are the same as the limit of the input data (the default), values interpolated along the edge of the DEM will not match well with adjacent DEM data. This is because they have been interpolated using one-half as much data as the points inside the raster, which are surrounded on all sides by input data. The Margin option allows input data beyond these limits to be used in the interpolation.
This is an optional parameter.
- Returns:
- the Margin in cells
setMargin
public void setMargin(int margin)
- Sets the Margin in cells parameter of this tool .
This parameter is distance in cells to interpolate beyond the specified output extent and boundary. the value must be greater than or equal to 0 (zero). The default value is 20. if the Extent and TopoBoundary feature dataset are the same as the limit of the input data (the default), values interpolated along the edge of the DEM will not match well with adjacent DEM data. This is because they have been interpolated using one-half as much data as the points inside the raster, which are surrounded on all sides by input data. The Margin option allows input data beyond these limits to be used in the interpolation.
This is an optional parameter.
- Parameters:
margin
- distance in cells to interpolate beyond the specified output extent and boundary. the value must be greater than or equal to 0 (zero). The default value is 20. if the Extent and TopoBoundary feature dataset are the same as the limit of the input data (the default), values interpolated along the edge of the DEM will not match well with adjacent DEM data. This is because they have been interpolated using one-half as much data as the points inside the raster, which are surrounded on all sides by input data. The Margin option allows input data beyond these limits to be used in the interpolation.
getMinimumZValue
public double getMinimumZValue()
- Returns the Smallest z value to be used in interpolation parameter of this tool .
This parameter is the minimum z-value to be used in the interpolation. the default is 20 percent below the smallest of all the input values. This setting should seldom be less than zero (sea level).
This is an optional parameter.
- Returns:
- the Smallest z value to be used in interpolation
setMinimumZValue
public void setMinimumZValue(double minimumZValue)
- Sets the Smallest z value to be used in interpolation parameter of this tool .
This parameter is the minimum z-value to be used in the interpolation. the default is 20 percent below the smallest of all the input values. This setting should seldom be less than zero (sea level).
This is an optional parameter.
- Parameters:
minimumZValue
- the minimum z-value to be used in the interpolation. the default is 20 percent below the smallest of all the input values. This setting should seldom be less than zero (sea level).
getMaximumZValue
public double getMaximumZValue()
- Returns the Largest z value to be used in interpolation parameter of this tool .
This parameter is the maximum z-value to be used in the interpolation. the default is 20 percent above the largest of all input values.
This is an optional parameter.
- Returns:
- the Largest z value to be used in interpolation
setMaximumZValue
public void setMaximumZValue(double maximumZValue)
- Sets the Largest z value to be used in interpolation parameter of this tool .
This parameter is the maximum z-value to be used in the interpolation. the default is 20 percent above the largest of all input values.
This is an optional parameter.
- Parameters:
maximumZValue
- the maximum z-value to be used in the interpolation. the default is 20 percent above the largest of all input values.
getEnforce
public String getEnforce()
- Returns the Drainage enforcement parameter of this tool .
This parameter is the type of drainage enforcement to apply. the drainage enforcement option can be set to attempt to remove all sinks or depressions so a hydrologically correct DEM can be created. If sink points have been explicitly identified in the input feature data, these depressions will not be filled.
This is an optional parameter.
- Returns:
- the Drainage enforcement
setEnforce
public void setEnforce(String enforce)
- Sets the Drainage enforcement parameter of this tool .
This parameter is the type of drainage enforcement to apply. the drainage enforcement option can be set to attempt to remove all sinks or depressions so a hydrologically correct DEM can be created. If sink points have been explicitly identified in the input feature data, these depressions will not be filled.
This is an optional parameter.
- Parameters:
enforce
- the type of drainage enforcement to apply. the drainage enforcement option can be set to attempt to remove all sinks or depressions so a hydrologically correct DEM can be created. If sink points have been explicitly identified in the input feature data, these depressions will not be filled.
getDataType
public String getDataType()
- Returns the Primary type of input data parameter of this tool .
This parameter is the dominant elevation data type of the input feature data. specifying the relevant selection optimizes the search method used during the generation of streams and ridges.
This is an optional parameter.
- Returns:
- the Primary type of input data
setDataType
public void setDataType(String dataType)
- Sets the Primary type of input data parameter of this tool .
This parameter is the dominant elevation data type of the input feature data. specifying the relevant selection optimizes the search method used during the generation of streams and ridges.
This is an optional parameter.
- Parameters:
dataType
- the dominant elevation data type of the input feature data. specifying the relevant selection optimizes the search method used during the generation of streams and ridges.
getMaximumIterations
public int getMaximumIterations()
- Returns the Maximum number of iterations parameter of this tool .
This parameter is the maximum number of interpolation iterations. the number of iterations must be greater than zero. A default of 40 is normally adequate for both contour and line data. a value of 30 will clear fewer sinks. Rarely, higher values (45-50) may be useful to clear more sinks or to set more ridges and streams. Iteration ceases for each grid resolution when the maximum number of iterations has been reached.
This is an optional parameter.
- Returns:
- the Maximum number of iterations
setMaximumIterations
public void setMaximumIterations(int maximumIterations)
- Sets the Maximum number of iterations parameter of this tool .
This parameter is the maximum number of interpolation iterations. the number of iterations must be greater than zero. A default of 40 is normally adequate for both contour and line data. a value of 30 will clear fewer sinks. Rarely, higher values (45-50) may be useful to clear more sinks or to set more ridges and streams. Iteration ceases for each grid resolution when the maximum number of iterations has been reached.
This is an optional parameter.
- Parameters:
maximumIterations
- the maximum number of interpolation iterations. the number of iterations must be greater than zero. A default of 40 is normally adequate for both contour and line data. a value of 30 will clear fewer sinks. Rarely, higher values (45-50) may be useful to clear more sinks or to set more ridges and streams. Iteration ceases for each grid resolution when the maximum number of iterations has been reached.
getRoughnessPenalty
public double getRoughnessPenalty()
- Returns the Roughness penalty parameter of this tool .
This parameter is the integrated squared second derivative as a measure of roughness. the roughness penalty must be zero or greater. If the primary input data type is CONTOUR, the default is zero. If the primary data type is SPOT, the default is 0.5. Larger values are not normally recommended.
This is an optional parameter.
- Returns:
- the Roughness penalty
setRoughnessPenalty
public void setRoughnessPenalty(double roughnessPenalty)
- Sets the Roughness penalty parameter of this tool .
This parameter is the integrated squared second derivative as a measure of roughness. the roughness penalty must be zero or greater. If the primary input data type is CONTOUR, the default is zero. If the primary data type is SPOT, the default is 0.5. Larger values are not normally recommended.
This is an optional parameter.
- Parameters:
roughnessPenalty
- the integrated squared second derivative as a measure of roughness. the roughness penalty must be zero or greater. If the primary input data type is CONTOUR, the default is zero. If the primary data type is SPOT, the default is 0.5. Larger values are not normally recommended.
getDiscreteErrorFactor
public double getDiscreteErrorFactor()
- Returns the Discretisation error factor parameter of this tool .
This parameter is the discrete error factor is used to adjust the amount of smoothing when converting the input data to a raster. the value must be greater than zero. The normal range of adjustment is 0.5 to 2, and the default is 1. A smaller value results in less data smoothing; a larger value causes greater smoothing.
This is an optional parameter.
- Returns:
- the Discretisation error factor
setDiscreteErrorFactor
public void setDiscreteErrorFactor(double discreteErrorFactor)
- Sets the Discretisation error factor parameter of this tool .
This parameter is the discrete error factor is used to adjust the amount of smoothing when converting the input data to a raster. the value must be greater than zero. The normal range of adjustment is 0.5 to 2, and the default is 1. A smaller value results in less data smoothing; a larger value causes greater smoothing.
This is an optional parameter.
- Parameters:
discreteErrorFactor
- the discrete error factor is used to adjust the amount of smoothing when converting the input data to a raster. the value must be greater than zero. The normal range of adjustment is 0.5 to 2, and the default is 1. A smaller value results in less data smoothing; a larger value causes greater smoothing.
getVerticalStandardError
public double getVerticalStandardError()
- Returns the Vertical standard error parameter of this tool .
This parameter is the amount of random error in the z-values of the input data. the value must be zero or greater. The default is zero. the vertical standard error may be set to a small positive value if the data has significant random (nonsystematic) vertical errors with uniform variance. In this case, set the vertical standard error to the standard deviation of these errors. For most elevation datasets, the vertical error should be set to zero, but it may be set to a small positive value to stabilize convergence when gridding point data with stream line data.
This is an optional parameter.
- Returns:
- the Vertical standard error
setVerticalStandardError
public void setVerticalStandardError(double verticalStandardError)
- Sets the Vertical standard error parameter of this tool .
This parameter is the amount of random error in the z-values of the input data. the value must be zero or greater. The default is zero. the vertical standard error may be set to a small positive value if the data has significant random (nonsystematic) vertical errors with uniform variance. In this case, set the vertical standard error to the standard deviation of these errors. For most elevation datasets, the vertical error should be set to zero, but it may be set to a small positive value to stabilize convergence when gridding point data with stream line data.
This is an optional parameter.
- Parameters:
verticalStandardError
- the amount of random error in the z-values of the input data. the value must be zero or greater. The default is zero. the vertical standard error may be set to a small positive value if the data has significant random (nonsystematic) vertical errors with uniform variance. In this case, set the vertical standard error to the standard deviation of these errors. For most elevation datasets, the vertical error should be set to zero, but it may be set to a small positive value to stabilize convergence when gridding point data with stream line data.
getTolerance1
public double getTolerance1()
- Returns the Tolerance 1 parameter of this tool .
This parameter is this tolerance reflects the accuracy and density of the elevation points in relation to surface drainage. for point datasets, set the tolerance to the standard error of the data heights. For contour datasets, use one-half the average contour interval. the value must be zero or greater. The default is 2.5 if the data type is CONTOUR; zero if the data type is SPOT.
This is an optional parameter.
- Returns:
- the Tolerance 1
setTolerance1
public void setTolerance1(double tolerance1)
- Sets the Tolerance 1 parameter of this tool .
This parameter is this tolerance reflects the accuracy and density of the elevation points in relation to surface drainage. for point datasets, set the tolerance to the standard error of the data heights. For contour datasets, use one-half the average contour interval. the value must be zero or greater. The default is 2.5 if the data type is CONTOUR; zero if the data type is SPOT.
This is an optional parameter.
- Parameters:
tolerance1
- this tolerance reflects the accuracy and density of the elevation points in relation to surface drainage. for point datasets, set the tolerance to the standard error of the data heights. For contour datasets, use one-half the average contour interval. the value must be zero or greater. The default is 2.5 if the data type is CONTOUR; zero if the data type is SPOT.
getTolerance2
public double getTolerance2()
- Returns the Tolerance 2 parameter of this tool .
This parameter is this tolerance prevents drainage clearance through unrealistically high barriers. the value must be greater than zero. The default is 100 if the data type is CONTOUR and 200 if the data type is SPOT.
This is an optional parameter.
- Returns:
- the Tolerance 2
setTolerance2
public void setTolerance2(double tolerance2)
- Sets the Tolerance 2 parameter of this tool .
This parameter is this tolerance prevents drainage clearance through unrealistically high barriers. the value must be greater than zero. The default is 100 if the data type is CONTOUR and 200 if the data type is SPOT.
This is an optional parameter.
- Parameters:
tolerance2
- this tolerance prevents drainage clearance through unrealistically high barriers. the value must be greater than zero. The default is 100 if the data type is CONTOUR and 200 if the data type is SPOT.
getOutStreamFeatures
public Object getOutStreamFeatures()
- Returns the Output stream polyline features parameter of this tool .
This parameter is the output line feature class of stream polyline features and ridge line features. the line features are created at the beginning of the interpolation process. It provides the general morphology of the surface for interpolation. It can be used to verify correct drainage and morphology by comparing known stream and ridge data.
This is an optional parameter.
- Returns:
- the Output stream polyline features
setOutStreamFeatures
public void setOutStreamFeatures(Object outStreamFeatures)
- Sets the Output stream polyline features parameter of this tool .
This parameter is the output line feature class of stream polyline features and ridge line features. the line features are created at the beginning of the interpolation process. It provides the general morphology of the surface for interpolation. It can be used to verify correct drainage and morphology by comparing known stream and ridge data.
This is an optional parameter.
- Parameters:
outStreamFeatures
- the output line feature class of stream polyline features and ridge line features. the line features are created at the beginning of the interpolation process. It provides the general morphology of the surface for interpolation. It can be used to verify correct drainage and morphology by comparing known stream and ridge data.
getOutSinkFeatures
public Object getOutSinkFeatures()
- Returns the Output remaining sink point features parameter of this tool .
This parameter is the output point feature class of the remaining sink point features. these are the sinks that were not specified in the sink input feature data and were not cleared during drainage enforcement. Adjusting the values of the tolerances, tolerance_1 and tolerance_2, can reduce the number of remaining sinks. Remaining sinks often indicate errors in the input data that the drainage enforcement algorithm could not resolve. This can be an efficient way of detecting subtle elevation errors.
This is an optional parameter.
- Returns:
- the Output remaining sink point features
setOutSinkFeatures
public void setOutSinkFeatures(Object outSinkFeatures)
- Sets the Output remaining sink point features parameter of this tool .
This parameter is the output point feature class of the remaining sink point features. these are the sinks that were not specified in the sink input feature data and were not cleared during drainage enforcement. Adjusting the values of the tolerances, tolerance_1 and tolerance_2, can reduce the number of remaining sinks. Remaining sinks often indicate errors in the input data that the drainage enforcement algorithm could not resolve. This can be an efficient way of detecting subtle elevation errors.
This is an optional parameter.
- Parameters:
outSinkFeatures
- the output point feature class of the remaining sink point features. these are the sinks that were not specified in the sink input feature data and were not cleared during drainage enforcement. Adjusting the values of the tolerances, tolerance_1 and tolerance_2, can reduce the number of remaining sinks. Remaining sinks often indicate errors in the input data that the drainage enforcement algorithm could not resolve. This can be an efficient way of detecting subtle elevation errors.
getOutDiagnosticFile
public Object getOutDiagnosticFile()
- Returns the Output diagnostic file parameter of this tool .
This parameter is the output diagnostic file listing all inputs and parameters used and the number of sinks cleared at each resolution and iteration.
This is an optional parameter.
- Returns:
- the Output diagnostic file
setOutDiagnosticFile
public void setOutDiagnosticFile(Object outDiagnosticFile)
- Sets the Output diagnostic file parameter of this tool .
This parameter is the output diagnostic file listing all inputs and parameters used and the number of sinks cleared at each resolution and iteration.
This is an optional parameter.
- Parameters:
outDiagnosticFile
- the output diagnostic file listing all inputs and parameters used and the number of sinks cleared at each resolution and iteration.
getOutParameterFile
public Object getOutParameterFile()
- Returns the Output parameter file parameter of this tool .
This parameter is the output parameter file listing all inputs and parameters used, which can be used with Topo to Raster by File to run the interpolation again.
This is an optional parameter.
- Returns:
- the Output parameter file
setOutParameterFile
public void setOutParameterFile(Object outParameterFile)
- Sets the Output parameter file parameter of this tool .
This parameter is the output parameter file listing all inputs and parameters used, which can be used with Topo to Raster by File to run the interpolation again.
This is an optional parameter.
- Parameters:
outParameterFile
- the output parameter file listing all inputs and parameters used, which can be used with Topo to Raster by File to run the interpolation again.
getToolName
public String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias