Hillshade Algorithm : 음영기복도 알고리즘

2009. 4. 22. 16:21MY SPACE/In My Brain

반응형

아래 힘들게 읽지 마시고 원본 링크에서 보세요. 링크는 바로 아래 클릭!
http://edndoc.esri.com/arcobjects/9.2/NET/shared/geoprocessing/spatial_analyst_tools/how_hillshade_works.htm

이하 원문의 샘플부분만 발췌한 것임

The cell size is 5 units. The default Altitude of 45 degrees and Azimuth of 315 degrees will be used.

Illumination angle

The calculation for Zenith angle from equation 2 is:

(2)  Zenith_deg = 90 - Altitude = 90 - 45 = 45

And converted to radians from equation 3 is:

(3)  Zenith_rad = Zenith_deg *  / 180.0  = 45 * 3.1428571429 / 180 = 0.7857142857

The illumination direction

The calculation for converting the azimuth angle from geographic to mathematic angle with equation 4 is:

(4)  Azimuth_math = 360.0 - Azimuth + 90  = 360.0 - 315 + 90 = 135

Converting azimuth angle to radians with equation 6 is:

(6)  Azimuth_rad = Azimuth_math *  / 180.0 = 135 * 3.1438571429/180 = 2.3571428571

Slope and Aspect

The calculation for the rate of change in the x direction for center cell 'e' is:

(7)  [dz/dx] = ((c + 2f + i) - (a + 2d + g)) / (8 * cellsize) = ((2483+ 4966 + 2477) - (2450 + 4904 + 2447)) / (8 * 5)              = (9926 - 9801)/ 40             = 3.125

The calculation for rate of change in the y direction for center cell 'e' is:

(8)  [dz/dy] = ((g + 2h + i) - (a + 2b + c))  / (8 * cellsize)  = (2447 + 4910 + 2477) - (2450 + 4922 + 2483) / (8 * 5)             = (9834 - 9855) / 40             = -0.525

The calculation for the Slope angle is:

(9)  Slope_rad = ATAN ( z_factor * √ ( [dz/dx]2 + [dz/dy]2) ) = atan(1 * sqrt(3.125 * 3.125 + -0.525 * -0.525)) = 1.26511

The calculation for the Aspect_rad angle from rule 10 is:

(since dz/dx is non-zero in this example)

Aspect_rad = atan2 ([dz/dy], -[dz/dx]) = atan2(-0.525, -3.125) = -2.9751469600412

(and since this value is less than 0, this part of the rule applies):

Aspect_rad = 2 + Aspect_rad = 2 * 3.1428571429 + -2.9751469600412 = 3.310567

Hillshade

The final calculation for the Hillshade is:

Hillshade = 255.0 * ( ( cos(Zenith_rad) * cos(Slope_rad) ) + ( sin(Zenith_rad) * sin(Slope_rad) * cos(Azimuth_rad - Aspect_rad) ) )          = 255.0 * ( ( cos(0.7857142857) * cos(1.26511) ) +              ( sin(0.7857142857) * sin(1.26511) * cos(2.3571428571 - 3.310567) ) )          = 153.82

Since the output raster is of integer type, the Shade value for center cell 'e' = 154.

반응형