com.esri.arcgis.geoprocessing.tools.spatialanalysttools
Class HillShade
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.spatialanalysttools.HillShade
- All Implemented Interfaces:
- GPTool
public class HillShade
- extends AbstractGPTool
Creates a shaded relief from a surface raster by considering the illumination source angle and shadows.
The Hillshade tool is contained in the Spatial Analyst Tools tool box.
Usage tips:
- The Hillshade tool creates a shaded relief raster from a raster. The illumination source is considered to be at infinity.
- The hillshade raster has an integer value range of 0 to 255.
- Two types of shaded relief rasters can be output. If the Model shadows option is disabled (unchecked), the output raster only considers local illumination angle. If it is enabled (checked), the output raster considers the effects of both local illumination angle and shadow.
- The analysis of shadows is done by considering the effects of the local horizon at each cell. Raster cells in shadow are assigned a value of zero.
- To create a raster of the shadow areas only, use the , , or tool to separate the value zero from the other hillshade values. Hillshade must have had the Model shadows option enabled.
- If the input raster is in a spherical coordinate system, such as decimal degrees, the resulting hillshade may look peculiar. This is due to the difference in measure between the horizontal ground units and the elevation z units. Since the length of a degree of longitude changes with latitude, you will need to specify an appropriate z-factor for that latitude. If your x,y units are decimal degrees and your z units are meters, some appropriate z-factors for particular latitudes are:
Latitude Z-factor
0 0.00000898
10 0.00000912
20 0.00000956
30 0.00001036
40 0.00001171
50 0.00001395
60 0.00001792
70 0.00002619
80 0.00005156
- You can create dramatic three-dimensional views of the hillshaded surface by draping the output raster using ArcGIS ArcScene.
Constructor Summary |
HillShade()
Creates the Hillshade tool with defaults. |
HillShade(java.lang.Object inRaster,
java.lang.Object outRaster)
Creates the Hillshade tool with the required parameters. |
Method Summary |
double |
getAltitude()
Returns the Altitude parameter of this tool . |
double |
getAzimuth()
Returns the Azimuth parameter of this tool . |
java.lang.Object |
getInRaster()
Returns the Input raster parameter of this tool . |
java.lang.String |
getModelShadows()
Returns the Model shadows parameter of this tool . |
java.lang.Object |
getOutRaster()
Returns the Output raster parameter of this tool . |
java.lang.String |
getToolboxAlias()
Returns the alias of the tool box containing this tool. |
java.lang.String |
getToolboxName()
Returns the name of the tool box containing this tool. |
java.lang.String |
getToolName()
Returns the name of this tool. |
double |
getZFactor()
Returns the Z factor parameter of this tool . |
void |
setAltitude(double altitude)
Sets the Altitude parameter of this tool . |
void |
setAzimuth(double azimuth)
Sets the Azimuth parameter of this tool . |
void |
setInRaster(java.lang.Object inRaster)
Sets the Input raster parameter of this tool . |
void |
setModelShadows(java.lang.String modelShadows)
Sets the Model shadows parameter of this tool . |
void |
setOutRaster(java.lang.Object outRaster)
Sets the Output raster parameter of this tool . |
void |
setZFactor(double zFactor)
Sets the Z factor parameter of this tool . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HillShade
public HillShade()
- Creates the Hillshade tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
HillShade
public HillShade(java.lang.Object inRaster,
java.lang.Object outRaster)
- Creates the Hillshade 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:
inRaster
- the input surface raster.outRaster
- the output hillshade raster. the hillshade raster has an integer value range of 0 to 255.
getInRaster
public java.lang.Object getInRaster()
- Returns the Input raster parameter of this tool .
This parameter is the input surface raster.
This is a required parameter.
- Returns:
- the Input raster
setInRaster
public void setInRaster(java.lang.Object inRaster)
- Sets the Input raster parameter of this tool .
This parameter is the input surface raster.
This is a required parameter.
- Parameters:
inRaster
- the input surface raster.
getOutRaster
public java.lang.Object getOutRaster()
- Returns the Output raster parameter of this tool .
This parameter is the output hillshade raster. the hillshade raster has an integer value range of 0 to 255.
This is a required parameter.
- Returns:
- the Output raster
setOutRaster
public void setOutRaster(java.lang.Object outRaster)
- Sets the Output raster parameter of this tool .
This parameter is the output hillshade raster. the hillshade raster has an integer value range of 0 to 255.
This is a required parameter.
- Parameters:
outRaster
- the output hillshade raster. the hillshade raster has an integer value range of 0 to 255.
getAzimuth
public double getAzimuth()
- Returns the Azimuth parameter of this tool .
This parameter is azimuth angle of the light source. the azimuth is expressed in positive degrees from 0 to 360, measured clockwise from north. the default is 315 degrees.
This is an optional parameter.
- Returns:
- the Azimuth
setAzimuth
public void setAzimuth(double azimuth)
- Sets the Azimuth parameter of this tool .
This parameter is azimuth angle of the light source. the azimuth is expressed in positive degrees from 0 to 360, measured clockwise from north. the default is 315 degrees.
This is an optional parameter.
- Parameters:
azimuth
- azimuth angle of the light source. the azimuth is expressed in positive degrees from 0 to 360, measured clockwise from north. the default is 315 degrees.
getAltitude
public double getAltitude()
- Returns the Altitude parameter of this tool .
This parameter is altitude angle of the light source above the horizon. the altitude is expressed in positive degrees, with 0 degrees at the horizon and 90 degrees directly overhead. the default is 45 degrees.
This is an optional parameter.
- Returns:
- the Altitude
setAltitude
public void setAltitude(double altitude)
- Sets the Altitude parameter of this tool .
This parameter is altitude angle of the light source above the horizon. the altitude is expressed in positive degrees, with 0 degrees at the horizon and 90 degrees directly overhead. the default is 45 degrees.
This is an optional parameter.
- Parameters:
altitude
- altitude angle of the light source above the horizon. the altitude is expressed in positive degrees, with 0 degrees at the horizon and 90 degrees directly overhead. the default is 45 degrees.
getModelShadows
public java.lang.String getModelShadows()
- Returns the Model shadows parameter of this tool .
This parameter is type of shaded relief to be generated.
This is an optional parameter.
- Returns:
- the Model shadows
setModelShadows
public void setModelShadows(java.lang.String modelShadows)
- Sets the Model shadows parameter of this tool .
This parameter is type of shaded relief to be generated.
This is an optional parameter.
- Parameters:
modelShadows
- type of shaded relief to be generated.
getZFactor
public double getZFactor()
- Returns the Z factor parameter of this tool .
This parameter is number of ground x,y units in one surface z unit. the z-factor adjusts the units of measure for the z units when they are different from the x,y units of the input surface. The z-values of the input surface are multiplied by the z-factor when calculating the final output surface. if the x,y units and z units are in the same units of measure, the z-factor is 1. This is the default. if the x,y units and z units are in different units of measure, the z-factor must be set to the appropriate factor, or the results will be incorrect. For example, if your z units are feet and your x,y units are meters, you would use a z-factor of 0.3048 to convert your z units from feet to meters (1 foot = 0.3048 meter).
This is an optional parameter.
- Returns:
- the Z factor
setZFactor
public void setZFactor(double zFactor)
- Sets the Z factor parameter of this tool .
This parameter is number of ground x,y units in one surface z unit. the z-factor adjusts the units of measure for the z units when they are different from the x,y units of the input surface. The z-values of the input surface are multiplied by the z-factor when calculating the final output surface. if the x,y units and z units are in the same units of measure, the z-factor is 1. This is the default. if the x,y units and z units are in different units of measure, the z-factor must be set to the appropriate factor, or the results will be incorrect. For example, if your z units are feet and your x,y units are meters, you would use a z-factor of 0.3048 to convert your z units from feet to meters (1 foot = 0.3048 meter).
This is an optional parameter.
- Parameters:
zFactor
- number of ground x,y units in one surface z unit. the z-factor adjusts the units of measure for the z units when they are different from the x,y units of the input surface. The z-values of the input surface are multiplied by the z-factor when calculating the final output surface. if the x,y units and z units are in the same units of measure, the z-factor is 1. This is the default. if the x,y units and z units are in different units of measure, the z-factor must be set to the appropriate factor, or the results will be incorrect. For example, if your z units are feet and your x,y units are meters, you would use a z-factor of 0.3048 to convert your z units from feet to meters (1 foot = 0.3048 meter).
getToolName
public java.lang.String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public java.lang.String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public java.lang.String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias