Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to get the main bearing of buildings by floor plan?

I want to have a building (by ID) and it's main bearing (e.g. E/90° or W/270°). The idea is to change the polygon-feature class into a line-feature class. Then I can calculate the lengths of each side. I can also calculate the bearing of each side. Buildings with a more complex floor plan I planned to cumulate the side's lengths on the bearing.

The problem is that one building with four parallel sides get four different bearings because of the starting point for the bearing-calculation (see image). Furthermore the calculation doesn’t always start at the same end of a line.

Little Sketch

share|improve this question
Are the buildings always rectangles with four vertices as corners? – Matthew Snape Jun 26 '12 at 12:13
No. As written, buildings with a more complex floor plan (e.g. like a L or a T), I planned to cumulate the side's lengths on the bearing. – ChristianFu Jun 26 '12 at 12:16
up vote 7 down vote accepted

ArcGIS version 10 has "Minimum Bounding Geometry" in Data Management, Features toolset. I see an option RECTANGLE_BY_WIDTH that produces a new field MBG_Orientation—The orientation of the longer side of the resulting rectangle. If this doesn't give you the correct orientation, there is also "Update COGO attributes", for each line. You can then use Summary Statistics or arcpy.Statistics_analysis to get the angle of the Max Length, for each polygon ID.

share|improve this answer
Great! I never saw that possibility. It is not that accurate (L-buildings for example get like that: |_ --> \ _\ ) but it works. Thanks! – ChristianFu Jun 26 '12 at 13:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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