Importing Shapefiles

When you import Shapefiles, the information contained in the shapefile is read into a Visum network object. It depends on the type of shapefile (point, polyline or polygon) and the read mode (additional or non-additional) into which network object the data is imported (Fundamentals: Importing shape and GeoJSON files).

Notes: If you want to additionally read a shapefile with coordinate information, you should make sure that the current network version contains a predefined coordinate system (Selecting a coordinate system).

You can also read shapefiles as background images into Visum (Using backgrounds in the network display).

If a file *.cpg exists when importing a shapefile, which specifies the character set of the shapefile as UTF-8, then the shapefile is read as UTF-8-encoded file.

1.  On the File menu, click Import > Shapefile.

The Open ESRI shapefile window opens.

2.  Select the desired file.

3.  Click the Open button.

The Read shapefile window opens.

Note: The options shown in the Read shapefile window depend on the type of shapefile to be imported (point, polyline or polygon).

4.  Make the desired changes.

Shapefiles of type point

Element

Description

Number of objects in the shape file

Number of point objects to be read

Read additively

If the option has been selected, the point objects and their data are read additionally to the existing network.

Note

The unit system used is the system specified for the existing network (Undoing and redoing actions). Which coordinate system is used depends on whether the shapefile contains coordinate system data and whether this data is different from the network data (Editing the coordinate system and scale).

If the option has not been selected, a new network with the newly inserted point objects only will be created.

Set coordinates of existing centroids

If this option has been selected, the point objects are read in as new centroids of existing zones, main zones, main nodes, or territories. The polygons remain unchanged.

Note

This option is provided only if the option Read additionally has been selected.

Read as

From the drop-down list, select the Visum target network object type into which the data is to be imported.

POI category

From the drop-down list, select the POI category in which the point objects read in as POI shall be included.

Alternatively, you can select the Adopt from shape file option to automatically insert POI categories. If this option is selected, the following options are provided:

Insert missing POI categories automatically

If this option is selected, missing POI categories are automatically inserted. In the Points of interest: Read attributes window, you must then assign one of the attributes to be read to the target attribute Category number. Others can be assigned as required.

Note

This option is always selected if the option Read additively has not been selected. This allows POIs to be imported from Shapefiles in non-additive mode.

Key column

From the drop-down list select which column of the shapefile shall be the key column for the allocation of the point objects to zones, main zones, main nodes, and territories.

Note

This option is provided only if the option Set coordinates of existing centroids has been selected.

Offset

Optional value which is added to the respective ID of the point objects

Imperial units

If this option has been selected, imperial units are used for the data to be read in.

If this option has not been selected, metric units are used for the data to be read in.

Note

This option is provided only if the option Read additively has not been selected.

Shapefiles of type polyline

Element

Description

Number of objects in the shape file

Number of line objects to be read in

Read additively

If the option has been selected, the line objects and their data are read additionally to the existing network.

The unit system used is the system specified for the existing network (Undoing and redoing actions). Which coordinate system is used depends on whether the shapefile contains coordinate system data and whether this data is different from the network data (Editing the coordinate system and scale).

If the option has not been selected, a new network with the newly inserted line objects only will be created.

Note

If POIs are selected as network object, the missing POI categories are inserted automatically.

Node is starting point

If this option has been selected, the connectors start at nodes, not at zones.

If the option has not been selected, the connectors start at zones.

Note

The option Node is starting point is provided only if the option Read additively has been selected and Connectors is the chosen Visum target network object type.

Read as

From the drop-down list, select the Visum target network object type into which the data is to be imported.

Notes

The Connectors network object type is provided only if the option Read additively has been selected.

The POI network object type is provided only if the option Read additively has been selected.

POI category

From the drop-down list, select the POI category in which the line objects read in as POI are to be included.

Alternatively, you can select the Adopt from shape file option to automatically insert POI categories. If this option is selected, the following options are provided:

Insert missing POI categories automatically

If this option is selected, missing POI categories are automatically inserted. In the Points of interest: Read attributes window, you must then assign one of the attributes to be read to the target attribute Category number. Others can be assigned as required.

Note

This option is always selected if the option Read additively has not been selected. This allows POIs to be imported from Shapefiles in non-additive mode.

Key column for zones/nodes

From the drop-down list, you can select a column of the shapefile as key for the allocation of the line objects read as connectors to the zones and nodes.

Notes

The option Key column for zones/nodes is provided only if the option Read additionally has been selected and Connectors has been selected as Visum target network object type.

You cannot select the same column for zones and nodes.

If you select no column for neither zones nor nodes, the data is determined by the snap radius.

Create directed links

If this option has been selected, a directed link is generated from a line object.

If the option has not been selected, two links (both directions) will be generated from a line object.

Note

This option is provided only if Links has been selected as Visum target network object type.

Offset

Optional value which is added to the respective key attribute of the line objects

Note

This option is not provided if you read data as connectors.

Snap radius

Maximum distance between the coordinates of several nodes up to which the nodes are to be interpreted as a single node.

Of all nodes within this radius one single node is created.

Note

This option is provided only if you read data as links or connectors.

The units applicable to the value are the units used for the coordinates of the shapefile.

Imperial units

If this option has been selected, imperial units are used for the data to be read in.

If this option has not been selected, metric units are used for the data to be read in.

Note

This option is provided only if the option Read additively has not been selected.

Zone - > Node

Node - >Zone

Transport systems

Via this button you can select the transport systems in a separate window for which the respective direction of the connectors shall be open.

Note

If you do not select a transport system, the respective direction of the connectors is closed for all transport systems.

Type

Type of the respective connectors direction (Connectors: General attributes)

Time

Connector time of the respective connectors direction (Connectors: Transport systems tab)

Notes

These options are provided only if the option Read additively has been selected and Connectors is chosen as Visum target object type.

Both directions of a connector are always generated.

Shapefiles of type polygon

Element

Description

Number of objects in the shapefile

Number of polygon objects to be read in

Read additively

If this option has been selected, the polygon objects and their data are read additionally to the existing network.

Note

The unit system used is the system specified for the existing network (Undoing and redoing actions). Which coordinate system is used depends on whether the shapefile contains coordinate system data and whether this data is different from the network data (Editing the coordinate system and scale).

If the option has not been selected, a new network including the newly inserted polygon objects only will be created.

Replace boundaries

If this option has been selected, existing boundaries are replaced by the newly read-in boundaries.

Note

This option is provided only if the option Read additively has been selected.

Read as

From the drop-down list, select the Visum target network object type into which the data is to be imported.

Note

The POI type of network objects is only available if the option Read additively is selected and at least one POI category is defined for the network (Creating a POI category).

Key column

Use the drop-down list to select a column of the shapefile as key for the allocation of the newly read-in polygons to the existing Visum network objects.

Note

This option is provided only if the option Replace boundaries has been selected.

POI category

From the drop-down list, select the POI category in which the objects read in as POIs are to be included.

Alternatively, you can select the Adopt from shape file option to automatically insert POI categories. If this option is selected, the following options are provided:

Insert missing POI categories automatically

If this option is selected, missing POI categories are automatically inserted. In the Points of interest: Read attributes window, you must then assign one of the attributes to be read to the target attribute Category number. Others can be assigned as required.

Note

This option is always selected if the option Read additively has not been selected. This allows POIs to be imported from Shapefiles in non-additive mode.

Offset

Optional value which is added to the respective key attribute of the polygon objects

Imperial units

If this option has been selected, imperial units are used for the data to be read in.

If this option has not been selected, metric units are used for the data to be read in.

Note

This option is provided only if the option Read additively has not been selected.

Normalize created and modified polygons (self-intersecting test)

Select this option to normalize all newly added polygons and all polygons changed through the import process.

If this option is not selected, no polygons are normalized.

Notes

Polygons have to be normalized if, for example, you require the area or want to intersect the surfaces. You do not have to normalize polygons to e.g. only show them in the background (Fundamentals: Multi-part surfaces).

You can also normalize polygons later on (Normalizing all surfaces).

Merge points with identical co-ordinates

Select this option to merge polygon points with the same coordinates.

Number of decimal places taken into account

Enter the desired number of decimal places. Two points are considered equal and combined if their coordinates are equal after they have been rounded to the specified number of decimal places.

Note

The default value for the number of decimal places is the entry set in the network settings for Coordinates (Settings for decimal places, aggregation functions, and connecting journeys)

If this option is not selected, the polygon points are not merged.

Notes

This option is useful, e.g., when the polygon points represent a municipal border. If two polygons are merged, both polygons automatically change when shifting the polygon point.

You can also merge polygon points later on (Merging all polygon points with identical co-ordinates).

Fuzzy surface alignment

If this option is selected, the imported surfaces are aligned to reflect the surfaces that already exist in the network. This prevents overlap of gaps between surfaces (Fundamentals: Fuzzy surface alignment).

Tolerance for imported surfaces

Enter the tolerance value for fuzzy alignment. The value states the radius within which the points in the imported surface can be shifted towards the reference surface.

Reference surfaces

Use this button to open the Fuzzy surface alignment window in which you can configure further settings.

Note

This option is provided only if the Read additively option has been selected.

5.  Confirm with OK.

When reading a shapefile additionally, the program checks whether the data on the coordinate system of the shapefile are the same as those of the existing network. Depending on the constellation either a warning or a window opens or the data is read from file without any further query.

Coordinates data in the shapefile

Coordinates data in the network

Response when read in

None

Visum (no projection)

The coordinates are read without transformation.

None

From projection file *.prj

The Select co-ordinate system window opens. Select the coordinate system of the shapefile via the from file option. Visum converts the coordinates of the shape file into the coordinates of the network. If you select the option Visum (untransformed reading) instead, the coordinates will be read from file without transformation. Confirm with OK.

From projection file *.prj

Visum (no projection)

A warning is issued. Confirm with OK. The coordinates are read without transformation.

Note

To match the data, it is generally recommended to first change the coordinate system of the network (Selecting a coordinate system).

From projection file *.prj

From projection file *.prj

The data is read without further queries. In case of different coordinate systems the coordinates of the shapefile will be transformed into coordinates of the network.

The Read attributes window opens.

6.  Make the desired changes.

Element

Description

Column

Order in which the attribute columns are read

SourceAttributeID

Codes of the attributes which are read

Note

The codes correspond to the column identifiers of the attribute file.

Source data type

Data type of the source attribute

N: numeric

C: character

Target attribute

Click this button to in a separate window select a target attribute (and a subattribute, if available) for each source attribute. The source attribute values are then read into the target attribute (Selection of attributes).

Tip

Alternatively, you can create a user-defined attribute as target attribute.

Notes

If no target attribute is selected for a source attribute, the attribute values of the source attribute are not read.

If the same target attribute is selected for multiple source attributes, only the attribute values of the source attribute last read (highest column number of the same target attribute) is taken, whose value range corresponds to the value range of the target attribute.

Target data type

Data type of the selected target attribute

New

Edit

Via the New button you can create a user-defined attribute as a target attribute for a source attribute in a separate window. Click the Edit button to change the settings of the user-defined attribute allocated (Managing user-defined attributes).

Note

The button label changes from New to Edit, as soon as you allocate a source attribute to a user-defined attribute manually or via the Create button.

Generate

Via this button you can create simultaneously user-defined attributes for all source attributes to which no target attribute is allocated. Visum uses the SourceAttributeID as a name for the new attribute.

Notes: If you do not select Number as target attribute for point and polygon objects, ascending numbers will be created, starting with maximum key + 1.

If for line objects read in as links one of the three required target attributes Number, From node number and To node number has not been selected, the necessary routing information is calculated by means of the snap radius.

7.  If line objects are read in as undirected links, select for each attribute how its value is to be read in.

Element

Description

Forth

Direction From node - To node

Back

Direction To node - From node

Cross-section

50% of the value for each direction

Symmetrical

Equal value for both directions

Note: In Visum the following applies to links:

  • From node number < To node number
  • Forth = From node - To node
  • Back = To node - From node

8.  Confirm with OK.

The shapefile is imported into Visum.

Notes: If you read in line objects, all required yet non-existing nodes are created.

If an object cannot be read in, the reading process is not aborted. The object will be skipped.

Tip: To generate stop points from point objects, read point objects as nodes and then aggregate the isolated nodes to create stop points (Aggregating isolated nodes).

Notes: The import of background data (e.g. land development) is not supported. However, they can be read as POIs.

In shapefiles, several faces can form a surface. When you import shapefiles, Visum supports several faces per surface (Fundamentals: The surface data model in Visum). All faces are inserted according to the Visum data structure. This also applies to polylines with several segments.

Note: If the field names of a shapefile begin with numbers, the attribute IDs of the user-defined attributes created are prefixed with 'UDA'.