Hi,
I would like to know how I can get the area for building footprint created using another rule. eg. the footprint area generated at FootPrintReach.
Thank you.
Dulini
Hi Dulini!
If I understand the question you are trying to get the parcel area passed to the footprint rule you created? You could try passing the area as a parameter to the next rule. For example:
Parcel-->
setback (front_setback){street.front:NIL:remainder: FootprintRule(geometry.area)}
FootprintRule(ParcelArea)-->
do_stuff_with(ParcelArea)
extrude(X)
Etc. Or are you asking how do you determine the area of the footprint within the Parcel rule? That might be a little more difficult because the footprint rule cannot tell the parcel rule what its area is. Information cannot be sent back up the shape hierarchy. Usually we get around this with some math, python (reports API), or setting global variables in CGA. What is the goal generally? Just trying to understand the question. David
You have to add reporting code to the rule that creates the area, e.g. like this:
attr AreaWhole <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN> attr AreaPart1 <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN> attr AreaPart2 <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN> @StartRule Lot <SPAN class="operator token">-</SPAN><SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN> set<SPAN class="punctuation token">(</SPAN>AreaWhole<SPAN class="punctuation token">,</SPAN> geometry<SPAN class="punctuation token">.</SPAN>area<SPAN class="punctuation token">)</SPAN> report <SPAN class="punctuation token">(</SPAN><SPAN class="string token">"AreaWhole"</SPAN><SPAN class="punctuation token">,</SPAN> AreaWhole<SPAN class="punctuation token">)</SPAN> split<SPAN class="punctuation token">(</SPAN>z<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>scope<SPAN class="punctuation token">.</SPAN>sz<SPAN class="operator token">/</SPAN><SPAN class="number token">2</SPAN><SPAN class="punctuation token">:</SPAN> Part1 <SPAN class="operator token">|</SPAN> scope<SPAN class="punctuation token">.</SPAN>sz<SPAN class="operator token">/</SPAN><SPAN class="number token">2</SPAN><SPAN class="punctuation token">:</SPAN> Part2<SPAN class="punctuation token">}</SPAN> Part1 <SPAN class="operator token">-</SPAN><SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN> color<SPAN class="punctuation token">(</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">)</SPAN> set<SPAN class="punctuation token">(</SPAN>AreaPart1<SPAN class="punctuation token">,</SPAN> geometry<SPAN class="punctuation token">.</SPAN>area<SPAN class="punctuation token">)</SPAN> report <SPAN class="punctuation token">(</SPAN><SPAN class="string token">"AreaPart1"</SPAN><SPAN class="punctuation token">,</SPAN> AreaPart1<SPAN class="punctuation token">)</SPAN> Part2 <SPAN class="operator token">-</SPAN><SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN> color<SPAN class="punctuation token">(</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">)</SPAN> set<SPAN class="punctuation token">(</SPAN>AreaPart2<SPAN class="punctuation token">,</SPAN> geometry<SPAN class="punctuation token">.</SPAN>area<SPAN class="punctuation token">)</SPAN> report <SPAN class="punctuation token">(</SPAN><SPAN class="string token">"AreaPart2"</SPAN><SPAN class="punctuation token">,</SPAN> AreaPart2<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Thank you David.
I am trying to create massing for each parcel based on lot coverage and FAR , but the it should consider the setbacks to determine the building footprint area to get the building height.
As you mentioned, footprint area needs to be input to parcel rule, so how do I set global variables?
Thank you again.
I am going to give this a try.....
Ah then my first suggestion might not be in that direction. I saw an earlier thread you participated in and that had some more context. There are rules that do something like this that might be a good model. I think in the Complete Streets 2015 Project there is a Target GFA rule that does something similar. One idea is to use the information about the footprint and you have a target far, it might be possible to round the height to the nearest resulting area. If you want to get fancy, you could even try to have the last floor deal with rounding error with additional setbacks based on the ratios of area loss from the first set of setbacks (maybe, it won't be exact, nor should it be, buildings don't have 10 square foot top floors). The rule below does not do exactly what you are asking for, but it creates a pattern to achieve a similar goal. I can work on a better example later if this does not get you where you want to go.
So I understand, the goal is to determine the height of a building based on target FAR, with setbacks already understood. Essentially a rule to understand the tradeoffs between setbacks/ footprint area and a target FAR?
/** * File: Simple_Massing_Model_by_GFA.cga * Created: 17 Feb 2014 08:54:32 GMT * Author: Esri */version "2014.1"attr Floor_Height = 3.2attr Gross_Floor_Area = 10000@Hiddenattr gfaLeft = 0@Hiddenattr volumeLeft = 0gfaFromVolume(vol) = vol/ Floor_HeightInit --> alignScopeToAxes(y) set(volumeLeft,geometry.volume()) set(gfaLeft, Gross_Floor_Area ) print("Current Volume: " + volumeLeft) print("Theoretical GFA: " + gfaFromVolume(volumeLeft)) print("Target GFA: " + Gross_Floor_Area ) MassMass --> case gfaLeft > geometry.area(bottom) && scope.sy < Floor_Height *1.1: s('1, Floor_Height ,'1) Floor set(gfaLeft,gfaLeft-geometry.area(bottom)) color(0,1,0) t(0, Floor_Height ,0) Mass case gfaLeft > 0: set(gfaLeft,gfaLeft-geometry.area(bottom))# color(0,0,1) split(y){ Floor_Height : Floor | ~1: Mass } else: color(1,0,0) asdf.
/** * File: Simple_Massing_Model_by_GFA.cga * Created: 17 Feb 2014 08:54:32 GMT * Author: Esri */
version "2014.1"
attr Floor_Height = 3.2attr Gross_Floor_Area = 10000
@Hiddenattr gfaLeft = 0@Hiddenattr volumeLeft = 0
gfaFromVolume(vol) = vol/ Floor_Height
Init --> alignScopeToAxes(y) set(volumeLeft,geometry.volume()) set(gfaLeft, Gross_Floor_Area ) print("Current Volume: " + volumeLeft) print("Theoretical GFA: " + gfaFromVolume(volumeLeft)) print("Target GFA: " + Gross_Floor_Area ) MassMass --> case gfaLeft > geometry.area(bottom) && scope.sy < Floor_Height *1.1: s('1, Floor_Height ,'1) Floor set(gfaLeft,gfaLeft-geometry.area(bottom)) color(0,1,0) t(0, Floor_Height ,0) Mass case gfaLeft > 0: set(gfaLeft,gfaLeft-geometry.area(bottom))# color(0,0,1) split(y){ Floor_Height : Floor | ~1: Mass } else: color(1,0,0) asdf.
Hi David,
My rule is little bit complicated.I want to change the footprint area as setback parameters changes.
If you check the code below, I want to populated the Area2 with the number from AREAS2 at "reports" .
attr AREA = geometry.area #PARCEL AREA
@Group("SetBacks:")attr frontSetback = 10attr backSetback = 5attr sideSetback = 3attr FAR = 0
@Group("Area:" )attr GFloor = AREA*FAR #GROSS FLOOR AREA BASE ON PROVIDED FARattr LCover = AREA2 #LOT COVERED BY THE BUILDING(if get from shapefile)
@Group("Heights: ")attr GFHeight = 5.5attr UFHeight = 3.5
@Range ("transparent", "as is", "top and side")attr vizMode = "as is"
@StartRuleParcel --> set ( AREA, geometry.area ) report ("AREA", AREA) setback(frontSetback) { street.front : NIL | remainder : setback(backSetback) { street.back : NIL | remainder : setback(sideSetback) { street.side : NIL | remainder : FootprintReach } } }
attr AREA2 = 0 #FOOTPRINT AREAattr buildingHeight = GFloor/AREA2*UFHeight
FootprintReach --> set(AREA2, geometry.area) report("AREA2", geometry.area) extrude(world.y, GFloor/AREA2*UFHeight) split(y) { GFHeight : Volume("GF") | ~1 : UpperFloors }
UpperFloors --> split(y) { ~ UFHeight : Volume("UF") } *
Volume(volumeType) --> case volumeType == "GF" : color(0,1,0) Visualization else : color(0,0,1) Visualization
Visualization --> case vizMode == "as is" : Done. case vizMode == "transparent" : set (material.opacity, 0.8 ) Done. else : comp(f) {top : Top. | side : Side. | all : NIL }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.