Tuesday, January 12, 2016

CityEngine & ArcGIS Pro combine to show CCTV coverage in 3D

Happy 2016!!

Once again I failed to post as regularly as I would have liked towards the latter part of 2015. Hopefully I can mange my time better in the new year...(no promises). 

I was asked to create and co-present a presentation at the Esri Africa User Conference plenary session in November 2015 which shows the value of 3D GIS. I thought it is a good place to start the 2016 Urban Scene blog posts.

The aim the presentation was to show the location and coverage of CCTV cameras in downtown Johannesburg, as well as how changing some of the camera attributes (like angle, direction and length) can increase the covered areas. CityEngine was used to create the CCTV coverage rules, and ArcGIS Pro's analysis abilities were utilised to determine the covered areas.  


 CityEngine:

Step 1 was to create a CityEngine rule that creates 3-dimensional pyramid shapes representing the visible area of each camera. The CGA rule is shown in the images below:

Attributes


The attributes used by the Rule file are described in the image above. Note that the Width and HorizontalRotation attributes derives their values by calling the getWidth and getRealDirection functions, respectively.

The getWidth function uses the Pythagorean mathematics to calculate the width (length of the opposite triangle side) by using the CameraAngle and ViewLength attributes.

The getRealDirection function converts the azimuth attribute (N= 0, E = 90, S = 180, W = 270) so that the coverage area has the correct real-world direction.



Rules

The image below show the rather simple rules used to generate the viewing area:


  • Object: The Object rule uses the i-function to transform the CCTV point to an existing triangular Collada shape and then calls the Rotate rule.
  • Rotate: The rotate function uses the VerticalRotation and HorizontalRotation attributes to change the angle of the viewing area, before calling the Scale rule.
  • Scale: Finally the Scale rule scales the viewing are according to the Width, VerticalHeight and ViewLength attributes. The rule then centers, colours and changes the transparency of the 3D viewing area.



ArcGIS Pro

The second part of the presentation showed how these CityEngine rules can be implemented in ArcGIS Pro for further analysis. The examples are listed below


  • Display the 3D view areas alongside existing 3D content (such as buildings) in ArcGIS Pro.  



  • View feature information in a pop-up. This can include attributes, pictures, videos or HTML attributes such as an i-frame of the Google Street View.




  • Calculate the % of the area covered by the cameras. The image below shows the Before and After scenes after additional cameras were added. We can analyse the coverage of the new additions and compare the calculated values to the previous scenario.