AnsweredAssumed Answered

CityEngine: creating multiple medians

Question asked by brendan_harmon on Nov 1, 2014
Latest reply on Nov 7, 2014 by brendan_harmon

Hi, I would like some advice on creating multiple medians. I'm working with the Redlands Redevelopment 2014 street_construction rule. I'd like to be able to create extra medians between the bike lanes and the street lanes for example.  Any advice on how to go about it?

 

Changes to street_construction.cga

 

attr Median_Right = false

attr Median_Left = fase

 

 

medianWidthAdjusted = case oneWayStreet: 0 else : Median_width

 

 

medianWidthAdjustedRight = medianWidthAdjusted(0)

medianWidthAdjustedLeft = medianWidthAdjusted(2)

 

 

medianWidthAdjusted(dir) = case (dir == 0 && Median_Right) || (dir == 2 && Median_Left) : Median_width  else : 0

 

 

availableForLanesRound1 = streetWidth - parkingLaneWidth(0) - parkingLaneWidth(2) - bikeLaneWidth(0) - bikeLaneWidth(2) - medianWidthAdjusted(0) - medianWidthAdjusted(2)

 

 

StreetsidesStep3 -->

  case Protected_Bike_Lanes:

  split(v,unitSpace,0) {

  bikeLaneWidthRight : BikeLane(0) |

  parkingLaneWidthRight : Parking(0) |

  medianWidthAdjusted : Median(0)

  laneCountRight * laneWidthAdjusted : Lanes(0) |

  laneCountLeft * laneWidthAdjusted : Lanes(2) |

  medianWidthAdjusted : Median(2)

  parkingLaneWidthLeft : Parking(2) |

  bikeLaneWidthLeft : BikeLane(2) }

  else:

  split(v,unitSpace,0) {

  parkingLaneWidthRight : Parking(0) |

  bikeLaneWidthRight : BikeLane(0) |

  medianWidthAdjusted : Median(0)

  laneCountRight * laneWidthAdjusted : Lanes(0) |

  laneCountLeft * laneWidthAdjusted : Lanes(2) |

  medianWidthAdjusted : Median(2)

  bikeLaneWidthLeft : BikeLane(2) |

  parkingLaneWidthLeft : Parking(2) }

Outcomes