Import SHP (Esri Shapefile)

Shapefile is an Esri legacy format used to describe georeferenced GIS features (points, lines, polygons, and limited multipatches). It has limited support for GIS attributes and should be considered superseded by Esri FileGDB.

Import options

For shapefile import, the following options are available:

OptionDescription

File

  • Click Browse to open a dialog box and select an .shp file to import.
  • After opening a file, the dialog box detects the shape type of the file. The type is displayed in the header of the dialog box (for example, Shape Type: POLYGON. Importing shapes). The following types can be imported as shapes: Polygon, PolygonZ, PolygonM, Multipatch, Point, and PointZ. Other types are imported as graph segments.

Note:
  • Shapefiles containing points can also be imported. In this case, a marker (0.1 x 0.1m quad) is created for each point.
  • Shapefile polygons containing negative polygons that cut holes into polygons are not supported and are imported as normal shapes instead of holes.

Coordinate System

  • The .prj file of the shapefile is read by SHP import. If successful, the corresponding coordinate system is displayed on the dialog box. Otherwise, a pop-up prompts you to choose a coordinate system.
  • Ensure that the input shapefiles use the same coordinate units in the planar and up directions. CityEngine does not support separate units for the planar and up directions.

Using Attributes from SHP file

  • A .shp file has an accompanying .dbf file that contains associated attributes for elements. After importing the .shp file, these attributes appear in the Inspector window on the Object Attributes tab.
  • To use these attributes with the CGA grammar, you must declare CGA attributes with matching names. A simple CGA rule file may look like this:
    attr height = 10
    Lot --> extrude(height)
  • After assigning this rule file to the shapes, the height CGA attribute appears on the Object Attributes tab of the Inspector window.

Note:
The Source field is set to Object, which denotes that the CGA height attribute is controlled by the object attribute of the lot.

Graph options

The following graph options are available:

OptionDescription

Run Generate Bridges Tool after Import

If enabled, the Generate Bridges tool is run on a subsequent wizard page.

Run Simplify Graph Tool after Import

If enabled, the Simplify Graph tool is run on a subsequent wizard page.

Run Graph Cleanup Tool after Import

Depending on the shapefile data, it may be necessary to clean up the graph segments after import. If enabled, the Cleanup Graph tool is run on a following wizard page.

Create Street/Intersection Shapes from Graph

If enabled, the shape creation parameter of the graph nodes and segments is enabled and street shapes are created.

Create Block/Lot Shapes from Graph

If enabled, the shape creation parameter of potentially created street blocks is enabled and shapes are created.

Map shapefile attributes

If enabled, an imported graph layer contains the following layer attribute code:

Map shape attributes
Map shape attributes are shown.

This mapping controls the width of the street shapes generated from the graph center lines. In the default behavior, the width object attribute is used to determine the resulting street width and defaults to 8 if no object attribute is found.

You can edit the default mapping code by changing the CGA code in the shp.ceattr file in the /ce.lib/rules/ directory.