Monday, February 17, 2014

Network Analysis in CityEngine!

OK, actually its network analysis in ArcScene...and viewing it in CityEngine :D

The aim of this task was to create a 3D routing workflow to calculate the route to the closest emergency assembly point from anywhere within a building.

I started with the floor layout of a building (which have been captured from CAD data). The floor layout polygons are z-enabled and the stairs have been included. As seen below in ArcScene.



Using the rooms, corridors and stairs as a guide, I proceeded to capture Z-enabled emergency evacuation routes for each floor. After a frustrating route capturing session the emergency routes were created.


The next step was to create a network dataset from my assembly points and emergency routes.It is vital that the emergency routes are split at each and every intersection, as well as to make sure that each assembly point is snapped (in 2D and 3D) to the endpoint of an emergency route.

Using Model Builder in ArcGIS, I developed a model which calculates the shortest route from a specified point to the nearest Assembly Point according to the network dataset in 3D.


The model does the following:

  1. Takes the Network Dataset and creates an empty Closest Facility layer
  2. It then takes the z-enabled assembly points and loads it into the Closest Facility as the facilities
  3. It then takes the user-specified points (interactively pointed on map - see image below) and loads it as the incidents features of the Closest Facility layer. To read more about Network Analyst's Closest Facility Layers click here.
  4. The model makes copies of both the incidents and the facilities and outputs it to a specified FGDB.
  5. Finally Model Builder uses the Solve tool to perform the analysis and determine the shortest route.
  6. Next step is to apply a pre-defined symbology layer to the resulting Closest facility route layer
  7. The final step consists of utilizing the Select Data tool to select the Route layer (line with 3D symbology applied) to export it to both a line and multipatch feature using the "Feature class to Feature class" and "3D layer to feature class" tools, respectively.
The Red flag represents the starting point, while the Green flags represent the Emergency assembly points
In this example, CityEngine was used minimally. It was used to create some of the walls around the rooms ans well as the steps for some of the staircases. The final ArcScene document was saved and exported to a web scene using the "Export to 3D Web Scene" tool (the next step will to include this tool in the model builder, creating a "one-click" solution from model builder to web scene.



View the 3D web scene here.

Thursday, February 6, 2014

Cape Town at a Glance - 3D

It took a while to remove all the cobwebs after the long break, but I finally got around to playing with CityEngine 2013 (could have just as well been CE 2014!).

The main talking point this year at the office is the first ever Esri Africa User Conference in Cape Town later in the year. Esri South Africa created an ArcGIS online story map to help guide visitors around the city. I then decided to create a 3D version of that map. This was the result...


The first thing that I noticed with CityEngine 2013 is the new way it displays raster images. When I draped an aerial image over a height map, I saw that raster values with a 0 height (at sea level) were displayed as white. Although the image layer appears to be a null, for cells with height values of 0; it displays the entire terrain once exported.

Aerial terrain layer in CE 2013

I decided to include the Cape Town building footprints in the scene as 3D basemap only. Since the buildings are not really the main focus area of the scene, and used as reference only, I applied a simple Extract rule to extrude all the buildings to their height attribute and set the transparency at 0.8 (1 = fully visible).

Cape Town buildings
The next step was to create simple rules to display the data from the ArcGIS online story map. The 4 feature classes that were used were point features for:

  • Breweries (always important!)
  • Food and Drink
  • Things to Do
  • Where to stay

  • A simple CGA rule then assigned a 3D symbol for each point type:
#GeoBeer
Where to Stay
Food
Things to Do

Using the web scene to display image info

The point feature classes already contained URL information for each point of interest (displaying images). I created a new field which would contain the URL value as part of an IFRAME string. Using Field Calculator in ArcMap the new IFRAME fields were calculated as:

"<iframe height = "410" src = ' " + [URL] + " '></iframe>"

Doing this enabled the web scene to access imagery from the web, once it has been published.

Using an IFRAME to include image information


Also included in the web scene are locations of traffic cameras which monitor the traffic density on some of the major highways. Using an IFRAME string, each camera pulls a live image from the web and displays up to date conditions for that road section.


Live traffic camera
The live feed for the example above can be seen below:



The live traffic feed was obtained from i-traffic.

The web scene provides a fun, very interactive alternative to a normal 2D map.
One of the major changes with CE 2013 is the compression of the web scenes. My previous Cape Town web scene had a download weight of about 30 MB. With more data in the scene, the Cape Town at a Glance scene has a total size of 10MB.

Cape Town

You can visit Cape Town here.

P.s. 1000 points to the person who finds the Clock Tower!