# create left and right side of the street (per default same nbr of lanes in both directions, but user can influence it via attributes) Streetsides --> case calcNbrOfLanes < 1.1 : Asphalt case Nbr_of_left_lanes == 0 && Nbr_of_right_lanes == 0: split(v,unitSpace,0){ ~calcLanesLeft : Lanes(calcNbrOfLanes,connectionEnd,0) Vehicles(0) | Median_width : Median | ~calcLanesRight : scaleUV(0,-1,-1) Lanes(calcNbrOfLanes,connectionStart,2) Vehicles(2) } else: split(v,unitSpace,0){ ~Nbr_of_left_lanes : Lanes(Nbr_of_left_lanes,connectionEnd,0) Vehicles(0) | Median_width : Median | ~Nbr_of_right_lanes : scaleUV(0,-1,-1) Lanes(Nbr_of_right_lanes,connectionStart,2) Vehicles(2) }
Hi !You have only 1 textured lane but 2 lanes of cars, it that right ?Let me know..Matt
First ..What controls do you need ?What elements you want to have on your streets ?Number of Left Lanes / Right Lanes ?Median on/off ?..
## Attributes attr Lanes_Left = 2 attr Lanes_Right = 2 attr Lane_Width = 3.5 attr Shoulder_Width = 3 attr Median_Width = 1.5
attr doMedian = true
case doMedian : .. else : ..
attr Lanes_Left = 2 attr Lanes_Right = 2
and note :the 'Model' is created based on the 'Shape'.So a street graph defined the width of the total street shape. So since the total width is already give plus using the fact that 1 lane is about 3 meters wide, n lanes can actually be created.e.g. a 9 meter wide shape can produce 3 lanes.so that can be 1 left lane and 2 right lanes. But since the total width of the street is given and thus drives the total number of lanes, it makes 'no sense' to defineattr Lanes_Left = 2 attr Lanes_Right = 2makes sense ?the laneOffset I have in my code then defines the offset :e.g. if 5 lanes can be produced, 2 left and 3 right can be produced. an offset of 1 makes 1 left and 4 right lanes.makes sense too ?m.
attr width_1 = 5 Street1 --> split(v,unitSpace,0){width_1 : Red | ~1 : Green} attr myLaneWidth = 3 Street2 --> split(v,unitSpace,0){width_1 : Red | ~1 : RestShape} RestShape --> split(v,unitSpace,0){~myLaneWidth : Green }* attr medianWidth = 1 Street3 --> split(v,unitSpace,0){~1 : MultiLane | medianWidth : Green | ~1 : MultiLane} MultiLane --> split(v,unitSpace,0){~myLaneWidth : Red }* Red --> color(1,0,0) Green --> color(0,1,
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.