Introducing the Simple OBL Vector Building Data Format


For outdoor scenarios, we often consider each building as the minimal unit, while in indoor scenarios, it can be further decomposed into walls. Despite many existing data formats, e.g. DXF/DWG, Planet, we need something that is simple and does the job pretty well. The XML presents a well-structure document but is considered redundant especially if there are a huge number of walls/buildings. Therefore, we are introducing the very simple OBL data format that can be used to store a list of vector building objects in text file format.

Starting a Comment

Here is a simple comment, that starts with a ‘C’ or ‘c’ (case insensitive for OBL file).

C VERSION 0

Starting a Polygon Plane

A Polygon consists of at least 3 vertices which are all 3D coordinates. So, to start a plane, use the following format:

F OBJ_NAME VERTICE_COUNT X1 Y1 Z1 X2 Y2 Z2 ... XN YN ZN

As we can see, the values are separated by white space, if the layer name contains space, we can encapsulate the string with double quotes or single quotes.

Starting a 2.5D Outdoor Building

The 2.5D is defined as a bottom-polygon-shape and a height, which virtually makes a column, as shown below:

2.5d-building-column Introducing the Simple OBL Vector Building Data Format Building Modelling Data Formats

2.5d-building-column

This is perfect for defining outdoor buildings as we, most of the cases, don’t have details for each buildings except the building polygon shapes and their heights (yes, some companies sell the outdoor city digital map data that can be best described as 2D coordinates and the heights for each building).

To start defining a 2.5D building, the syntax is quite similar than defining a Polygon plane.

B BUILDING_NAME VERTICE_COUNT X1 Y1 Z1 X2 Y2 Z2 ... XN YN ZN HEIGHT

The annotation is B (Building) instead of F (Floor). And the last value is the height for this building in the unit of meters. Please note that the height value extends the building towards its plane normal vector so make sure it is pointing upwards i.e. you may need to list the building coordinates in the anti-clockwise order.

Please note that a 2.5D building object with N coordinates will be eventually expanded to N+2 polygons i.e. N walls, 1 roof and 1 ground.

OBL Sample Data

With these 3 annotations, we can easily define a outdoor/indoor vector building/walls format, which is space-saving and easy to parse, as compared to XML.

C SAMPLE OBL
F TRIANGLE 3 0 0 0 10 10 0 5 5 0
B BUILDING 3 0 0 0 10 10 0 5 5 0 5

A sample OBL file can be downloaded here.

505 words Last Post: Free Space Path Loss Calculator with API
Next Post: COST 231 Munich Digital Map and Measurements


Leave a Reply

Your email address will not be published. Required fields are marked *