I'm new to CityEngine, and I'm trying to use it to select and measure all of the parking lots in my city's downtown. I'm trying to do this by creating shapes over the parking lots, and I want to be able to measure the area of these shapes in acres, preferably. How can I measure the area of shapes I've created?
Also, is there an easier way I could accomplish what I'm trying to do? I appreciate all suggestions!
My software is CityEngine 2019.1
Apply this rule to all of your parking lot shapes to report each shape's area. geometry.area returns the area in the units of your coordinate system (e.g. square meters for default CityEngine scene).
Lot --> report("Area", geometry.area) X.
Then, you can see the sum of all the areas in the Reports section in the Inspector. Alternatively, you can create a dashboard card of type Key Number for the report "Area" (Window -> Dashboard).
Just to add a little Cheryl's answer...what gets spit out is in square meters, so you'll need to convert it with a multiplier. You can multiply in place but I'd suggest you get in the habit of using constants. I have a mini library I copy and paste to start every rule I write.
const sqm2acres = 0.000247105 #square meters to acres Lot --> report("Area", geometry.area * sqm2acres) X.