ejph

How to Test Whether A Lot is On a Corner

Discussion created by ejph on Oct 25, 2011
Latest reply on Oct 28, 2011 by MBuehler-esristaff
I've been using code like the extract below to test whether a lot is on a corner (i.e. has two streetwidth variables greater than 0).

Is there a better way to do this?  I know you can create LotCorners but these are triangular lots that I don't want.

Lot -->
 setback(0.1) {streetSide: nil | remainder : test(comp.index)}

test(compIndex) -->
 case streetWidth(0) > 0 && streetWidth(1) > 0 : building
 case streetWidth(0) > 0 && streetWidth(2) > 0 : building
 case streetWidth(0) > 0 && streetWidth(3) > 0 : building
 case streetWidth(1) > 0 && streetWidth(1) > 0 : building
 case streetWidth(1) > 0 && streetWidth(2) > 0 : building
 case streetWidth(1) > 0 && streetWidth(3) > 0 : building
 case streetWidth(2) > 0 && streetWidth(1) > 0 : building
 case streetWidth(2) > 0 && streetWidth(2) > 0 : building
 case streetWidth(2) > 0 && streetWidth(3) > 0 : building
 case streetWidth(3) > 0 && streetWidth(1) > 0 : building
 case streetWidth(3) > 0 && streetWidth(2) > 0 : building
 case streetWidth(3) > 0 && streetWidth(3) > 0 : building
 else : nil

building-->
 offset(-2, inside)
 extrude(rand(3,15))

Outcomes