2009. 4. 22. 16:21ㆍMY 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.
'MY SPACE > In My Brain' 카테고리의 다른 글
OSGeo 한국어지부 (0) | 2011.10.15 |
---|---|
갤럭시S 루팅 (0) | 2010.07.31 |
우분투 패널 초기화 (0) | 2010.07.27 |
우분투에도 마켓이 있네 (2) | 2010.07.25 |
구글 리퀴드 갤럭시 (0) | 2010.02.15 |
2009 Advance Computing Conference : "오픈소스" 최신기술 동향 및 산업전망 컨퍼런스 (0) | 2009.04.10 |
한장의 지도, 세상의 중심은 어디인가! (2) | 2009.01.12 |
CES 2009에 관심가는 그래픽 기술이 나왔네요. (2) | 2009.01.12 |
봉사와 해외경험을 동시에 한국국제협력단 한국해외봉사단 (0) | 2009.01.10 |
OSGeo(Open Source GeoSpatial) 한국어 지부 3차 모임 후기 (0) | 2008.12.08 |