There are a number of fields in the different featureclasses that are called differently, but refer to the same object ID.On one hand you have the building polygons:
The Object ID in this featureclass is the field "OBJECTID_1". When you derive the wall lines (polygon to lines) you obtain this table:
The LEFT_ID refers to the value of the field OBJECTID_1 in the building polygon fc that is located on the left side of the line and the RIGHT_FID refers to the value of the field OBJECTID_1 in the building polygon fc that is located on the right side of the line:
Before you join you can add two fields, for instance:
- Left_Height and
- Right_Height
When you perform a join, you will do this from the attribute table of the lines:
... using first LEFT_FID and joining to the building height featureclass using the OBJECTID_1 field as common field:
With the join active you can use the field calculator to fill the field Left_Height with the values of the field "Building_Height_sel.HEIGHT" (the joined field from the Building Height featureclass with the height values).
Remove the join and perform a new join to obtain the values for the Right Height field (using the RIGHT_FID and OBJECTID_1 fields). Based on this you can calculate the
To obtain Height_dif you can substract both height fields. However, there are some things to consider:
- in case LEFT_FID = -1, there is no building polygon on the left side of the line. Take Right_Height as height difference.
- In the other cases, use Abs([Left_Height] - [Right_Height]). This will get the absolute value of the difference.
The Wall Surface can be obtained multiplying the Height_dif values with the Shape_Length values (I prefer working with fc's stored in a FGDB then with Shapefiles, since the FGDB fc will add and maintain fields like length and area).
The other part is to assign the surface to a parcel. For this we will need to know to which parcel we should assign the line. Remember that the line is often located on the border of two parcels. In the explanation below I assign the wall surface to the parcel where the highest building (of the two neighboring buildings) is located.
As mentioned in the previous post I converted the buildings to points using the inside option. These points are located in each building and have the same attributes (to be sure I created a field in the building height fc containing "Building " & [OBJECTID_1]).
You can perform a spatial join from these points to obtain the information of the parcel where the point (building) is located:
This will generate a new point fc with the attributes of the parcels:
You can use the OBJECTID_1 field as common field to join the PARCEL field using the LEFT_FID and RIGHT_FID to get the Left_Parcel and Right_Parcel of each wall line.
The Wall Situation field contains the case. It is either.
- a wall that is not shared "Single Wall" (when left_Parcel is Null)
- a wall between two building inside the same parcel "Inside single Parcel" (Left_Parcel = Right_Parcel)
- a wall on the limit of two parcels (Left_Parcel <> Right_Parcel)
The Final_Parcel field can be defined by:
- taking the Right_Parcel when it is a single wall or the wall is located in the same parcel
- taking the Right_Parcel when Right_Height > Left_Height
- taking the Left_Parcel when Left_Height > Right_Height
You don't have to include Left_Height = Right_Height, because the surface will be 0.
Hope this helps to understand the steps.
Kind regards, Xander