Three-Dimensional Modelling of Spatial Data in Urban Territory

The content of the research is divided into four points. The first part considers the need of 3D models creation - good practices applied in different countries related to Internet services for urban development and planning, preservation of cultural heritage, as well as scientific research. The second part focuses on the nature of 3D modeling, addressing theoretical issues concerning conceptual modeling, classification of three-dimensional models, geometry and topology. Different data formats are described. The third part focuses on an overview of the different 3D data sources and 3D modeling methods. The fourth part includes the description of a specific software for creating, editing and presenting 3D models - City Engine. The functionality, the specific possibilities for additional analysis and extraction of attribute information from the created models are described, as well as the programming language used in creating three-dimensional models in the software environment. In the fourth part, practical tasks are performed, which aim to make a comparison between the actual state of construction with the set project values in the general development plan for Sofia Municipality. 3D models of buildings in a neighbourhood in the Lozenets region were created, after which an additional analysis of the current state of construction was performed. The possibilities of the software for automatic generation of a street network are considered, as well as the functionality related to the modeling of facades.


Introduction
3D modeling is the process of creating an accurate mathematical representation of any three-dimensional object using specialized software. The resulting product is called a 3D model. 3D models are a physical object using a collection of dots in three-dimensional space connected to each other by different geometric formations such as triangles, lines, curved surfaces, etc. Surfaces can be further defined by mapping textures. The development of information technology and the level of technological progress make it possible to create and use 3D models in different areas of human knowledge. 3D models are widely used throughout 3D graphics and CAD systems. Some of the many areas in which they are used are the medical industry, the film industry, the scientific sector, the architectural and engineering industries [1][2] [3]. 3D modeling is often applied in the field of GIS, cadastre, design of engineering facilities and other applications, especially in recent years.
Advantages that 3D models possess are as follows [4]: • Project visuality and realistic-looking design -with the help of the resulting models, it is possible to create more accurate and precise projects. • Ability to analyze -the use of three-dimensional models allows more detailed and accurate analyses to be carried out in significantly less time than two-dimensional ones. Easy and effective adjustment of the model -in 3D modeling, it is easy to track the effects that are caused by various changes in the model itself, as well as to monitor their impact on the overall model. Consideration of different options and scenarios greatly facilitates the finalization of the project, avoiding the problem of further adjustments after its completion. This makes 3D models more cost-effective. Inaccurate drawings can cost valuable time and money, as in most cases design flaws are evident during the production phase, which necessitating the revision of the design phase again. 3D models avoid this problem, reducing costs and increasing project accuracy.
• Facilitate communication -they are accessible and understandable by any audience.
• Universal application -3D models can represent any product or service, can be used as an illustration of the product, or to present manufacturing technology in any industry, including those industries that have no direct contact with 3D design.

Visualization of spatial data
Each point of the 3D model is presented as a precisely defined space location measured by X, Y and Z. Taken together, the axes {X, Y, Z} form the coordinates of the point. All spatial data has a coordinate system designed to locate data in two-or three-dimensional space. The data coordinate system is also particularly important when combining spatial data with different sources. The two types of coordinate systems used in geoinformation systems can be divided into two categories depending on whether they are reference to the Earth's surface. Reference coordinate systems, commonly referred to as geographical coordinate systems (GCS), are used to determine points from the earth's surface using a threedimensional spherical surface, starting with the system in the center of the Earth. Each point is determined unambiguously by the longitude and latitude values.: Angular units of measurement used reference spheroid, as well as its connection to the earth's surface, as well as a basic meridian. The OpenGIS specification and POSC Epicenter Model V 2.1 define a common set of basic principles that apply in geoinformation systems.

Spatial data collection tools
Operations and analyses using geospatial information include the processes for collecting, visualizing and manipulating different types of images, GPS data, satellite photography and historical information of a urban territory. There are various tools that can help with the use of geographic data in different studies. Below is a set of the most common used tools related to the collection and distribution of spatial data.
• Data obtained from geodetic measurements • Data obtained using photogrametric methods • Remote sensing data • Data from cartographic sources • Volunteered Geographic Information (VGI)

Software for creating and presenting 3D models
CityEngine is advanced software designed for 3D modeling and creating interactive urban environments in less time than traditional modeling techniques. It was developed by Pascal Müller, co-founder and CEO of Procedural Inc. During his doctoral research at the ETH Computer Vision Lab, Mueller devised several techniques for procedurally modeling 3D architectural content that form the basis of CityEngine. The grammar used in the City Engine environment is called Computer Generated Architecture (CGA) and is a unique programming language that is used to generate 3D content. CGA rules can be defined that iteratively refine design within CityEngine, creating great detail in user-modeled scenes. In CityEngine, building models are described by CGA rules. A CGA rule file consists of several rules that determine how the actual geometry of the building is created. Once the rule file is assigned to a form, it can begin generating the building model starting from that form. The process that takes place during the execution of a rule is illustrated in fig. 1, showing on the left the starting shape of the object, and on the right showing the obtained automatically generated model [5].

Figure 1. Application of CGA rule
This type of grammatical-based or "procedural" modeling is widely used but is mostly used in cases where many design iterations or a large number of objects that comply with certain standardized rules need to be created. Although time consuming in the beginning, the preparation of the set of rules allows much faster generation of models compared to the classic manual modeling. Unique objects (for example, buildings representing cultural landmarks) are best modeled by hand and usually do not require a procedural approach, as often none of the modeling tasks for this object can be automated.
Typically, the set of rules for building a simplified building model consists of the following components: • Build attributes • Property rule It marks the beginning of the actual creation of the building begins now. The first rule is called Lot.
• Building rule Usually in the initial stage of modeling the mass model can be divided on its facades by applying the component separation. This results in the shape of the front (usually the main front façade with an entrance), several side shapes such as facades and the shape of the roof.
After defining the rule for dividing the building in the way described above, the facades can be modeled. The typical work process for modeling facades is as follows: first, the facade can be decomposed into floors. Next, the floors are further broken down into elements called tiles (floor divisions). Tile usually consists of elements for walls and windows. This subdivision scheme can be applied to the grammar of the CGA format by following the following subdivision scheme: • Rule for the front facade of the building • Rule for side facades • Floor rule The floor rule is a typical example of dividing the floor into tiles of approximate width.
• Rule on the first floor The Groundfloor rule specifies the shape of the ground floor with a similar division of the subdivision, with the difference that the entrance to the building must be provided.
• Tile rule Once the original façade structure is defined, the tiles can be modeled. The tile rule determines the appearance of the tile by dividing it by the x-and y-axis. Again, a separate rule for the entrance plate should be provided.

• Rules for windows, doors and walls
The final rules replace the geometry of the shapes of the window, door and wall with the corresponding assets, position them and set the texture.
The textures to be used are also set in the rules file, specifying the ranges of the planes they cover. Textures are loaded from the asset folder. Separate rules are added for the roof, windows and doors.

Exploring the possibilities for visualization and analysis of spatial data
The purpose of the study is to compare the planed and actual build-up area of Lozenets region, Sofia. For this purpose, the following data were used: For the planned construction of Lozenets region, graphic and attribute data are used, respectively divided into Detailed Site Development Plan (DSDP) data (building plans) and Data from the Law on the Spatial Planning of Sofia city. The research area falls within the scope of the group of residential development zones, with predominantly medium-floor construction, for which the General Plan determines the following values. Data from the current cadastral map were used for the actual construction of Lozenets district. For this purpose, the cadastral and administrative information system was used. The source data are presented in Figure 2.

Preparing and importing data
The data is prepared in the QGIS environment. A common coordinate system is set -BGS 2005. Files with the .shp extension have been imported, one representing the design build and one representing the factual one. The attribute data table was also imported for each of the files. With its help, the start rule needed to generate 3D models was created.

Visual comparison of the design and actual construction for the whole region
A floor height set to 3.50 m was used in the created start rule. A height link has been created with the imported data, thus each building is elevated to the number of floors specified in the "floor" field of the attribute table multiplied by 3.5. For the Build layer, a white one is set, and a red color is set for the buildings layer for the display. Added additional attributes color, area, total built-up area, K int., density and green areas. The assigned start rule that was created is shown in Figure 3.  At the beginning of the rule, the assigned attributes are listed, which are subsequently visible with the Inspector menu. When selecting a specific entity, the corresponding attributes can be calculated or set by the user, depending on how they are defined in the rule. In this case, some of the attributes are related to the imported attributes from the attribute table. For example, the height is connected to the specified floors, and then automatically multiplied by the set floor height for the generation of buildings. Others are filled in, for example, the attribute "category", in accordance with the cadastral map, and the colouring of the buildings concerned according to zoning is provided. A start rule is also required to generate the model. In this case, it consists solely in raising the building to the height without modelling a façade. The following is a list of the values to be included in reports. The difference between the design and the actual construction is visualized by the models of the buildings being generated. The result obtained is shown in Figure 4.

Selection of a target neighborhood for additional analysis
Based on the comparison, a neighborhood was selected for which additional analyses should be performed, containing a comparison between the values of the building parameters. For this purpose, a neighborhood was selected, locked between Stoyan Zaimov Street, Krivolak Street, Krum Popov Street and Rozova Dolina Street, depicted in Figure 5, where there are significant differences between the planned and the actual construction.

Setting the design parameters of construction
To calculate the built-up area, a link is set to the "area" layer, indicating the area of the buildings. The developed built-up area is obtained by multiplying the intensity factor by the corresponding built-up area. To perform the analysis, additional attributes are set to the data -total area, PA, density, intensity factor. For the values of the building density and the maximum intensity the values from table are set. 1. After the description is done, a new rule file is created for both data layers, through which reports are generated. The "reports" command is used, and the file structure is shown.

Results
The performed comparison between the actual construction with its adjacent parameters with the set design values in the general development plan for Sofia Municipality shows a significant deviation. As a result, the created tables with numerical values of the building indicators were exported to a file with the extension .csv, which was subsequently processed in the middle of MS Excel. The resulting diagrams are attached in Appendix 1 and Appendix 2. It can be seen that only three of the eleven properties do not exceed the maximum allowable building parameters. The largest deviation from the planned indicators for a property with an identifier 901.126. The obtained results aim to demonstrate the applicability of 3D modeling in the creation of spatial models in urban territory that meet the needs of urban planning and effective decision-making related to urban conditions. The created end product confirms the capabilities of the geographic information systems to provide quality spatial planning, which provides an integrated database, powerful analytical capabilities, cartographic visualization, as well as modeling of the possible impact of various factors.

Research of the possibilities for automated modeling of the facade
The aim of the study is to examine the possibilities of the software for generating a model of a building facade using photographic material.

Data sources
To perform the task, photo photographs of the selected facade of a building located at 77 Krum Popov Street, with identifier 68134.901.740.1, were used.
The model itself, which was originally generated in the way described in item 2.2. is divided into its individual faces in order to separate the front from the side facades respectively. Subsequently, only the front façade is the object of interest.
The City Engine façade modeling module -Facade Wizard was used. It is a tool that allows the user to create complex CGA policy templates. The advantage is that you should not write an actual CGA code from the user, but it is automatically produced in the background by CityEngine. In this way, complex structures can be generated easily and efficiently. The loaded façade modeling window indicates the directory location of the selected photo to be used, and then additional settings are made. Since the façade photo used is tilted, none of the main lines are properly vertical or horizontal. For this reason, the Crop Image tool was used to create an orthogonal texture. After starting the cropping tool, it automatically analyses the image for perspective lines and tries to find a possible solution for the façade, which can also be corrected by the user until a satisfactory result is reached, which must be saved as a 8 new image to be used for modeling. After cutting and straightening the photo is proceeded to perform single and repeated divisions of the façade (the right half of Figures 6, 7).  Consecutive "cuts" of the facade were made along the x and y axes, so that it was divided into its constituent parts -first the floors were separated, then -the front door, windows and roof. For this purpose, the splits option is used, which separates the specific parts of the building from each other. Window height is set to 1.20 m. The separation points, which are absolute and those that are floating, must be specified correctly. This step is important because with its proper implementation it will be possible for the created facade rule to be adaptable to a model of a building of any size.
After the places of cutting are indicated, a volume of the initially flat facade is added. For this purpose, the places for which it is necessary to move along the z-window, entrance, etc. are determined (Fig. 6).
Once the facade modeling rule is completed, it is assigned to the respective building and the model is generated. The result is presented in figure 7.
The big advantage is that the created rule can be adapted to any given facade geometry. The number of windows as well as the floors are adapted to the dimensions of the facade.

Conclusions
Modern construction offers rich opportunities for managing the urban environment, which allows for a combination of different objects in space. Such cases occur in the design of underground buildings and facilities, street intersections on several levels and others. The presence of complex combinations of infrastructure objects determines the need for the generation of three-dimensional models to ensure reliable and visual representation of spatial data. The growing complexity of the infrastructure reinforces the need for the mass implementation of three-dimensional models through which to achieve a better representation of individual sites, as well as their interaction with other sites. There is a need for interconnection between the individual registers storing spatial data to facilitate access to information and to facilitate the process of integrating methods using three-dimensional modeling. Adding 3D information to existing systems will support activities related to urban planning, urban management and will provide a visualization of the different types of rights that certain persons have over a property, such as the right to build with the appropriate built-up area and height.