Escolar Documentos
Profissional Documentos
Cultura Documentos
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
Download items
Tutorial data
Tutorial PDF
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
1/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
2/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
3/19
10/23/2016
4.
5.
6.
7.
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
Make sure Run Graph Cleanup Tool after Import is checked, and click Next.
Enable Intersect Segments, Snap Nodes to Segments, and Merge Nodes.
Set the snapping distance to 1 and the merging distance to 5.
Click Finish.
A new graph layer called sesame_streetsketch appears in the Scene Editor. Alternatively, you can open the
sesame_02.cej scene file to get the scene with the imported data.
4/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
5/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
Final result
The sesame_12.cej scene file contains a finished street network with extracted and subdivided lots.
The following screen shot shows Sesame City with generated minor streets and extracted building footprints:
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
6/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
The following screen shot shows Sesame City with simple buildings and vegetation models:
7/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
"OpenStreetMap is a project aimed squarely at creating and providing free geographic data such as street maps to anyone
who wants them." openstreetmap.org
OpenStreetMap
OSM is an XMLbased format used to describe vector data in a map. It defines three basic data typesnodes, ways, and
closed wayswhich are used to describe all the other elements:
NodesPoints between which segments are drawn.
WaysOrdered list of nodes, displayed as connected by line segments in the editor.
Closed WaysWays that go in a complete loop. They are used to describe areas such as parks, lakes, or islands.
The OSM data for this tutorial area of historical Pompeii was downloaded from api.openstreetmap.org/api/0.6/map?
bbox=14.4798600,40.7454200,14.4984500,40.7550800.
Find the .osm file in the data folder of your current CityEngine project.
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
8/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
5. Click Finish.
6. Accept the suggested coordinate system WGS 1984 UTM Zone 33N.
7. Click OK.
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
9/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
Two new layers street network and shapes appear in the Scene Editor, and the OSM data is visible in the 3D
viewport, with automatically created street shapes on the imported street centerlines.
8. Rename the graph network layer to OSM_Streets.
9. Rename the shape layer to OSM_Shapes.
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
10/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
Street widths
If you look closely at the generated street shapes, you'll notice that they differ in width. When importing OSM data with
the Map OSM tags option enabled, CityEngine creates layer attributes that define street widths from OSM street types.
Select a street segment and note its parameters in the Inspector.
In the following screen shot, a street with highway type primary has assigned street and sidewalk width parameters
according to the layer attribute mapping from the imported OSM Layer OSM_Streets:
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
11/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
You can manually modify the street width by setting a new width value to the streetWidth parameter the value will change
to a userset value or by using the Street Edit tool on the toolbar.
12/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
oneway=//onewaywidthcorrection
casegetObjectAttr("oneway")=="yes":0.5
else:1
sidewalkscale=1//sidewalkwidthscalefactor
sidewalkWidth=
caseclass=="primary":2
caseclass=="secondary":2
caseclass=="tertiary":2
caseclass=="residential":2
else:0
attrsidewalkWidthLeft=sidewalkWidth*sidewalkscale
attrsidewalkWidthRight=sidewalkWidth*sidewalkscale
Data conflicts
Imported OSM data often is not very clean and leads to conflicts for example, overlapping streets. Open blocks or red
dotted lines are indications of unconnected segments or overlapping streets, which can lead to invalid blocks. There are a
number of ways to deal with such conflicts:
Use the Cleanup Graph tool with different parameters.
Select fewer streets from the highway layer in the import dialog box.
Set street and sidewalk widths to lower values resulting in less overlapping streets.
Manually clean up the street network after import by combining or removing nearby crossings or parallel streets.
The following screen shots show an example of unconnected graph nodes before and after cleaning:
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
13/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
Note:
OSM street data usually contains elevation data attribute level, but it may be faulty. If you activate the Run
Generate Bridges Tool option, CityEngine automatically works out a possible solution to deal with this.
Click File > Import > CityEngine Layers > Texture Import.
Browse to the pompeii_satellite.jpg file in the maps folder.
Use the suggested coordinate system WGS 1984 UTM Zone 33N for the image.
Size bounds and Offset Location are set automatically via the pompeii_satellite.jgw world file.
Click Finish to create the new texture map layer.
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
14/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
Note:
CityEngine does not reproject images on import. Choosing the coordinate system on image import is only used
to calculate the correct location information. It is therefore crucial to have image data prepared in the projection
used in the CityEngine scene. In the previous example, the Pompeii satellite image has been reprojected in
ArcMap to WGS 1984 UTM Zone 33N the Scene Coordinate System used for this tutorial scene.
The following screen shot show the satellite map added to OSM street data:
Generate models
1. Select all shapes.
2. Assign the osm_generic.cga rule file.
Because some shapes already have a valid start rule set, the Set Start Rule dialog box appears.
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
15/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
3. Click Skip.
4. Generate.
As you may have noticed, only the streets have been generated. The building shapes were not generated. Select one
of them and note in the Inspector that there is no start rule assigned.
5. To fix it, rightclick the selected shape in the viewport and choose Select > Select Objects with Same Start Rule from
the context menu. This selects all shapes with no start rule set.
6. In the Inspector, click the Select button next to the Start Rule field. In the Set Start Rule dialog box, choose Lot.
7. Generate again.
The following screen shot shows simple generic models generated on OSM data:
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
16/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
Shapefile data
1. Locate the streets.shp file in the data folder of the tutorial project.
The shapefile also has a .prj file, which ensures correct georeferencing on import. The data consists of polylines that
import as street segments in CityEngine. The data also contains a width attribute, which controls street width in
CityEngine.
Attribute table of the shapefile as displayed in ArcMap:
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
17/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
Import data
1. Create a new empty CityEngine scene.
2. Drag and drop the streets.shp file from the Navigator into the 3D viewport.
3. During import, CityEngine prompts you to choose a scene coordinate system. The projection defined for the
shapefile is suggested as default; use that here.
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
18/19
10/23/2016
Tutorial4:ImportstreetsCityEngineTutorials|ArcGISforDesktop
Note:
The .shp data in this example contains the width attribute to control the street width. Data with no such attribute
results in default street widths. Street widths can also be set manually after import. Mappings to other attribute
names are possible as well using attribute mapping. See the CityEngine manual for details.
Cleanup
The imported street shapes show some conflicting street shapes, marked with red dotted lines. Use the Cleanup Graph
operation with Resolve Conflicting Shapes enabled to fix those automatically. You can also use the Simplify Graph tool to
reduce unneeded complex graph segments by approximating the graph by deleting unneeded graph settings and setting
the tangents. See the Street Network section of the CityEngine manual for details.
http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial4importstreets.htm
19/19