3

This question already has an answer here:

I am using QGIS to output data to a game engine, I use polygon centroids to find center points of polygons of houses to output to the game engine for house placement - now I'd like to take it one step further and get a correct(-ish) orientation of the house.

So my basic idea is to either straight up use the polygons to somehow get the angle relative to true north - or just find the longest side of a polygon house shape and then determine the azimuth/angle of that line - and preferably add this data as a new field to my polygon centroids.

I am still quite new to QGIS and GIS data in general but have been able to make a lot of use out of the GIS data I have.

marked as duplicate by underdark qgis Dec 30 '16 at 20:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

You could try the processing algorithm "oriented minimum bounding box". This creates the smallest (by area) rotated rectangle which covers each feature, and also exports the angle of this rectangle. It's a good estimate for the overall orientation of a geometry.

  • Thank you, that worked wonders! I can't believe I havent found that function before - I have googled the matter A LOT! – Mats Liljeroos Dec 31 '16 at 8:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.