First essay with MainDirections

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

First essay with MainDirections

davidgarcia
Hi all,

I'm trying to make a graph of orientations for a series of buildings with orbiGIS. For this I should use first ToMultiLine and then MainDirections SQL functions (from DBTopo), but unfortunatelly MainDirections returns you only a 0-180 degrees graph, what I want to get is a 0-360° graphs (to get the info: sum of walls oriented south, north, west, east).

Before trying to change some code in MainDirections.java I want to know if there's some other procedure or option to make the same return as the one I want (a 360° graph).

Best regards and thanks in advance for your help


David Garcia
Reply | Threaded
Open this post in threaded view
|

Re: First essay with MainDirections

Gwendall Petit
Administrator
Hi David,

Direction is the same as you go north or south (or west / east). That's why the  the "MainDirection" function returns only angles between 0 and 180 °.

If I understand correctly, you want to get the orientation, which can be calculated by alpha plus 180 ° (I made a little drawing to illustrate)


Here the Direction is represented by "alpha" --> A-B and A-C have the same direction. But if you want to get the orientation, A-B and A-C are not equal --> Orientation of A-C = Orientation of A-B = alpha + 180°

In version 3 ofOrbisGIS, there will be a function "azimut" which will calculate what you want.

Hope it helps you

Gwendall