Hi all.
I asked yesterday how to resolve this problem: 
"I need to calculate the orientation (North, East, South or North) of a feature 
(Polygon, a parcel) respect of another one (Line, a road).I calculated the 
azimuth of the two features using the centroids of each but the formulas I 
found don't really work, or I am doing something wrong (it's probably that :-) 
)."
Thanks to Nicolas Cadieux I found this solution:
degrees( azimuth( make_point( to_real( "Cen_X" ),to_real( "Cen_Y" ) ), 
make_point(to_real( "X-centr" ),to_real( "Y-centr" )) ) )

Where Cent_X, Cent_Y, X-centr and Y-centr are respectively the centroides of my 
road and my parcels.
Regards.
--------------------------
Alexandre Rodier
Geógrafo  Turismo sostenible 
Telf: +34 661 38 00 28http://www.entretierras.com+ info: 
https://www.linkedin.com/in/alexrodier/
--------------------------
_______________________________________________
QGIS-User mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to