SplitArea Function

2237
13
05-22-2017 07:11 PM
AbhishekSobbana
New Contributor II

Hi, I am trying to break down a parcel using splitArea(x/z) function some how it says unexpected token: splitArea.

I am trying to build a query where I can divide parcel 60-40% and in which 40% of the plot be subdivided into 3000sqm area and extrude building over it. Also I want to manage the orientation based on some angle (0-360 deg)

Can somebody help me with this. or suggest be best possible way to do this

Thank you

Ab

0 Kudos
13 Replies
CherylLau
Esri Regular Contributor

I don't understand your question, but I will make a guess that you want to split in two directions in order to partition a lot so that there is a courtyard in the middle.

Splits can only be made in one direction at a time (also applies to splitArea).  To split a lot in two directions, you will have to perform two splits, one after another.

Alternatively, you can use offset, setback, shapeL, shapeU, and shapeO to create L, U, and O shapes.  However, you cannot specify an exact area with these functions.

offset Operation 

setback Operation 

shapeL, shapeU, shapeO operations 

Yes, you can apply recursion in cga to partition lots recursively.  For example, if you apply shapeO to a lot, you can get a courtyard area in the middle.  Then, you can apply the rule again to the courtyard, you can subdivide the courtyard into another shapeO (or whatever function you want), and you can keep subdividing resulting pieces until your desired stopping criteria.

0 Kudos
AbhishekSobbana
New Contributor II

Sorry I confused you bit there,

I can not use splitArea since my version doesn't  support that function, So I am using split function in both direction to achieve 33% Greenspace (GS), 27% Openspace (OS) and 40% Building (Bu), like the code below

split(x) {'.21: split(z) {'.21: OS | '.57: OS |~1: OS}
| '.57: split(z) {'.21: Bu | '.57: GS |~1: Bu}
| ~1: split(z) {'.21: Bu | '.57: Bu |~1: Bu}}

Bu--> shape : split(x) {50 : split(z){60:Footprint}*}*

Courtyard

As you see this one option that generates from the above code. 

What I am trying to do is randomize between greenspace, openspace and building. Which is like this

Random

The above I have achieved using the block parameter using recursive subdivision, but the issue in using this is we cant control the percentage we need for greenspace, openspace and building. One advantage I see is we can control the building footprint area say 3000 sqm and seed function where it control randomness between the plots.

Can this be achieved using split function and also using seed function where it control the randomness for plot by retaining the percentage breakup.

0 Kudos
CherylLau
Esri Regular Contributor

Without splitArea() it is not really possible to divide a lot into a piece that is exactly 3000 sqm or end up with exactly 33% of the original area as green space.  However, you might be able to achieve approximate results.  Here are some ideas to explore:

* Recursion.  You can recursively split your parcel until your desired stopping criteria.  Maybe this criteria could involve the area or dimensions of the final lot?  Maybe the split chosen at each level depends on the area or dimensions of the current lot?

* geometry.area().  This function will give you the area of the geometry.  geometry Functions 

* scope.sx, scope.sz.  These will give you the size of the scope.  If you have rectangular lots, this might be helpful in calculating how large of a split to perform in order to get a certain area.  Of course, if you don't have rectangular lots, this calculation won't work.  scope Shape Attribute 

* Stochastic rules.  If you divide a rectangular lot into equal sized cells (like a grid), then you can use a stochastic rule to make 33% of the lots green space and 27% of the lots open space and etc, for example.  Stochastic Rule 

* Reports.  You can check how close you got to your goal by reporting the exact area.

report("Area.GreenSpace", geometry.area)
report("Area.OpenSpace", geometry.area)
report("Area.BuildingSpace", geometry.area)

* Tutorial 11.  In this tutorial, there is an attribute called greenspacePercentage.  It doesn't divide the space exactly according to the percentage set in the attribute, but it is approximate.  This can be seen in the reported values Area.Greenspace and Area.BuildUp.  You can see how the approximation was made in the Lot rule where it chooses to be GreenSpace or a BuildingLot based on this greenspacePercentage.  Tutorial 11: Reporting—CityEngine Tutorials | ArcGIS Desktop 

0 Kudos
AbhishekSobbana
New Contributor II

Hi Cheryl,

Sorry I was offline for few weeks so was not able to reply.

Thanks for the details inputs you have provided, it has helped me to achieve my target upto 80%.

Currently to achieve this issue I have first divided the plot into smaller pieces using split(x) {50 : split(z){60:Footprint}*}* and then used 

Lot --> case p(greenspacePercentage/100😞 report("Area.Greenspace",geometry.area) GreenSpace

else: report("Area.BuildUp",geometry.area) BuildingLot

which more or less provide me the percentage breakup for the for greenspace, building and openspace. 

Thanks for navigating me to the tutorial. 

I am still working on making rule for various subdivision of plots like it happens in default Block Parameter. where I can apply my percentage breakup.

 

0 Kudos