{"id":491,"date":"2012-03-01T14:11:31","date_gmt":"2012-03-01T14:11:31","guid":{"rendered":"http:\/\/www.geoplanit.co.uk\/?p=491"},"modified":"2012-03-01T14:17:23","modified_gmt":"2012-03-01T14:17:23","slug":"creating-a-city-from-gis-data-transport-infrastructure-1","status":"publish","type":"post","link":"https:\/\/www.geoplanit.co.uk\/?p=491","title":{"rendered":"Creating a City from GIS data &#8211; Transport Infrastructure &#8211; Part 1"},"content":{"rendered":"<p><strong><a href=\"https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/03\/ce_transport_infrastructure1.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-498 alignright\" title=\"Transport Infrastructure\" src=\"https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/03\/ce_transport_infrastructure1.jpg?resize=276%2C205\" alt=\"\" width=\"276\" height=\"205\" \/><\/a><a href=\"http:\/\/forums.arcgis.com\/threads\/51652-Creating-a-City-from-GIS-data-Transport-Infrastructure\" target=\"_blank\">This is duplicate post of a discussion I started on ESRI&#8217;s CityEngine support forum<\/a><\/strong><\/p>\n<p>I thought I&#8217;d start a thread for people wishing to make simple City Models based in part, on real world data in ArcGIS. Hopefully it will help in the creation of quite a complex city model that people can modify for their own purposes. It&#8217;s intended to be a simple discussion that anyone can join in with so feel free to add to it! This will assume a basic working knowledge of CityEngine, for example import\/export of data as well as tools like &#8216;CleanUp&#8217; graph.<\/p>\n<p>NB : I am not a programmer and my knowledge is limited in many areas of CityEngine so if you spot mistakes or can suggest betters ways of doing something, please tell me!<\/p>\n<p>As you can link CGA rules together and add to the complexity I thought it would be helpful to break the various components down. Firstly I&#8217;m a planner mainly working on Master Planning projects so this is from my perspective, I would welcome other people&#8217;s perspectives though!<\/p>\n<p>The city model I want to create already has a few distinct data sets, they can be simply characterised as:<\/p>\n<ul>\n<li>Existing data, shapefiles\/GDBs (polylines, and polygons) of the existing city which are quite detailed<\/li>\n<li>New data, GDBS (again polylines, and polygons) of the proposals\/planned expansion which as a master plan are more general (No internal local streets yet) which I have created<\/li>\n<\/ul>\n<p>Now to break it down further, I want to control and model in CityEngine the general headings below:<\/p>\n<ol>\n<li><strong>Transport Infrastructure<\/strong>\u00a0(mainly roads, but some rail and other types, such as covered market street)<\/li>\n<li><strong>LandUse\u00a0<\/strong>(I put it at the top because,it&#8217;s what I do)<\/li>\n<li><strong>Plotsizes\u00a0<\/strong>(Blocks on or off, Lot sizes, lot minimum width etc..)<\/li>\n<li><strong>Models<\/strong>, initially simple block models that we can add detail to based on Landuse, plotsizes etc..<\/li>\n<\/ol>\n<p>So I&#8217;m proposing that we aim to create a set of CGA rules that are easy to understand and create a basic city model from which we can add more complexity to. I really want to build code that can be flexible, often there are a couple of ways to do rules in CityEngine but I propose we don&#8217;t always do the simple route, that way people can build in complexity. I&#8217;m also assuming that we start with all the base data we need.<\/p>\n<p>I suggest we start with a discussion of\u00a0<strong>Transport Infrastructure\u00a0<\/strong>since these allow blocks to be created. I&#8217;ve looked at the rule files in the tutorials in particular the Modern streets CGA. However as we&#8217;re building on existing data I think we need to start with what fields in the polyline data from the GIS we might want to use:<\/p>\n<ol>\n<li>Right of Way (ROW) width<\/li>\n<li>Number of Lanes<\/li>\n<li>Direction (one way, two way and actual direction)<\/li>\n<li>Pavement (sidewalk in the USA!) Left<\/li>\n<li>Pavement (sidewalk in the USA!) Right<\/li>\n<li>Surface (asphalt, unmade etc..)<\/li>\n<li>Class (Motorway\/Highway\/Main\/Secondary\/Distributor\/Access\/Track)<\/li>\n<li>Central reservation<\/li>\n<li>Bridge?<\/li>\n<\/ol>\n<p><em><strong>Any other fields we might want to use in CityEngine, any suggestions?<\/strong><br \/>\n<\/em><br \/>\nSo the best way of controlling how CityEngine draws the correct width of your streetnetwork is via the &#8220;layer attributes&#8221; window once you&#8217;ve selected the imported Streetnetwork data in the Scene window. CityEngine helpfully already does some of this automatically but it doesn&#8217;t hurt to repeat it!<\/p>\n<p>I&#8217;ve modified the code to show you can change the road width based on a text field not just a number :<\/p>\n<p>&nbsp;<\/p>\n<pre>streetscale = 1  \/\/ street width scale factorstreetWidthDefault = 5\r\nwidth            = getObjectAttr(\"rdClass\")\/\/ Instead of reading a number this reads the type of road eg motorway or local street I use prefix rd to indicate where it is located\r\nattr streetWidth = \/\/ street width dependeding on \"width\" attributes\r\n    case width == \"Primary\" : 55 * streetscale\r\n    case width == \"Secondary\" : 30 * streetscale\r\n    case width == \"Tertiary\" : 20 * streetscale\r\n    case width == \"Footpath\" : 2.5 * streetscale\r\n    case width == \"\" :0 *streetscale \/\/ if there is no class attribute then the width is zero\r\n    else           : streetWidthDefault<\/pre>\n<p><strong>So can anyone add anything more to this, thoughts about the process or additional ways to set road widths?<\/strong><\/p>\n<p>Next post will be creating a CGA rule file that models a road based on the object attributes such as surface and class&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is duplicate post of a discussion I started on ESRI&#8217;s CityEngine support forum I thought I&#8217;d start a thread for people wishing to make simple City Models based in part, on real world data in ArcGIS. Hopefully it will help in the creation of quite a complex city model that people can modify for [&hellip;]<\/p>\n","protected":false},"author":161,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,116,145,7,54,9],"tags":[],"class_list":{"0":"post-491","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-arcgis","7":"category-city-creation","8":"category-cityengine","9":"category-gis","10":"category-tips","11":"category-workflow"},"_links":{"self":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/users\/161"}],"replies":[{"embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=491"}],"version-history":[{"count":4,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/491\/revisions"}],"predecessor-version":[{"id":500,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/491\/revisions\/500"}],"wp:attachment":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}