Re: [Qgis-user] Azimuth and orientation of 2 features

2023-02-13 Thread Alexandre Rodier via QGIS-User
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
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Azimuth and orientation of 2 features

2023-02-12 Thread Nicolas Cadieux via QGIS-User
You can create a line using both centroid then use the azimuth function.

https://gis.stackexchange.com/questions/264422/displaying-azimuth-of-line-in-qgis

Nicolas Cadieux
https://gitlab.com/njacadieux

> Le 12 févr. 2023 à 12:57, Alexandre Rodier via QGIS-User 
>  a écrit :
> 
> 
> Dear list.
> I have a question I am not able to resolve:
> 
> 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 :-) ).
> I am sure that's a simple problem but I am quite blocked.
> 
> Thanks in advance for your help.
> Alex
> 
> ___
> QGIS-User mailing list
> QGIS-User@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Azimuth and orientation of 2 features

2023-02-12 Thread kirk via QGIS-User
Hi Alex.You could use the coordinate of the centrists to determine which 
polygon is east or north.   For example, if your coordinate system is utm.  the 
centroid with the highe Easton will he the most easterly, the one with the 
smallest northing will be the most southerly.Kirk Schmidt Sent from my Galaxy
 Original message From: Alexandre Rodier via QGIS-User 
 Date: 2023-02-12  1:57 p.m.  (GMT-04:00) To: 
qgis-user@lists.osgeo.org Subject: [Qgis-user] Azimuth and orientation of 2 
features Dear list.I have a question I am not able to resolve: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 :-) ).I am sure that's 
a simple problem but I am quite blocked.Thanks in advance for your help.Alex___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Azimuth and orientation of 2 features

2023-02-12 Thread Alexandre Rodier via QGIS-User
Dear list.I have a question I am not able to resolve:
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 :-) 
).I am sure that's a simple problem but I am quite blocked.
Thanks in advance for your help.Alex___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user