2

I have many 3D planes. The thing that I need to know is the way of computing aspect angle. I hope, I can compute the aspect angle by using the projected normal vector of each plane (my plane equation is ax+by-z+c=0; so normal vector of this plane is a,b,-1) to the XY plane. Then, from the Y axis I can compute the aspect angle. But, I don’t know how to get the projected Normal vector after I projected to XY plane. Then, can I apply the equation which gives angle between two vectors to compute angle of my desired vector from the y axis.

On the other hand, I found, aspect angle is defined as the angle between any line which passes along the steepest slope of the plane and north direction (here, Y axis). Does this definition will follow, with my proposed way that is taking normal vectors? I mean, does the projected normal vector always given along the steepest slope of the plane? Also, some one told me, that this problem should consider as a 2D problem. Please comment me and send me the relevant formulae in order to compute aspect angle. Thank you.

niro
  • 947
  • 3
  • 13
  • 30

2 Answers2

2

Some quick googling reveals the definition of the aspect angle.

http://www.answers.com/topic/aspect-angle

It's the angle between the geographic north on the northern hemisphere and the geographic south on the southern hemisphere. So basically it's a measure how much a slope faces the closest pole.

If your world is planar as opposed to spherical it will simplify things, so yes - A 2D problem. I'll make this assumption having the following implications:

  • In a spherical world the north pole is a point on the sphere. In a planar world the "pole" is a plane at infinity. Think about a plane somewhere far away in your world denoting "north". Only the normal of this plane is important in this task. The unit normal of this plane is N(nz,ny,nz).
  • Up is a vector pointing up U(ux,uy,yz). This is the unit normal vector of the ground plane.

The unit normal vector of the plane V(a,b,c) can now be projected onto a vector P on the ground plane as usual: P = V - (V dot U) U

Now it's easy to measure the aspect angle of the plane - It's the angle between the "pole"-plane N and the projected plane normal P given by acos(P dot N).

Since north is positive Y-axis for you we have N = (0, 1, 0). And then I guess you have up is U = (0, 0, 1), positive Z. This will simplify things even more - To project on the ground plane we just strip the Z-part. The aspect angle is then the angle between (a,b) and (0,1).

aspectAngle = acos(b / sqrt(a*a + b*b))

Note that planes parallell with the ground plane does not have a well-defined aspect angle since there is no slope to measure the aspect angle from.

vidstige
  • 12,492
  • 9
  • 66
  • 110
  • 1
    alright. Do you have the normals for the roof planes? Can we take an example? Also, was I right in my assumption that up is U=(0,0,1), ie up is along the positive Z-axis? – vidstige Feb 06 '11 at 14:28
  • I hope, you can help me. may i contact you via namn.efternamn@gmail.com – niro Feb 06 '11 at 14:44
  • Thats not my mail :-P Was the above an answer to your original question? Does something needs clarification? – vidstige Feb 06 '11 at 14:50
  • i have computed the aspect angle according to the given equation. but, i found a problem to get exact angles.(i forgot to say you that, i have x,y,z point data covering different roof surfaces. suppose i have 2 roofs, belong to simple building. lets imaging these 2 planes are gable roofs. i.e. both roof have similar slope in opposit direction. then, roof intersection line will be the top edge line of the roof.) actually, what i wanted to see is, angle between those two aspect angles is 180. but, i got similar angels ( 31.4 & 30.2 degrees. so, plz tell me how can i get exact angle (from 0-360) – niro Feb 06 '11 at 14:50
  • for example, i am sending you this values; for plane 1 [a=-0.208732 b=0.374282 c=-1 d=2584.14 Computed slope angle 23.1976 computed aspect angle 150.852] for plane 2 [a=0.219533 b=-0.362096 c=-1 d=-3349.41 Computed slope angle 22.9501 computed aspect angle 148.772]. i believe these two aspect agnles should show 180 difference. please help me. – niro Feb 06 '11 at 15:02
  • sorry, i did some mistake while working. i got the new result as follows. plane1=> [a=-0.0871757 b=0.428335 c=-1 d=-4716.47] plane2=> [a=0.0903178 b=-0.514505 c=-1 d=6454.37] accordingly i got slope & aspect of 2 planes as [slope=23.6109, aspect=11.5038] & [slope=27.5813, aspect=170.044]. i think it is now nearly 180 if i draw and think. but, i want to get it directly from the equation. i think, it is just sign problem. how can i compute different aspect angles which lie in four different quadrants. does, normal vectors tell us, whether that vector lie in which quadrant? expecting some help.. – niro Feb 06 '11 at 17:19
  • Just checked your numbers and I get angles that make sense. The vectors are not entirely parallell, but the angle difference isnt exact 180 degrees for me either. Seems some kind of sign error. Please check your calculations. If you feel the question itself is answered perhaps you can accept this answer? – vidstige Feb 06 '11 at 20:02
  • 1
    thank you very much for helping me so far. i added a,b testing conditions to check in which quadrant that vector is liying, i think it will be ok now. – niro Feb 06 '11 at 21:10
0

What kind of surfaces are you working with? TINS (Triangular Irregular Networks) or DEMs (Digital Elevation Models)?

If you are using raster imagery to create your surfaces, the algorithm for calculating aspect is basically a moving window, which checks a central pixel plus the 8 neighbors.

Compare the central one with each neighbor and check for difference in elevation over distance (rise over run). You can parametrize the distance checks (north, south, east and west neighbors are at distance = 1 and northwest, southwest, southeast and northeast are at distance = sqrt(2)) to make it faster.

You can ask this question on gis.stackexchange also. Many people will be able to help you there.

Edit: http://blog.geoprocessamento.net/2010/03/modelos-digitais-de-elevacao-e-hidrologia/

this website, altought in portuguese, will help you visualize the algorithm. After calculating the highest slope between a central cell and it's eight neighbors, you assign 0, 2, 4, 8, 16, 32, 64 or 128, depending on the location of the cell that presented highest slope between center and neighboors.

George Silva
  • 3,454
  • 10
  • 39
  • 64