<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic CityEngine: creating multiple medians in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522362#M7096</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&amp;nbsp; Any advice on how to go about it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Changes to street_construction.cga&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;attr Median_Right = false &lt;/P&gt;
&lt;P&gt;attr Median_Left = fase &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;medianWidthAdjusted = case oneWayStreet: 0 else : Median_width &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;medianWidthAdjustedRight = medianWidthAdjusted(0) &lt;/P&gt;
&lt;P&gt;medianWidthAdjustedLeft = medianWidthAdjusted(2) &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;medianWidthAdjusted(dir) = case (dir == 0 &amp;amp;&amp;amp; Median_Right) || (dir == 2 &amp;amp;&amp;amp; Median_Left) : Median_width&amp;nbsp; else : 0 &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;availableForLanesRound1 = streetWidth - parkingLaneWidth(0) - parkingLaneWidth(2) - bikeLaneWidth(0) - bikeLaneWidth(2) - medianWidthAdjusted(0) - medianWidthAdjusted(2)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;StreetsidesStep3 --&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; case Protected_Bike_Lanes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; split(v,unitSpace,0) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; bikeLaneWidthRight : BikeLane(0) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; parkingLaneWidthRight : Parking(0) | &lt;/P&gt;
&lt;P&gt;&amp;nbsp; medianWidthAdjusted : Median(0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; laneCountRight * laneWidthAdjusted : Lanes(0) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; laneCountLeft * laneWidthAdjusted : Lanes(2) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; medianWidthAdjusted : Median(2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; parkingLaneWidthLeft : Parking(2) | &lt;/P&gt;
&lt;P&gt;&amp;nbsp; bikeLaneWidthLeft : BikeLane(2) } &lt;/P&gt;
&lt;P&gt;&amp;nbsp; else:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; split(v,unitSpace,0) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; parkingLaneWidthRight : Parking(0) | &lt;/P&gt;
&lt;P&gt;&amp;nbsp; bikeLaneWidthRight : BikeLane(0) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; medianWidthAdjusted : Median(0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; laneCountRight * laneWidthAdjusted : Lanes(0) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; laneCountLeft * laneWidthAdjusted : Lanes(2) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; medianWidthAdjusted : Median(2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; bikeLaneWidthLeft : BikeLane(2) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; parkingLaneWidthLeft : Parking(2) }&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 Nov 2014 19:11:46 GMT</pubDate>
    <dc:creator>BrendanHarmon</dc:creator>
    <dc:date>2014-11-01T19:11:46Z</dc:date>
    <item>
      <title>CityEngine: creating multiple medians</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522362#M7096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&amp;nbsp; Any advice on how to go about it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Changes to street_construction.cga&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;attr Median_Right = false &lt;/P&gt;
&lt;P&gt;attr Median_Left = fase &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;medianWidthAdjusted = case oneWayStreet: 0 else : Median_width &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;medianWidthAdjustedRight = medianWidthAdjusted(0) &lt;/P&gt;
&lt;P&gt;medianWidthAdjustedLeft = medianWidthAdjusted(2) &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;medianWidthAdjusted(dir) = case (dir == 0 &amp;amp;&amp;amp; Median_Right) || (dir == 2 &amp;amp;&amp;amp; Median_Left) : Median_width&amp;nbsp; else : 0 &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;availableForLanesRound1 = streetWidth - parkingLaneWidth(0) - parkingLaneWidth(2) - bikeLaneWidth(0) - bikeLaneWidth(2) - medianWidthAdjusted(0) - medianWidthAdjusted(2)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;StreetsidesStep3 --&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; case Protected_Bike_Lanes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; split(v,unitSpace,0) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; bikeLaneWidthRight : BikeLane(0) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; parkingLaneWidthRight : Parking(0) | &lt;/P&gt;
&lt;P&gt;&amp;nbsp; medianWidthAdjusted : Median(0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; laneCountRight * laneWidthAdjusted : Lanes(0) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; laneCountLeft * laneWidthAdjusted : Lanes(2) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; medianWidthAdjusted : Median(2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; parkingLaneWidthLeft : Parking(2) | &lt;/P&gt;
&lt;P&gt;&amp;nbsp; bikeLaneWidthLeft : BikeLane(2) } &lt;/P&gt;
&lt;P&gt;&amp;nbsp; else:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; split(v,unitSpace,0) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; parkingLaneWidthRight : Parking(0) | &lt;/P&gt;
&lt;P&gt;&amp;nbsp; bikeLaneWidthRight : BikeLane(0) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; medianWidthAdjusted : Median(0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; laneCountRight * laneWidthAdjusted : Lanes(0) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; laneCountLeft * laneWidthAdjusted : Lanes(2) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; medianWidthAdjusted : Median(2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; bikeLaneWidthLeft : BikeLane(2) |&lt;/P&gt;
&lt;P&gt;&amp;nbsp; parkingLaneWidthLeft : Parking(2) }&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Nov 2014 19:11:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522362#M7096</guid>
      <dc:creator>BrendanHarmon</dc:creator>
      <dc:date>2014-11-01T19:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine: creating multiple medians</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522363#M7097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know the rules by heart, so I cannot comment on the changes ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest is to stop the rule execution step by step to see what each line of code does, with a '.' (dot) at the right points. when you have found the rule that cuts up the street shape, add your additional split code in there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that's what you try .. what's not working ? something specific ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN lang="EN-US"&gt;Matthias Buehler&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US"&gt;Head of 3D Technologies&lt;/SPAN&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999999; font-size: 10pt;"&gt;&lt;SPAN lang="EN-US"&gt;twitter: @MattB3D&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US"&gt;---------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US"&gt;Garsdale Design Limited &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:matthias.buehler@garsdaledesign.co.uk" target="_blank"&gt;matthias.buehler@garsdaledesign.co.uk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.garsdaledesign.co.uk/" target="_blank"&gt;www.garsdaledesign.co.uk&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 09:09:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522363#M7097</guid>
      <dc:creator>MatthiasBuehler</dc:creator>
      <dc:date>2014-11-03T09:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine: creating multiple medians</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522364#M7098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are in the right part of the code. The rule "&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;StreetsidesStep3" has two cases. One where the bike lane is protected by the parking, and the other where bike lanes swap with parking. In both cases, the whole road is being split into right and left lanes, parking, median, and bike lanes. The parameters (0) and (2) tell which side of the street you are on. So you could add more cases here, or just rearrange these cases. In any case, that rule is the place to do it. Does this make sense? If not, I can elaborate.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Chris&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 14:16:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522364#M7098</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-11-03T14:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine: creating multiple medians</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522365#M7099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, the lane widths seen in each case all add up to the available space. There are not any approximate operators (~). This doesn't mean you can't use them. But it makes it easier to debug if the math double checks itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 14:19:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522365#M7099</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-11-03T14:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine: creating multiple medians</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522366#M7100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the advice - I should set break points and step through as if debugging. That'll be a much better way of understanding the code than just trying to read it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 21:42:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522366#M7100</guid>
      <dc:creator>BrendanHarmon</dc:creator>
      <dc:date>2014-11-03T21:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine: creating multiple medians</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522367#M7101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&amp;nbsp; That makes sense.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 21:46:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522367#M7101</guid>
      <dc:creator>BrendanHarmon</dc:creator>
      <dc:date>2014-11-03T21:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine: creating multiple medians</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522368#M7102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, I have a related question. I'd like to be able to set the streetWidth by style, but I can't seem to change the streetWidth from the value set in segments's Street Parameters. Using the Redlands Redevelopment's Street Construction rule,&amp;nbsp; I tried this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Removed:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;@Hidden&lt;/P&gt;
&lt;P&gt;attr streetWidth = 0&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Added:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;@Group("ROAD LAYOUT")&lt;/P&gt;
&lt;P&gt;@Order(0) @Range(3,64)&lt;/P&gt;
&lt;P&gt;attr styleStreetWidth = 0&lt;/P&gt;
&lt;P&gt;streetWidth = styleStreetWidth&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;amp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;style Residential_Road&lt;/P&gt;
&lt;P&gt;attr styleStreetWidth = 14&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I applied the rule and style to a street segment, the width remained 7.&amp;nbsp; How can I change this with a style?&amp;nbsp; Can I override the shape parameters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried to directly set the streetWidth to a value and it still didn't work:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;attr streetWidth = 14&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2014 16:31:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-creating-multiple-medians/m-p/522368#M7102</guid>
      <dc:creator>BrendanHarmon</dc:creator>
      <dc:date>2014-11-07T16:31:25Z</dc:date>
    </item>
  </channel>
</rss>

