<?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 Re: Use the OSM Attributes in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685180#M9015</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried it again, it works without problems, my thinking was wrong, I thought I have to select the attributes in editor. Sorry for the confusion. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How to define a attribute is clear, I also have checked the tutorials &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; they helped me a lot, not only with this problem. The problem is that I cannot make a string "rand (20,50)"...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The answer for the ":" problem is enough, thank you, I don´t have much Python scripting experience, but that´s my problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I only want to know how it works, now I can try.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for your time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2013 12:46:41 GMT</pubDate>
    <dc:creator>DanielS</dc:creator>
    <dc:date>2013-02-28T12:46:41Z</dc:date>
    <item>
      <title>Use the OSM Attributes</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685171#M9006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to use the imported OSM Attributes? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I make a Rule with the Attribute height (attr height = rand(10,50)) the building is shown in this height(s). Everything is fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But I like to use the attributes from the OSM-data if available. Because of this the attribute have the same name like the Attribute in the ???Object Attributes???. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to connect it with the ???Attribute Connection Editor??? but the selection for ???Object attribute??? is grey, cannot be selected???&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]22169[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What can I do?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 11:12:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685171#M9006</guid>
      <dc:creator>DanielS</dc:creator>
      <dc:date>2013-02-26T11:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Use the OSM Attributes</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685172#M9007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems there is no attribute with the specific name 'height'.. Can that be ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check the object attributes of the shapes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note also that the data type may be wrong. E.g. the height value may be stored as string instead of a float value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check my tutorial videos 4 and 5 here concerning more OSM inputs :&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/64843-CityEngine-Collection-RESOURCES-FAQ-HELP"&gt;http://forums.arcgis.com/threads/64843-CityEngine-Collection-RESOURCES-FAQ-HELP&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if you need more info.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 14:47:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685172#M9007</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-02-26T14:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Use the OSM Attributes</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685173#M9008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for your answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As written is the name of the attribute in the rule and the name of the object attribute the same (this is the only reason why I named it �??height�?� :)).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]22183[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As I imported the OSM-File I selected only the buildings so the data type should be correct?! What can I do?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another question: What about object attributes like roof:shape?! I think �??:�?� doesn´t work as attribute name?!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help again&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 18:13:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685173#M9008</guid>
      <dc:creator>DanielS</dc:creator>
      <dc:date>2013-02-26T18:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Use the OSM Attributes</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685174#M9009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ha, ok, gotcha. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you post the osm file ? I could try and have a look myself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 06:46:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685174#M9009</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-02-27T06:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use the OSM Attributes</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685175#M9010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here is the file, hope it works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]22207[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried it with the building in the north (MVV, has the attribute height in it). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope you find my mistake.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 08:35:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685175#M9010</guid>
      <dc:creator>DanielS</dc:creator>
      <dc:date>2013-02-27T08:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Use the OSM Attributes</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685176#M9011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Seems indeed that the height is stored as a string. In this case, use :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;attr height = "" # initialize as string

Lot --&amp;gt;
 extrude(float(height))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:49:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685176#M9011</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2021-12-12T04:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Use the OSM Attributes</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685177#M9012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thank you very much, it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I can select the object attribute in the attribute connection editor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the buildings without the attribute height (from the OSM data) take the height from the rule as object attribute. Hope it is clear what I mean.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]22248[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And how can I use random heights for the buildings now? What about the attribute roof:shape?! How can I use it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know, a lot of questions, hope you (or someone else) can help me again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 09:03:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685177#M9012</guid>
      <dc:creator>DanielS</dc:creator>
      <dc:date>2013-02-28T09:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Use the OSM Attributes</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685178#M9013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you assign a rule to a shape, CE checks if there is are object attributes for each initialized attr in the rule. If so, we assume that you want to use that value since you have imported that data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Initializing an attr can be done with&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;attr myAttr = 0, with a value of 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;attr myAttr = rand(20,50), a random value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check that for the cases where you HAVE an object attr called 'height', CE connected the 'ATTRIBUTE SOURCE' to the object attr. So it says in the Inspector : &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;height : 10.3 (Object). The thing in the brackets is where the source of that attr value is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If there is NO object attr of that name you see there's written (Rule), because here is no imported attribute data, so the second guess is that you want to use the rule's initialized value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the Connection Editor, you can choose that source of course.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the answer is above. Just use a function or a random value or a mapped value. Up to you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you check the tutorial videos ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/64843-CityEngine-Collection-RESOURCES-FAQ-HELP"&gt;http://forums.arcgis.com/threads/64843-CityEngine-Collection-RESOURCES-FAQ-HELP&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ah, sorry. Forgot to check the aaa:bbb case. Will do that now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;M.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 11:35:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685178#M9013</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-02-28T11:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Use the OSM Attributes</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685179#M9014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CGA does not allow attr names with ':' or such characters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'd need to preprocess your OSM data first (in CityEngine) by using Python to replace all those characters to something more useful like '_', which is supported in CGA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This can cause name clashes which you need to deal with.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have some Python scripting / other scripting experience ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;M.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 11:58:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685179#M9014</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-02-28T11:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Use the OSM Attributes</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685180#M9015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried it again, it works without problems, my thinking was wrong, I thought I have to select the attributes in editor. Sorry for the confusion. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How to define a attribute is clear, I also have checked the tutorials &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; they helped me a lot, not only with this problem. The problem is that I cannot make a string "rand (20,50)"...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The answer for the ":" problem is enough, thank you, I don´t have much Python scripting experience, but that´s my problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I only want to know how it works, now I can try.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for your time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 12:46:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685180#M9015</guid>
      <dc:creator>DanielS</dc:creator>
      <dc:date>2013-02-28T12:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Use the OSM Attributes</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685181#M9016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You don't want to have those values to be strings. You NEED floats to be floats for e.g. the extrude.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you'd use something like ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;attr height = ""&amp;nbsp; heightFunction = &amp;nbsp;&amp;nbsp;&amp;nbsp; case height == "" : rand(30, 50) &amp;nbsp;&amp;nbsp;&amp;nbsp; else : float(height)&amp;nbsp; Lot --&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; extrude(heightFunction)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;or similar.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 13:07:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685181#M9016</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-02-28T13:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use the OSM Attributes</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685182#M9017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nice, nice, nice. That´s it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You solved my problems. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 13:19:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/use-the-osm-attributes/m-p/685182#M9017</guid>
      <dc:creator>DanielS</dc:creator>
      <dc:date>2013-02-28T13:19:44Z</dc:date>
    </item>
  </channel>
</rss>

