Log in

No account? Create an account

OpenWebGIS is online Geographic Information System

Previous Entry Share Next Entry
Creating a 3D city model in OpenWebGIS (Extruding 2D polygons to 3D)
In OpenWebGIS the newly created module for displaying the data on a 3D map (Globe of the Earth) continues developing. This module can be used for more and more interesting geotasks. Now on the 3d map you can display not only the planar data as described in this article about OpenWebGIS, but also the data about objects having height or you can use as the height any numeric attribute for a more demonstrative data in the three-dimensional space.

In order to show how to do this we will create the 3D model of the city. The initial data will be Building roofprints from 2006 of the City of Berkeley. The data is taken from here http://www.ci.berkeley.ca.us/datacatalog/. To speed up the process of creating a data map and visualisation facilities only a small portion of the city's buildings in the center was taken. The shapefile with this data was uploaded to the server of OpenWebGIS in WGS84 coordinate system.

In order to see the part of the City of Berkeley in 3D, follow the instructions:

1.Click on the menu item “Layers-> Add Layer”.

2. In the appeared pop-up window, select the layer name "berkley" and click "OK".
3. To the left of the map in the list of layers there will be the name of a new layer - click on the checkbox next to it in order to activate the layer. Since we will continue working with this layer then select its name in the list “Editable Layer”.
4. After the layer name "berkley" is selected in the list “Editable Layer”, click on the menu item “Layers-> Zoom to Layer” and you will see the part of the city in the form shown in the figure below.
Orange color paints areas of buildings – these are vector polygons that we will show in the 3D view using the height attribute.

5. The values of all attributes of each building you can see by hovering the cursor over it and clicking on it (if while hovering over a polygon, it is not activated, then move the map a little bit and then again hover the cursor).
6. For clarity, you can change base layers.
7. Change the layer legend in order to visually divide low, middle-sized, high buildings. To do this, use the attribute layer "PrSizeH" - height of the object bounding cube, in map projection units. The information about all the attributes can be found here: http://www.ci.berkeley.ca.us/uploadedFiles/IT/GIS/Roofprints_2006.shp.xml
In order to change the legend you need to click on the word “legend” under the name of the layer. You will then see the legend area on which you need to click to open the window of legends layer settings.

8. Set 3 levels of height values for the attribute “PrSizeH” as shown in the figure below. This is just an example and you can set any other values. In our case, the blue color will display the buildings with the heights from 0 to 30, green - from 30 to 70 and the red from 70 to 112 meters.

Ready map you can get from this link: http://opengis.dlinkddns.com/gis/opengis_eng.html?openwebgis=kLr7DResRBiWK4FInq5k3Xh5. Wait for a while untill map appear.
8. After changing the layer legend it will look as shown in the figure below.

9. Let us now construct the 3D model of the city. To do this, click on the button 3d_off"Add 3d Map. Globe" on the top of the map. Settings window for constructing 3D maps will appear. Deactivate those layers that you do not want to see on the 3D map (in this case, Rivers and Cities) and click the checkbox "additional options for 3d (add height)" to set the parameters for the construction of a vector layer attribute height on the 3D map. Please look carefully at the figure below to understand the process settings. These parameters are taken into account only when there is a tick in front of "additional options for 3d (add height)".
10. After setting the 3D map parametres and clicking Ok, the 3D map window will open, in which the default base layer is “OpenStreetMap”. We choose as a base layer map “Bing Maps Aerial” and get the view as shown in the figure below.
Zoom the map using Right click + drag, or Mouse wheel scroll.
11. Change the view from 3D to 2.5D by clicking on the corresponding button and you will get the views shown below.