You are here: > ESRI Forums > arcview 3.x users discussion forums > Thread Replies

ArcView 3.x Users Discussion Forums

ArcView Spatial Analyst forum

Calculating Earth curvature for viewshed   phil blondin Jun 28, 2005
Re: Calculating Earth curvature for viewshe...   Dan Patterson Jun 28, 2005
Re: Calculating Earth curvature for viewshe...   William Huber Jun 29, 2005
Re: Calculating Earth curvature for viewshe...   Dan Patterson Jun 29, 2005
Re: Calculating Earth curvature for viewshe...   phil blondin Jun 29, 2005
Adjusting the Coefficient for the Refaction...   Erik Marsh Jan 27, 2008
Re: Adjusting the Coefficient for the Refac...   William Huber Jan 28, 2008
Should the Refractivity Coefficient be 0.32...   Erik Marsh Jan 30, 2008
Should the Refractivity Coefficient be 0.32...   Erik Marsh Jan 30, 2008
Re: Should the Refractivity Coefficient be...   William Huber Jan 31, 2008
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Calculating Earth curvature for viewshed 
Author phil blondin 
Date Jun 28, 2005 
Message Just wondering if anyone can tell me how to account for the earth's curvature when running a view shed analysis.

Thanks Phil 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Calculating Earth curvature for viewshed 
Author Dan Patterson 
Date Jun 28, 2005 
Message Phil, see
http://arcscripts.esri.com/details.asp?dbid=11268 
  Geomatics, Carleton University, Ottawa, Canada 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Calculating Earth curvature for viewshed 
Author William Huber 
Date Jun 29, 2005 
Message Thanks Dan--I didn't know about that one. However, it might or might not obtain the correct answers, so let me explain what the procedure is, so that anybody reading this can use the extension intelligently and correctly. (You might also choose to do the procedure yourself, as shown below: it's not hard.)

The trick is to modify the elevations of the DEM, then carry out the visibility computation on the adjusted DEM. In effect, this causes the DEM's values to be misinterpreted as heights relative to a fixed plane rather than heights relative to the surface of the spheroid. So long as the DEM does not cover too much of the earth, these heights are about the same. However, once the DEM covers more than a few degrees, the distortions can get pretty great and the trick produces unreliable results. Fortunately, it makes no sense to compute visibility for DEMs that are larger than this, so usually we're ok.

Due to inaccuracies that will become evident below, it suffices to adopt a spherical earth model with a sphere of radius about R = 6371 km. Select a point of origin "O". Choose a reference plane parallel to the sphere's surface at O, passing through the center of the earth. The height of the sphere at O therefore is R. By definition of the cosine, the apparent height of any point on the sphere at a distance 'd' from O is R times the cosine of d, provided we measure d as an angle.

Often we don't bother to compute the cosine but instead use its Maclaurin series approximation,

cos(d) = 1 - d^2/2 + ...

for small values of d (expressed in radians). This is the approach taken by the extension. The error that is made is no greater than d^4/24. For a visibility calculation made out to, say, 200 miles, d would be about three degrees or around 0.05 radians. Here, d^4/24 = 0.05^4/24 = about 0.26 parts per million. Multiplying by the earth's radius gives an error no greater than 1.6 meters, which should be just fine. This justifies the approximation.

There are two complications. One is to convert radians to your preferred units of distance and elevation. The other is to account for atmospheric refraction effects, which cause light rays to curve.

Let's deal with the distance units. Subtract the apparent height, R*cos(d), from the DEM's height, R + DEM value = R + z, say. This gives the adjusted height of R + z - R*cos(d), which--using the approximation--simplifies to

Adjusted height z' = z - R*d^2/2.

If, for instance, you are measuring heights in feet, then you *must* measure distances in feet as well. By definition, one radian is the earth radius R. In feet it's 20.91 million. Divide by this value to convert d from radians to feet.

In general, if you express the earth radius R in your elevation units (such as feet or meters), and you measure distances in the same units, then the adjustment formula is

z' = z - d^2 / (2*R).

The value used in the extension for 2*R is 12740000. I presume that's meters. It corresponds to an assumed earth radius of 6370 km, which is ok: but you need to know that ***for the extension to work, your distance units and your elevation units MUST be in meters***. (It makes no effort to identify the units or correct for non-metric units.)

To give you a sense of the magnitude of this adjustment, it equals 7.848 centimeters in one kilometer--not worth worrying about. It increases quadratically with distance though, so at ten kilometers it's 7.848 meters and at 100 km it's 784.8 meters. (See equation 9a at http://geomechanics.geol.pdx.edu/Courses/G485/TotalStation/JGE%20Paper%201%20-%20Introduction.pdf ).

Atmospheric refraction is essentially in the vertical direction. Changes in air density curve the light downward. (Light passes faster through the thinner air at the top, causing its waves to curl down.) This causes you to see further; equivalently, the earth appears less curved than it really is. The magnitude of the effect varies with atmospheric conditions. A standard rule of thumb is that refraction of visible light reduces the apparent curvature of the earth by one-seventh. We therefore subtract only six-sevenths of the amount suggested by the geometric adjustment. This gives a combined curvature-refraction adjustment of the form

z' = z - (6/7) * d^2 / (2*R).

The extension uses a value of 0.87 for 6/7, which may be close enough: 6/7 = 0.857. The link provided above gives a value of 0.86 (this is equivalent to its equation 9c, since 0.0675/0.07848 = 0.860). Take your pick. If you're doing visibility calculations for radio transmission or other non-visible wavelengths, you will need to choose a different correction factor.

These considerations lead to a relatively simple Map Calculator procedure. Here's the recipe:

(1) Make sure your elevation units and distance units are identical. Make them so by converting the elevation units in the Map Calculator, if necessary.

(2) Compute the radius of the earth, 'R', in terms of your elevation units.

(3) Choose a value for the refraction correction, 'k'. Use a value around 6/7 for visible light.

(4) Compute the Euclidean Distance grid relative to any point near the center of your DEM. Call this grid theme "d".

(5) Let "z" be the name of the DEM theme. In the Map Calculator, compute an adjusted DEM as

[z] - ([d]^2 * (6/7 / (2*R))).

If you want to neglect all refraction effects, then leave out the "6/7" term.

(6) Perform all visibility calculations on the adjusted DEM.

I actually prefer to go though these steps each time, rather than apply some "black box" extension, because I can be confident in obtaining the correct answer and they don't really take any more time to execute. 
  --Bill Huber
Quantitative Decisions (http://www.quantdec.com )
More GIS Q&A at http://gis.stackexchange.com/q/3083/664 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Calculating Earth curvature for viewshed 
Author Dan Patterson 
Date Jun 29, 2005 
Message An excellent resource as usual, I will have to examine this in more detail. Thanks Bill 
  Geomatics, Carleton University, Ottawa, Canada 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Calculating Earth curvature for viewshed 
Author phil blondin 
Date Jun 29, 2005 
Message I used both ways and Mr. Huber's way gave me the same results that come from using the calculate viewshed on the original DEM, unless I did something wrong.

The extension renedered a smaller area of view while using the calculate viewshed on the orginal dem and using Mr. Huber's way and calculating the viewshed on the surface made by the formula gave a larger area of view.

Again though I may have done something wrong. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Adjusting the Coefficient for the Refaction of Light in the Atmosphere 
Author Erik Marsh 
Date Jan 27, 2008 
Message Bill-

As usual, your post was full of useful detail. It's too bad it was buried under discussion of ArcView 3.x ... I spent a long time trying to figure out where ESRI got the magical "0.13" as the default coefficient for the refraction of light in the air.

My question is simple: How would I calculate a different coefficient for a high altitude region?

Generally, this is a small variable, but high altitude does have a big impact on visibility. Not to mention moisture in the air and other factors.

Thank you!

-Erik Marsh 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Adjusting the Coefficient for the Refaction of Light in the Atmosphere 
Author William Huber 
Date Jan 28, 2008 
Message Erik,

This is a complicated subject. The NIST posts a thorough discussion of the Edlen and Ciddor equations for the index of refraction 'n' at http://emtoolbox.nist.gov/Wavelength/Documentation.asp . A detailed tutorial on applications to radio wave propagation complements this material at http://www.mike-willis.com/Tutorial/refraction.htm . By combining equations for 'n' with equation (4) in the tutorial (relating the change of n with height to the radius of curvature of the light), you can derive coefficients for higher altitudes. You will need to make assumptions about pressure, temperature, humidity, and wavelength of the light.

(I found these sites by Google searches on "index refraction density air" and "index refraction density air curvature sight".) 
  --Bill Huber
Quantitative Decisions (http://www.quantdec.com )
More GIS Q&A at http://gis.stackexchange.com/q/3083/664 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Should the Refractivity Coefficient be 0.325, and not 0.13? 
Author Erik Marsh 
Date Jan 30, 2008 
Message Hi Bill-

It is a complicated topic. I found the same websites you mentioned. Ultimately, refraction has little effect on (short distance) viewsheds. I wanted to understand how Arc computed it. What I finally figured out was that the coefficient Arc uses is a ratio (I kept expecting it to be a variable).

The harder part to calculate was based a refraction index of n, what is the change z over distance?

Last spring I worked through the physics of it, and came up with the attached Excel spreadsheet. A very helpful site, especially for the bit about change in z: http://www.icogitate.com/~ergosum/essays/vtth/viewtothehorizon.htm

The problem is that my calculations, and the example on this site, don't get 0.13. Playing with the altitude, air pressure, temperature, and light wavelength, I consistently get a ratio of 0.325. Varying all of these by extremes (anything on earth), the ratio stays at 0.325.

In the example from the above website, he looked at power plants stacks across the bay. The earth's curvature lowered them by 59 m, and the atmosphere raised them by 19 m.

In that and other examples, the change in z from light seems to be almost a full 1/3 of the z from the earth's curvature.

Hence my search goes on as to where this 0.13 comes from. Why isn't it 0.32?? On the upside, I am convinced that in a wide variety of conditions (and altitudes), the change in z based on light is very similar.

An object 10 km away looks 7.85 m higher based on curvature. Arc says it the atmoshpere lowers it by 1.12 m (1/7 of 7.85). My calculation say it's 2.55 m lower (nearly 1/3 of 7.85). I don't know anyone who could check the math I've done, and that from the website I mentioned.

Should the default coefficient be 0.325?
Do you you know who defined 0.13 as the standard everyone uses?

thanks for your help,
Erik 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Should the Refractivity Coefficient be 0.325, and not 0.13? 
Author Erik Marsh 
Date Jan 30, 2008 
Message Hi Bill-

It is a complicated topic. I found the same websites you mentioned. Ultimately, refraction has little effect on (short distance) viewsheds. I wanted to understand how Arc computed it. What I finally figured out was that the coefficient Arc uses is a ratio (I kept expecting it to be a variable).

The harder part to calculate was based a refraction index of n, what is the change z over distance?

Last spring I worked through the physics of it, and came up with the attached Excel spreadsheet. A very helpful site, especially for the bit about change in z: http://www.icogitate.com/~ergosum/essays/vtth/viewtothehorizon.htm

The problem is that my calculations, and the example on this site, don't get 0.13. Playing with the altitude, air pressure, temperature, and light wavelength, I consistently get a ratio of 0.325. Varying all of these by extremes (anything on earth), the ratio stays at 0.325.

In the example from the above website, he looked at power plants stacks across the bay. The earth's curvature lowered them by 59 m, and the atmosphere raised them by 19 m.

In that and other examples, the change in z from light seems to be almost a full 1/3 of the z from the earth's curvature.

Hence my search goes on as to where this 0.13 comes from. Why isn't it 0.32?? On the upside, I am convinced that in a wide variety of conditions (and altitudes), the change in z based on light is very similar.

An object 10 km away looks 7.85 m higher based on curvature. Arc says it the atmoshpere lowers it by 1.12 m (1/7 of 7.85). My calculation say it's 2.55 m lower (nearly 1/3 of 7.85). I don't know anyone who could check the math I've done, and that from the website I mentioned.

Should the default coefficient be 0.325?
Do you you know who defined 0.13 as the standard everyone uses?

thanks for your help,
Erik 
  Refraction Correction Equations v2.xls (opens in new window)
 
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Should the Refractivity Coefficient be 0.325, and not 0.13? 
Author William Huber 
Date Jan 31, 2008 
Message Erik,

I don't have time to look at this now, but I had understood that the values near 0.3 correspond to radio frequencies, not visible frequencies. (The variation of 'n' with frequency is substantial: it is responsible for prismatic separation of colors and helps explain the rainbow.) 
  --Bill Huber
Quantitative Decisions (http://www.quantdec.com )
More GIS Q&A at http://gis.stackexchange.com/q/3083/664