아래 힘들게 읽지 마시고 원본 링크에서 보세요. 링크는 바로 아래 클릭!
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.
'경제적 자유 > 자기개발' 카테고리의 다른 글
| 우분투에도 마켓이 있네 (2) | 2010/07/25 |
|---|---|
| 구글 리퀴드 갤럭시 (0) | 2010/02/15 |
| Hillshade Algorithm : 음영기복도 알고리즘 (4) | 2009/04/22 |
| 2009 Advance Computing Conference : "오픈소스" 최신기술 동향 및 산업전망 컨퍼런스 (0) | 2009/04/10 |
| 한장의 지도, 세상의 중심은 어디인가! (2) | 2009/01/12 |
| CES 2009에 관심가는 그래픽 기술이 나왔네요. (2) | 2009/01/12 |


댓글을 달아 주세요
헉 이 외계어들은 뭔가요 ^^
헉 제가 외계인인걸 알아차리시다니.
요건 우리별에서 지구 침략을 위해 비밀 프로젝트 진행중인건데요~~
지표면의 기울기와 방향을 찾은 뒤에 지구의 공전퀘도에서 태양각을 계산하고 이 3가지를 합하면 어디에 얼마만큼 그림자가 생기는지 찾는 계산식이예요.
한마디로 지구의 가장 어두운 곳에 UFO 기지를 건설하자는 건데.. 쉿! 다른 외계인들한테는 비밀이예요.
아직 지구의 공전, 자전에 대한 정보수집이 덜되서그런데 정보좀~~
정보료는 오리온 별 사탕!
와우~ 멋진걸요. 그럼 저거 해석하면 UFO건설기지를 볼수 있는건가요? ㅋㅋㅋ 구경이라도 좀...^^
아마도~~
기지까지 찾아 오시면 오리온 별 커피 한 잔 드릴께요. 흐흐...