Select to view content in your preferred language

Joined reporting for features from different layers

6437
25
Jump to solution
09-19-2014 08:59 AM
PetrBocharnikov
New Contributor

Hello!

I am wondering, what is the best way to join reports for several shape layers? In my project, I have existing buildings (white), which are extruded from footprints shapes; new buildings (yellow), which are created from blocks of street network layer; and an underground parking (blue), which is extruded from a shape in another layer. How can I can report their attributes together - shall I create a forth layer to which I pass on the attributes of these three layers?

My general goal is to implement an interactive editing of new building volumes through the editing of street network. As a part of that, I would like to have the floor areas of existing buildings, new buildings and garage to appear together in the report panel. So that they could be assessed together.


picture for geonet.png

0 Kudos
25 Replies
AlanKlys
Occasional Contributor

That would be great thanks a lot Chris

0 Kudos
PetrBocharnikov
New Contributor

Chris Wilkins,

Good six months later, I have implemented your suggestion. It works nicely! Thank you.

Now I would like to develop this a little further, while keeping the aggregation into "Total_" and "Site_". Summing up the totals works well for GFA, but I don't think it works for FAR. I wouldn't want the sum of FAR values or the average of them. Instead, I want to take the sum of GFA and divide it by the sum of site areas. Any thoughts on how I can implement that?

If I can make Alan Klys​'s suggestion to set a float value to work that could be a solution. I could set values for Total_GFA, Site_GFA, Total_PlotArea, Site_PlotArea, and then report Total_FAR as Total_GFA/Total_PlotArea and Site_FAR as Site_GFA/Site_PlotArea.

0 Kudos
AlanKlys
Occasional Contributor

If my suggestion worked...

report("Total_" + key, value) 

set (T_Total,(+ key, value))

...then I guess you could accomplish what you want Petr, but alas I don't think it's possible. Seems like Python is the way to go in this case ... and a timely way to bump this for Chris

0 Kudos
by Anonymous User
Not applicable

Thanks for the bump. I'm currently in the middle of a major cleanup/organization of ALL of the rules and scripts I've written for CityEngine. This will be going on for the next few weeks. Since you bumped me, I'm now putting a yellow sticky note on the wall in from of me.   In the meantime you could try the Python documentation in the CityEngine manual... wink!

reminder.jpg

Chris

AlanKlys
Occasional Contributor

Muchos gracias amigo   I wonder what gems you'll find ?

0 Kudos
by Anonymous User
Not applicable

Here's one - Pergola.cga - it makes a pergola. If you make it small, it could be an arbor. Columns are not included. Someone should add columns to the rule. There are three layers of wood/material. I think I've just colored it. I'd make the columns be attached to the largest members on the bottom.  -Chris

Pergola.JPG

by Anonymous User
Not applicable

Petr and Alan,

I've got some scripts gathered now. Let me get this right before I start.

Petr said, "I want to take the sum of GFA and divide it by the sum of site areas. Any thoughts on how I can implement that?"  So for each site, you have a site area (like a parcel or lot), and there is a building on the site that has a GFA. To keep it easy, we'll suppose the building is generated on the parcel shape from a rule applied to the parcel. For each site and building we report:

report("SiteArea", siteArea)

report("GFA", gfa)

Then you wanted to add those two totals for every parcel/building that is reporting these, and then set an object attribute on those shapes, so that the rules have access to the average FAR of all of them?

Is that right? If so, I'll try and set up an example of this.

Thanks!

Chris

0 Kudos
PetrBocharnikov
New Contributor

Hi Chris,


Thank you for coming back on this!

Yes, your premise about a building on a site is correct. With your initial answer, I am able to report something like this:

Total_GFA    xxx

Total_SiteArea    xxx

Site_East123_GFA   xxx

Site_East123_SiteArea    xxx

But, I think, FAR requires a little different treatment: summarising FAR values for all parcels doesn't make sense. Instead, I need to take at the very end Total_GFA and divide it by Total_SiteArea, and the same for Site_East123_GFA and Site_East123_SiteArea.

Do you follow?

0 Kudos
by Anonymous User
Not applicable

Alan, Petr,

As promised, here is a script that finds the average FAR. You must select all objects for the calculation, since this uses the "python-based export" feature in CityEngine.

Find attached zipped CityEngine project. It is set up so you can just select all items and then run the script. The math can be double checked by manually calculating the average FAR using the reported values.

Also, there are a million print() statements from where I was debugging.

Try it out and let me know if you have questions.

Chris

AlanKlys
Occasional Contributor

Thanks a whole bunch Chris Having a peek at this now.

0 Kudos