Manually setting streetWidth for setback()

11-19-2012 08:10 AM
New Contributor
I'm working with an imported shape file that has lots, and I'm trying to use setback() with it.  I've done some analysis and I've got a list of all the street facing edges for each lot, but there doesn't seem like a good way to feed that information back into the system (there doesn't seem to be a good way to set an array attribute like streetWidth).

Any thoughts on the right way to do this?  There doesn't seem to be a clear way to "manually" do the operation myself (not all the lots are quads, so comp(e) with variable length indices doesn't seem possible)


Tags (2)
0 Kudos
3 Replies
Frequent Contributor
Hi !

You'll have to set this array with Python, this can not be done with CGA.

Let me know if you have some experience with scripting (esp. Python), this will be fairly technical .. 🙂
0 Kudos
New Contributor
I do a lot of python, so fire away.  Thanks.
0 Kudos
Frequent Contributor
Ok. 🙂

This thread :
page 2, my last post, script named ''.

Check the end of the script, esp. short before :
ce.setAttribute(shape, objAttrName, streetWidthAttrValueList)

This will show you how to write that list.

One thing I've just noticed is that in this line :
streetWidthAttrValueList = highestEdgeIndex*[0]

-> My coworker made a similar script which states:
streetWidthAttrValueList = highestEdgeIndex*[None]

So it can be that then, the streetWidth() attributes with the value '0' do not appear in the Obj Attr list in the Inspector, which even may be better. Try playing with this.

Concerning the indexing :
Note that ArcGIS stores the vertex order clockwise, while CE interprets the vertex order counterclockwise, which messes up the order you have in ArcGIS. But you can fix this by a function which translates between the two worlds.

Let me know if some things are unclear !

0 Kudos