Shp to Obs

Dominik Fröhlich, Tamás Gál, and Andreas Matzarakis


Transformation of Shapefiles to Object files for the use with RayMan / SkyHelios model by a plugin for Quantum GIS


Shp to Obs provides the capability of creating input files for the radiative-bioclimate climate model RayMan Pro. The Quantum GIS plugin requires two ESRI®-shapefiles (or three, if vegetation included) as input.


The plugin is still under development. Please report any issues and bugs to, or

Shp to Obs is free software and is offered without guarantee or warranty. You can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License (GPL v2) as published by the Free Software Foundation ( Bug reports or suggestions are welcome at the e-mail address above, but we cannot promise a prompt or mutually satisfactory solution.


The plugin can be found in the repositorys. Just open the plugins manager and search for "Shp to Obs". You may have to enable experimental plugins.

Manual Installation: As long as Shp to Obs is not part of a QGIS repository, it has to be installed manually with the instructions below. First of all, you have to install QGIS and any other Python plugin you like (to make sure the plugins-folder exists). QGIS can be downloaded from the official web page. After the installation process has finished, launch QGIS and select "Download Python Plugin" from the "Plugins" menu. Choose a random plugin and install it. Afterwards close QGIS.
Now unzip and move the new folder "shp_to_obs" to the folder stated below. In Windows please copy "shp_to_obs" to

	C:\Documents and Settings\(user)\.qgis\python\plugins\

Under Mac and Linux navigate to your home folder and enable hidden files to be displayed (ctrl + h under Linux, Mac users are refered to Afterwards you should see a ".qgis" folder. Please copy "shp_to_obs" folder to


Enable Shp to Obs by starting qgis and using the manage plugins utility (Plugins -> Manage Plugins). The utility pops up a list box of all available plugins and you should select the checkbox beside Shp to Obs. After clicking OK, an Shp to Obs option should be available on the Vector dropdownn menu.


Run the plugin by choosing "Shp to Obs" from the "Vector" menu.
First, a welcome box appears reminding you of the required input files. Continue by clicking "next".

Required input files

The Shp to Obs plugin needs at least two input files to create a RayMan obstacle file. All of the required files have to be shape files.

First, a polygon shape file is required, that contains the buildings for the .obs. It needs a field in the attribute table stating the height of each building. This field must not contain any missing values.

Second, a point shape file is required, setting the center point(s) of the .obs file to create. If this layer consists of several points, Shp to Obs will create an obstacle file for each of the points. The center points input layer requires a field in the attribute table, that specifies the vertical offset of each point. A negative value in this field will increase the height of all obstacles, while a positive value will reduce the height respectively. Zero means no offset. This field must not contain missing values.

Optionally, Shp to Obs is able to include trees into the obstacle file. Therefore a third input layer is necessary. The trees layer has to be a point shape layer and must possess at least the following five fields, that, again, must not have missing values.

• A height field specifying the total height of the tree (in m).
• A crown radius field, that gives the radius of the crown expansion (in m).
• A trunk height field that sets the distance between the ground and the lower side of the crown (in m).
• A trunk radius field setting the radius of the trunk (in m).
• A type field specifying the type of the tree (1 char in small letters, "l" for a leaf tree, or "n" for a coniferous tree).

Calculating obstacle files from shape files

Please run the plugin by choosing "Shp to Obs" from the "Vector" menu.
First, a welcome box appears reminding you of the required input files. Continue by clicking "next".
Now a second window opens. It has got four tabs.

In the "Buildings" tab, the buildings layer is selected. After selecting a layer from the upper dropdown menu, the field containing the height of the buildings can be selected from the lower dropdown menu.

The "Trees (optional)"-tab contains the settings for an optional trees layer. If you want to have trees in your obstacle file, select the corresponding trees layer from the upper dropdown menu. Afterwards you should be able to set the fields for the tree's attributes in the lower section.

The third tab is the "Center Point(s)"-tab. The center points layer can be selected from the upper dropdown menu. Afterwards the the field setting the vertical offset of the center points can be chosen by the lower dropdown.

In the "Output Directory"-tab the folder and file name of the new obstacle file(s) is set. If you saved a qgis-project previously, name and path of the project file are proposed.

After selecting the required layers and fields, and entering path and file name, click the "Convert" button to start the converter. According to number and complexity of your input geometries the process may take some time.

For any difficulties you are kindly refered to the RayMan Forum.