Skip to content

SHP-Import

With geometry and object data resulting from geographical information systems (GIS), these can be imported using the flexible shape import filter of CadnaA (from ArcGIS/ArcView/ArcInfo). A shape file consists of three files:

  • file extension *.shp: file containing object geometries,
  • file extension *.shx: index file (containing a position index for geometry),
  • file extension *.dbf: file containing the object’s attributes (table in the dBASE III-format).

Since GIS-systems are structured by layers or topics specific objects can be addressed to a single shape file.

Example

Example

Path: Import/SHP/buildings.zip

In the following example buildings and their attributes are imported from a shape file. Proceed as follows:

  • Unzip the file
  • Select on the dialog File|Import file type "ESRI Shape file".
  • Click once (!) on the file name buildings.shp and then click on button „Options“ on dialog Import File.

The dialog Options for ArcView Shapefile-Import is displayed. On the table, each CadnaA object type can be assigned to a single layer in the shape file. In this example, buildings are to be assigned.

  • Click on the vertical scroll bar of the table on the left to display the table entry „Building“.
  • Click in line „Building“, into the column „Layer“, and enter a asterisk symbol (*).

Note

The asterisk symbol is a wild card for any text string. Consequently, in this example, all objects will be imported as buildings.

  • Note that the option „Unknown Attributes to Memo-Variables“ is activated. This ensures that all attributes imported from the DBF-file which do not correspond with the building’s attributes in CadnaA will be copied to the memo-window of the buildings.

Configuration for import of shape files

  • Close the dialog Options for ArcView Shapefile-Import with OK.
  • On dialog Import files click on button „Open“.
  • Open the building’s table (via Tables menu, Obstacles|Buildings).
  • Click into the first line in the table and then click the button „Sync.Graphic“.

CadnaA centers on this building in the main window.

  • Double-click on the border of this building to open its dialog.
Dialog Building Memo-Window of the building

The unknown attributes "INHAB" and "HEIGHT" were copied as string variables into the Memo-Window since their designation does not correspond with the CadnaA-object attributes. On the next step, these string variables are transferred to the attributes EINW (=inhabitants) and HA (=height) of the buildings.

1st option: Transforming Attributes

  • Select File|New the restart the import from scratch.
  • Enter the following in the input box „Transform Attributes“:

By this input data, the value of CadnaA specific Attribute EINW will be replaced by the value of the imported string variable RESIDENTS.

2nd option: Replacing Attributes

The value of string variables can also be transferred to CadnaA specific object attributes after import (assuming e.g no equivalences have been defined in section „Transform Attributes“). In order to transfer - for example - the value of the string variable „Inhab“ to the attribute EINW of the buildings proceed as follows:

  • Click with the right mouse button in the white screen area and select Modify Objects from the context menu.
  • Select the action „Modify Attribute“ for the buildings as object type.
  • On dialog Modify Attribute select the attribute to be changed, EINW, and enter „Replace Strings, Replace with“:{MEMO_INHAB}

Attribute EINW is replaced by the content of the string variable INHAB

  • Click OK and confirm the action by „All“.
  • Double-click on a building’s border to check whether the inhabitants were transferred into the input box „Residents“ of the building’s dialog.

Analogously, the building height is transferred to the attribute HA. In this case the code for „Replace with“ is:

Attribute HA is replaced by the content of the string variable HEIGHT

  • Press the key combination CTRL+3 to display the objects visible on the screen in 3D-Special view.

On the tables Building (Tables menu, Obstacles) it can be seen that the height and the number of residents have been assigned.