Joined reporting for features from different layers

5013
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
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

All you need to do is name the reports with the same name, and those reports will be summed for all selected items...

So in the rules for the yellow, white, and blue shapes, you might have a reporting rule for each building. Sample CGA code:

YourBuilding -->

     # Some code here resulting in a building and the values below.

     ReportMetrics("GFA", 16000, "East123","Tower01")

     ReportMetrics("UnitCount", 20, "East123","Tower01")

ReportMetrics(key, value, siteID, buildingID) -->

     report("Total_" + key, value)

     report("Site_" + siteID + "_" + key, value)

     report("Building_" + buildingID + "_" + key, value)

     NIL

The Reports view would have GFA and UnitCount entries, summed for the Total, for each Site, and for each Building.

Total_GFA    1200000

Total_UnitCount    400

Site_East123_GFA   22000

Site_East123_UnitCount 210

Building_Tower01_ GFA  16000

Building_Tower02_ GFA  17000

Building_Tower03_ GFA  16000

Building_Tower04_ GFA  18000

Hope this explanation is clear. Yes?

Chris

View solution in original post

25 Replies
by Anonymous User
Not applicable

All you need to do is name the reports with the same name, and those reports will be summed for all selected items...

So in the rules for the yellow, white, and blue shapes, you might have a reporting rule for each building. Sample CGA code:

YourBuilding -->

     # Some code here resulting in a building and the values below.

     ReportMetrics("GFA", 16000, "East123","Tower01")

     ReportMetrics("UnitCount", 20, "East123","Tower01")

ReportMetrics(key, value, siteID, buildingID) -->

     report("Total_" + key, value)

     report("Site_" + siteID + "_" + key, value)

     report("Building_" + buildingID + "_" + key, value)

     NIL

The Reports view would have GFA and UnitCount entries, summed for the Total, for each Site, and for each Building.

Total_GFA    1200000

Total_UnitCount    400

Site_East123_GFA   22000

Site_East123_UnitCount 210

Building_Tower01_ GFA  16000

Building_Tower02_ GFA  17000

Building_Tower03_ GFA  16000

Building_Tower04_ GFA  18000

Hope this explanation is clear. Yes?

Chris

PetrBocharnikov
New Contributor

Looks neat and easy. I will get a chance to run it on CE after the weekend. I will get back to you on that.

0 Kudos
by Anonymous User
Not applicable

This is kind of the reverse of having buildings sample a larger polygon. Since you can't sample from the large polygon and find each building upon it, this is another way.

The prefixes are what makes everything group together:

     Total_

     Site_siteName_

     Building_buildingName_

MatthiasBuehler
Regular Contributor

Well explained .. you like that one, huh ?

Matthias Buehler

Head of 3D Technologies

twitter: @MattB3D

--------------------------------

Garsdale Design Limited
matthias.buehler@garsdaledesign.co.uk

www.garsdaledesign.co.uk

0 Kudos
by Anonymous User
Not applicable

You probably taught it to me.

Sent from my iPhone

0 Kudos
AlanKlys
Occasional Contributor

This summation of totals during reporting is very handy indeed.  Thanks a lot for the tip!

Is there a way to set an attribute to one of these totals tho ?  Nothing I've tried seems to work.

0 Kudos
by Anonymous User
Not applicable

Yes, that is possible. You have to use the Python scripted reports for that. In that case you get the reports from each model and then change the object attributes of the models, and connect your rule attributes to the object attributes. From Python.

Chris

AlanKlys
Occasional Contributor

Thanks again Chris,

I've found bits and pieces on this in the manual and in the tutorials, just trying to wrap my head around how to actually do this.  Wish there were a few more Python examples floating around.   

As per your above example, is there a way to accomplish something like this ... as in set a float value to one of these summed up reports ?

report("Total_" + key, value)  

set (T_Total,(+ key, value))

by Anonymous User
Not applicable

I have an example somewhere, but everything is in disarray on my machine. I've made myself a note to find it. If I don't reply within the next week, then leave a comment here again to prompt me. 

0 Kudos