Define Front of a House

7327
14
11-28-2011 12:37 AM
CharalamposApostolou
New Contributor II
How can i define which side of the lot is the front? For example if i am on a corner how can i define which will be the front side?
14 Replies
MatthiasBuehler1
Frequent Contributor
Hi,


Incoming polylines from a GDB are always used together with the 'Dynamic City Layouts', with the Block generation deactivated. ( No subdivisions ).
Incoming polygons are 'Static Shapes' and there is no connection to the 'Dynamic City Layouts' system.

Note that when you select a 'Lot' shape, that you have streetWidth() attributes in the Object Attributes. Together with the First Edge, this is defined by the 'DCL' system.
Now if you just import Static Shapes, it depends where the First Edge is. The First Edge defines 'FRONT' in CGA. Thus, my 2 scripts 'inform' Static Shapes on 1] where the best position would be for the First Edge and 2] where the Street Edges are. This is calculated for selected GRAPH segments.

So since the 'DCL' inform the Dynamic Shapes automatically, we mimic this via Python, to inform Static Shapes.

Additionally, the following issue may also occur to your workflow :
http://forums.arcgis.com/threads/79729-Origin-of-shapes-imported-from-FGDB-seems-arbitrary

NOTE :
The streetWidth() attributes are not standard attributes. They're actually an array ( a list ). That list is just displayed in the Object Attributes as if they were separate attributes. That type of array CAN NOT be ported via GDB directly. Assuming you preprocess your Static Shapes in ArcGIS / FME instead of using my scripts, by addressing both the clockwise issue ( other thread ) and the actual position of streetEdges, the best thing you can do is nevertheless write single streetWidth attributes in ArcGIS per edge and then in CityEngine just create a script which takes those attributes, deletes them and writes an attr array, which then is usable in CGA.

Read this a couple of times, then let me know if questions remain. 😮 Sadly, there's currently no easier way to port this information.

Let me know if you're good in scripting, then I may give you more inputs ! 🙂

Matt
0 Kudos
LoringTupper
New Contributor
Thanks for the reply Matthias, unfortunately I know very much about CGA so I'll just tell you what I gleaned from your response and what I have read in the notes in the pythion scripts.

1) GDB layers are in fact Static Shapes.
2) I'm to run both of the scripts, first alignStaticShapesToDynamicStreet_v1.py to align the parcel shapes to the street segments, then the SetStreetEdge.py script to identify the street edge of the parcel.
3) the SetStreetEdge.py script creates a streetWidth "attribute" in the parcel layer shapes, this helps identify the street edge of the shape, i.e. the edge of the parcel shape that faces the nearest street line.

Questions:
1) Do I need to select all of the parcel polygon shapes and the street network lines when I run these python scripts?
2) How can I tell these scripts are running and/or completed? I see no indication that anything is happening  when I run the scripts with all street network lines and parcel shapes selected. I also don't see a streetWidth "attribute" in the parcel shape object attributes list after running the scripts so I assume they did nothing.
3) If I were to get this to work, i.e. get the streetWidth attribute on the parcel shapes, is there anything I need do in the CGA script assigned to the parcel shapes when I'm assigning setbacks?
0 Kudos
MatthiasBuehler1
Frequent Contributor
Hi !

Questions:
1) Do I need to select all of the parcel polygon shapes and the street network lines when I run these python scripts?
2) How can I tell these scripts are running and/or completed? I see no indication that anything is happening when I run the scripts with all street network lines and parcel shapes selected. I also don't see a streetWidth "attribute" in the parcel shape object attributes list after running the scripts so I assume they did nothing.
3) If I were to get this to work, i.e. get the streetWidth attribute on the parcel shapes, is there anything I need do in the CGA script assigned to the parcel shapes when I'm assigning setbacks?



1]
You need to select the shapes you want to 'inform', plus the street segments. ( ONLY the segments, no additional shapes of the streets or blocks. You need that specific selection because I do not clean the selections before running the script.

Note that the script is intended to inform 'footprints', not 'parcels'. Of course you can select any shape, but the script evaluates first ONE street on which it works with, it does not take into account multiple possible streets. That's a limitation of the script.

2]
At the end of the script, a fat line is printed in the Python console, so open the console and check when it appears :
print ("________________________________________")


3]
By running the scripts, the shapes are informed in a manner that CGA will operate correctly.
- The first script, which sets the first edge to the correct 'best street' will make sure CGA's 'front' is aligned there ( along the FirstEdge).
- Once the streetWidth array is written (after running script 2), which defines which edge is facing the same 'best street', CGA will be able to define setbacks based on street.front selectors ( actually doing setbacks away from that street ).


Play with 1 street segment and a few different shapes footprints first to get a grasp how the script runs, and check the setting values on top of the script. There's also a short explanation.


Ok ?
0 Kudos
LoringTupper
New Contributor
Sorry its taken so long to get back, I got caught up on other matters.
I did manage to get the python scripts to work correctly and was able to apply setbacks to front, back and sides for my properties. I found that I needed to run the "Simplify" tool on the layer in ArcGIS prior to going in to the CityEngine project and applying the python scripts, but it did work for 99% of the parcels I was testing.
Thank you for all of your help with this, I think I can now move forward with my project.
0 Kudos
MatthiasBuehler1
Frequent Contributor
Very cool to hear this works in almost all cases.

Bravo !

Matt
0 Kudos