3.1. Vector-Based 3D Object Generation Procedure
This study proposes a procedure for generating LoD1-level 3D objects by combining 2D spatial information data with high-resolution Digital Elevation Model (DEM) data. This procedure is designed to optimize 3D object generation processing speed, visual quality, and vector-based data processing, as shown in
Figure 1.
3.1.1. Two-Dimensional to Three-Dimensional Spatial Data Collection
Shapefile format 2D spatial information data serve as the primary source for this study, shown in
Table 2,
Table 3,
Table 4 and
Table 5, encompassing urban elements such as buildings, roads, and administrative districts. These data provide detailed attributes including object boundaries, areas, and types, forming the foundation for 3D object generation. Additionally, high-resolution DEM data are utilized for assigning Z-values (elevation) to 3D objects.
The tabular formats, as shown in the tables, are not arbitrary but reflect standardized spatial data schemas defined by national or municipal geospatial authorities in Korea. These schemas ensure consistency, interoperability, and ease of parsing when converting 2D data into 3D object models.
The above table represents the building layer, containing detailed attributes such as unique building identifiers (BUL_MAN_NO, SIG_CD), physical characteristics (GRO_FLO_CO, UND_FLO_CO), and semantic information (BULD_NM_DC, BDTYP_CD). These attributes are used not only to classify and extrude buildings in 3D but also to assign texture and height data.
The above table shows the road data schema, essential for establishing road networks and relationships between buildings and streets. Attributes like ROAD_BT (road breadth) and ROAD_LT (length) are utilized in geometric construction and rendering of road structures.
The above table outlines administrative districts, enabling spatial filtering and analysis based on regions such as neighborhoods or municipalities, especially important in urban modeling and jurisdictional zoning.
The above table defines the Digital Elevation Model (DEM) metadata. Parameters such as spatial extent (X_Min, Y_Max) and resolution (Pixel_Width, Pixel_Height) are critical for assigning Z-values (elevation) to flat 2D geometries, effectively converting them into 3D models with topographic realism.
3.1.2. Preprocessing of 3D Geospatial Data
In this study, the collected 2D spatial information data and Digital Elevation Model (DEM) data underwent a series of preprocessing steps to ensure consistency across all datasets. The first step involved the conversion and unification of coordinate systems to establish a consistent spatial reference framework.
Initially, the coordinate systems of each dataset, including buildings, administrative districts, road networks, and DEM, were identified and documented. As these datasets originated from different sources, they often used differing coordinate reference systems. To resolve this, all data were converted into a common reference system, EPSG:5186, as specified in
Table 6.
The transformation process was conducted using QGIS 3.34.7 and the GDAL library, ensuring reliable and standardized projection. To minimize potential accuracy loss during this conversion, bilinear interpolation was applied, particularly for raster data such as DEM.
Following the coordinate system unification, additional preprocessing was conducted to improve the geometric accuracy and efficiency of the spatial data. This phase included noise removal and data refinement across multiple layers, including buildings, roads, administrative districts, and DEM, as shown in
Figure 2.
For building data, refinement involved detecting and correcting incomplete boundaries such as unclosed polygons and inconsistent orientation (e.g., mixed clockwise and counterclockwise directions). Extremely small objects were either removed or retained selectively, depending on their relevance to the analysis scope.
In the case of road data, disconnected road segments were linked to ensure network continuity, while redundant or overlapping features were removed to clean the dataset.
For administrative district boundaries, similar geometric corrections were applied, resolving issues related to unclosed polygons and inconsistent orientation to maintain spatial integrity and topological accuracy.
The DEM data also underwent a noise removal step, in which boundary elevation values were adjusted to align harmoniously with surrounding cells. This ensured continuity in elevation representation, which is crucial for accurate Z-value assignment in 3D modeling.
To enhance processing efficiency, the datasets were then clipped and reduced to focus on the defined study area. Specifically, a circular region with a 1 km radius centered around Suseo Station in Seoul, Republic of Korea, was extracted from the full dataset. After clipping, the Douglas–Peucker sampling algorithm was applied to simplify the geometries. This technique reduces the number of coordinate points while preserving overall shape fidelity, thereby optimizing memory usage and improving processing speed during 3D object generation.
3.1.3. Generation of Vector-Based 3D Objects
This study generates LoD1-level 3D objects through triangular mesh generation and elevation value assignment based on 2D spatial information data. This process focuses on representing urban terrain and structures in 3D while ensuring mesh structure precision and elevation value accuracy.
Triangular Mesh Generation: this stage constructs the geometric structure of objects based on 2D vector data, utilizing a constrained Delaunay triangulation algorithm for precise and stable triangular mesh generation, as shown in
Figure 3.
To ensure spatial accuracy and realism in the 3D modeling process, several geometric principles were applied during triangular mesh generation. First, terrain continuity was preserved by maintaining seamless connections between adjacent terrain surfaces and spatial objects. This approach prevents spatial discontinuities and geometric distortion during rendering and analysis.
In addition, the mesh division density was dynamically adjusted in areas with significant elevation variation to accurately reflect terrain curvature. This adaptive meshing strategy helps capture subtle elevation changes and ensures topographic fidelity.
Furthermore, in urban regions containing artificial structures such as buildings and roads, triangular meshes were generated while maintaining geometric consistency with existing spatial data. This ensured that the 3D representations of urban elements remained structurally coherent and aligned with the original 2D datasets.
Following the generation of the triangular mesh, elevation values (Z-values) were assigned to each mesh vertex using numerical terrain data derived from the DEM. This mapping process allowed the 3D objects to accurately represent terrain height variations, contributing to a more realistic three-dimensional representation of the spatial environment. To enhance the visual and structural continuity of the terrain, interpolation techniques were applied within each triangular region, resulting in smoother and more natural elevation transitions across the surface.
In cases where the resolution of the DEM data was lower than that of the generated triangular mesh, bilinear interpolation was employed to estimate intermediate elevation values. This technique ensured that the elevation data were seamlessly integrated into the finer mesh structure by calculating interpolated heights based on the surrounding four DEM grid points. As a result, discrepancies caused by resolution differences were effectively minimized, thereby improving the overall precision and continuity of the terrain representation within the 3D model, as shown in
Figure 4.
Bilinear interpolation estimates the elevation
at an arbitrary point
based on the surrounding four DEM grid points,
, where each point has a known elevation value. The interpolation formula is expressed as follows:
To ensure structural accuracy and semantic consistency, elevation assignment was adjusted based on object type. For fixed structures such as buildings, a constant Z-value was applied to each object in order to prevent distortion caused by terrain undulations.
In contrast, continuous elements such as roads and natural terrain were processed using dynamic interpolation based on DEM data. This allowed these features to more accurately reflect the underlying topography, resulting in smoother and more realistic elevation transitions throughout the model.
By applying this object-specific elevation adjustment strategy, the proposed 3D object generation procedure effectively balanced geometric precision and visual coherence, while also enhancing large-scale data processing efficiency and reducing memory consumption during rendering and analysis.
3.3. Texture Mapping Process
The proposed algorithm focuses on mapping texture data to 3D models with high accuracy while maximizing visual quality through optimization and lightweighting. This process consists of five main algorithms: geographic coordinate assignment, merged texture generation, UV coordinate extraction, texture transformation, and visualization verification (see
Figure 5).
3.3.1. Geographic Coordinate Assignment Algorithm
The geographic coordinate assignment algorithm includes the process of calculating geographical boundaries based on map sheet numbers embedded in TIF files and converting them into GeoTIFF format. This process is a crucial step for precise texture mapping to 3D models, aiming to ensure geographic information accuracy and visual consistency. The main process consists of five stages: map sheet number interpretation, coordinate system conversion, pixel resolution calculation, GeoTIFF data generation, and storage.
Map Sheet Number Interpretation: Map sheet numbers, structured as hierarchical strings, provide critical information for determining the geographical boundaries of texture data. By analyzing these numbers,
latitude and
longitude are calculated to define precise tile location and size. The first two digits represent the integer value of latitude, with subsequent digits defining detailed coordinates through scale units of 0.25 and 0.025 degrees for secondary and tertiary numbers, respectively.
Coordinate System Transformation: Initial latitude/longitude calculated from map sheet numbers are defined in WGS84 or other geographic coordinate systems. These are converted into target coordinate systems like EPSG 5186 to adjust texture positions for 3D model compatibility.
The conversion is performed using the ProjNet library, which supports various EPSG standards [
34].
Pixel-level Resolution Calculation: following coordinate system conversion, pixel size is calculated to ensure consistency with geographical coordinates.
This information is essential for converting texture data to GeoTIFF format. Resolution is calculated based on converted minimum/maximum coordinate values, with pixel scale defined by overall texture size and image resolution.
Creation of GeoTIFF Data: TIF file data are converted into GeoTIFF format based on calculated coordinate information.
Coordinate information is assigned to each pixel, with conversion results stored in GeoTIFF files.
Pixel x,y coordinates are processed and stored in GeoTransform arrays for generation.
3.3.2. Texture Merging
The texture merging algorithm involves combining multiple GeoTIFF tile files into a single large-scale GeoTIFF. This process focuses on maintaining coordinate system consistency while aligning pixel data and correctly positioning them within the merged dataset. The process consists of five main stages: overall boundary calculation, merged dataset creation, tile data reading and merging, GeoTransform definition, and merged GeoTIFF generation.
Overall Boundary Calculation: the geographical boundaries of each GeoTIFF tile are analyzed to determine the total size and boundaries of the merged dataset.
The GeoTIFF files’ GeoTransform structure is as follows in
Table 9:
Calculate tile minimum/maximum boundaries using
GeoTransform values.
Calculate the overall extent (
overallExtent) by comparing the minimum and maximum coordinates of all tiles.
Merged Dataset Creation: the merged GeoTIFF dataset is generated based on the overall boundary.
Pixel size is calculated using GeoTransform values, and a memory-based dataset is created using the GDAL library, initializing resolution, data type, and number of bands.
Tile Data Reading and Merging: the
GeoTransform values of each tile are read to calculate appropriate positions in the merged dataset.
Pixel data from each tile are read and written to the corresponding location in the merged dataset. Overlapping data between tiles are handled through a simple overwriting approach by subsequent tiles.
GeoTransform Definition: the GeoTransform array for the merged dataset is defined based on overall boundary values and pixel sizes.
Merged GeoTIFF Generation: The merged data are saved as a final GeoTIFF file, including metadata (coordinate system, boundaries, resolution, etc.). The resulting GeoTIFF file is compatible with software such as QGIS 3.34.7.
3.3.3. UV Coordinate Calculation
The coordinate system used in 3D models (world coordinates or local coordinates) differs from the 2D coordinate system used in GeoTIFF texture images. Therefore, converting 3D coordinates to the 2D UV coordinate system is necessary for proper texture mapping to the 3D model. The primary objective is to normalize and return to each vertex position.
The UV coordinate transformation algorithm converts 3D model coordinates into GeoTIFF texture coordinates, optimizing texture mapping and enhancing mapping accuracy.
3.3.4. Texture Transformation
The texture transformation algorithm emphasizes maintaining visual quality while optimizing the performance of the 3D model. After extracting UV coordinates, it encompasses crucial processes including texture image resolution optimization, mipmapping (multi-resolution texture) generation, compression, and storage.
Resolution Adjustment: resolution adjustment involves modifying the original texture size to achieve optimal resolution.
Since UV mapping denotes the positional ratio of each pixel in the image, having sufficient resolution for appropriate color information mapping is advantageous for optimization.
However, texture sizes used in 3D models can impact performance and quality if they are either too large or too small, necessitating appropriate resolution settings.
The formula for adjusting texture size follows specific mathematical principles that balance visual quality with computational efficiency.
S represents the scaling ratio (0 < S ≤ 1, e.g., S = 0.5 indicates 50% reduction).
When reducing texture resolution, interpolation techniques must be employed to minimize quality degradation.
Multi-Resolution Texture: Mipmapping is a technique that optimizes GPU performance by pre-generating multiple resolution versions of the original texture. This approach enables the application of low-resolution textures to distant objects while maintaining high-resolution textures for nearby objects. The mipmapping process generates textures at half-size for each successive level.
Each mipmap is created at half the resolution of its predecessor, maintaining smooth downscaling effects through interpolation techniques. For instance, given the original image size of 1024 × 1024, mipmap levels are generated as follows in
Table 10.
The generated mipmaps are stored in GPU memory. During rendering and visualization services, the camera can select appropriate texture levels based on depth (pixel depth).
3.3.5. Texture Compression and Storage
Optimized textures are stored using compression formats to reduce GPU memory usage. UV coordinates represent the correspondence between each vertex of the 3D model and its location in the 2D texture image. Consequently, once UV coordinates are properly generated, the elimination of geographical coordinates from GeoTIFF does not create issues. The commonly used formats are as follows in
Table 11.
The texture compression process involves applying appropriate formats considering the original texture’s resolution, quality requirements, and intended use. The compressed textures undergo quality verification and mipmapping validation in the 3D rendering environment. The final storage format is determined based on the comparative analysis of GPU loading speed and quality metrics.
3.5. CityGML Transformation and Schema Validation
LoD1-level 3D objects generated in this study are converted into CityGML 3.0 standard format, with schema validation performed to ensure data consistency and interoperability. CityGML, an international standard for storing structured 3D city model data, is designed to represent various spatial elements including buildings, roads, and terrain. This study automated the CityGML conversion process and implemented validation procedures to ensure compliance with CityGML 3.0 schema
Table 12.
3.5.1. CityGML Transformation
The CityGML transformation, essential for structured representation of 3D objects, converts LoD1-level 3D models to CityGML 3.0 format through the following steps:
Attribute mapping.
Spatial coordinate transformation.
Application of CityGML structure for terrain and building objects.
CityGML file generation and XML structuring.
3.5.2. CityGML Schema Validation
Following the CityGML transformation, it is essential to validate whether the transformed data comply with the CityGML 3.0 standard schema. In this study, we employed the CityGML Validator tool to automatically verify the consistency of the transformed data.
It was confirmed that the LoD1 object and texture information generated as shown in
Table 13, was accurately converted in accordance with the CityGML 3.0 standard, and each object and attribute was properly defined. Depending on whether the corresponding CityGML file fails/succeeds, the error information of the file can be found in the detailed items.
The validation process consists of three main components:
Since CityGML 3.0 utilizes XML-based data formats, it is crucial to verify that the transformed XML files comply with CityGML 3.0 XSD (schema definition) specifications.
This study validated the transformed CityGML data against the CityGML 3.0 XSD files to ensure there were no schema violations.
Key validation criteria include the following:
Verification of attribute definitions (such as gml:id and gml:posList) in accordance with the CityGML schema.
Examination of correct XML structure implementation for objects including buildings, transportation, and ReliefFeature.
Validation of coordinate and geometric structure (gml:Polygon, gml:Surface) compliance with schema requirements.
To verify the geometric consistency of transformed 3D objects, we employed Topology Checker and OGR Geometry Validator to examine the geometric structure of each object.
The primary validation criteria include the following:
Verification of closed surface conditions for building objects.
Assessment of correct TIN structure implementation in terrain mesh.
Inspection for duplicate gml:id or reference errors.
Using the CityGML Validator, we examined the proper definition of object attributes and reviewed for the inclusion of undefined properties.
Key error validation criteria include the following:
Verification of proper BuildingPart and BuildingInstallation relationships within building objects.
Assessment of clear definitions for TrafficArea and AuxiliaryTrafficArea in road objects.
Validation of elevation value representation (Z-values in gml:posList).
The verified CityGML file is shown in
Figure 8.