4 Replies Latest reply on Mar 5, 2012 10:41 AM by MBuehler-esristaff

    Need Basic Tutorial to set up a project, import openstreetmaps and insert a building

    dkinthehouse
      I'm quite new to CityEngine.  I found some videos but they are only so helpful.  They go very fast. 

      All I want to do is to set up a new CityEngine project properly, import a section of a map from openstreetmaps and then insert a new building within that section.  Do you know of any tutorials that take you through this process step by step?
        • Re: Need Basic Tutorial to set up a project, import openstreetmaps and insert a build
          MBuehler-esristaff
          hi !

          the tutorials are a little out of date, sorry for that .. :(


          resource center ( all work in progress. check out the new tutorials under the /gallery/ ! ):
          http://resources.arcgis.com/content/cityengine/about


          short osm tutorial :

          1]
          on osm site, draw rectangle
          2]
          export .osm file to desktop
          3]
          with SAME extent, export map picture file to desktop
          4]
          go in CE: file > new > CityEngine > CityEngine project > name it, create.
          5]
          go to desktop, copy (ctrl-c) both files (osm & map file)
          6]
          go to CE, select data folder of new project, paste files in there.
          7]
          RMB-click on scenes folder, new CE scene.
          8]
          drag and drop .osm file into viewport, this starts the import, click through the settings (clean the graphs !)
          9]
          select all objects and set shapeCreation to true for all object types (blocks, streets, nodes) in Inspector. by default, shapes are not created because the osm data (same with shape files !) may contain bad data, thus this is a protection mechanism.
          10]
          the picture file is NOT geolocated (has no .prj file or similar), thus we have to place it manually.
          11]
          drag-n-drop the file also into the viewport. create a terrain via the pop-up window.
          12]
          use the 'w' and 'e' keys to place/scale the terrain so it fits the osm data. (use the 'x','y','z' keys to orient the camera, use the 'p' key to toggle between a persp/ortho cam)
          13]
          note : the CE can not reproject raster files on import based to match a target scene coordinate system, thus, this picture file will not match 100% perfectly.
          14]
          RMB-click on the rule folder in your project : create new CGA rule file
          15]
          copy this code into the file :

          LotInner -->
              Lot
          Lot -->
              extrude(rand(20,30))
              color( rand(1), rand(1), rand(1) )

          16]
          save the rule file.
          17]
          select 1 Lot shape and 1 LotInner shape from a Block (so 2 shapes are selected, using shift key)
          18]
          RMB-click into the viewport and Select > Select with same Start Rule (all Lots & LotInners are selected)
          19]
          drag and drop the cga rule file from the rule folder onto one of the selected shapes.
          20]
          have fun !



          yay ! ;)
          • Re: Need Basic Tutorial to set up a project, import openstreetmaps and insert a build
            dkinthehouse
            Great, thanks for the reply.  I'll try out what you posted and let you know if I have further questions.


            Dave
            • Re: Need Basic Tutorial to set up a project, import openstreetmaps and insert a build
              dkinthehouse
              Another quick question.  From osm, which picture type should I download and drag into the viewport?  .jpg or .png didn't seem to work.  Thanks, Dave
              • Re: Need Basic Tutorial to set up a project, import openstreetmaps and insert a build
                MBuehler-esristaff
                hi !

                afaik, the exported file type which is exported drom osm.org is always png.

                thus, this should work. maybe you're nor displaying maps (toggle F9) ?

                after drag n dropping the file into the viewport, is a map layer created ?