Reading the dimensions of streets' medians and trees' coordination

07-31-2016 08:06 PM
New Contributor II

Hello everybody,

I am using "complete street" and the Python console. I want the exact coordination of streets in each direction, so I have to read the dimensions of the medians. Furthermore, I need to read all the generated trees inside each median, as well.

I know that there are some ways through the reporting mechanism to obtain more information from a CE model. I have read Tutorial 11 and 12, but still have problems. What should I put in my CGS code, and what to put in my python code?

Thank you all in advance

0 Kudos
1 Reply
Regular Contributor

Generally, to get coordinates of the shape, you could use the getGeoCoordinate function in CGA, put it into a report, then have python pump out the reports like you see in the tutorial (theoretically). This can be done on a shape basis. As a quick experiment I put this under the BikeLane rule. If used this way, I suggest using this function on shapes that are subdivided alone multiple shapes with scopes that are narrow and easy to understand. I have not used this function extensively, but theoretically it could be used to help guide exports for more complicated rendering programs and some people have suggested transportation modeling programs like VisSim. This function has the limitations noted in CityEngine Coordinate systems, and to the CGA function itself.


  print("Bike Lane Shape Coordinates:"+(str(getGeoCoord(lat))+","+ str(getGeoCoord(lon))))


Console Output was:

     Bike Lane Shape Coordinates:0.0003011754172411,-0.0017071481280305
Report in rule:

David Wasserman, AICP