Measuring area of parking lots / measuring the area of shapes

1002
2
09-12-2020 11:54 PM
ClayAnderson
New Contributor

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

0 Kudos
2 Replies
CherylLau
Esri Regular Contributor

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.

geometry function—ArcGIS CityEngine Resources | Documentation 

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).

DevinLavigne
Occasional Contributor III

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.‍‍‍‍‍
0 Kudos