AN ENCODING METHOD FOR COMPRESSING GEOGRAPHICAL COORDINATES IN 3D SPACE

: This paper proposed an encoding method for compressing geographical coordinates in 3D space. By the way of reducing the length of geographical coordinates, it helps to lessen the storage size of geometry information. In addition, the encoding algorithm subdivides the whole space according to octree rules, which enables progressive transmission and loading. Three main steps are included in this method: (1) subdividing the whole 3D geographic space based on octree structure, (2) resampling all the vertices in 3D models, (3) encoding the coordinates of vertices with a combination of Cube Index Code (CIC) and Geometry Code. A series of geographical 3D models were applied to evaluate the encoding method. The results showed that this method reduced the storage size of most test data by 90% or even more under the condition of a speed of encoding and decoding. In conclusion, this method achieved a remarkable compression rate in vertex bit size with a steerable precision loss. It shall be of positive meaning to the web 3d map storing and transmission.


INTRODUCTION
3D urban data is one of the most important basic data for the study of the virtual geographical environment and the application of Smart City.Generally, the quality of 3D urban models is refined as much as possible to meet the requirements of visualization effects of design models.As a result, if we want to make use of 3D city models over the Internet and to bring it up to the required standard of the network transmission in realtime rendering, proper subdivision and encoding techniques need to be used to compress data while remaining the key features and appearance as best as possible.Past researches could be grouped into the following categories: (1)3D model Compression and simplification.Earlier studies focused on optimizing model storage structure such as generalized triangle meshes (Deering, 1995), floating-point data compression method (Ha and Yoo, 2016;Isenburg et al., 2004;Isenburg et al., 2005), topological surgery scheme (Taubin and Rossignac, 1998), and random accessibility of mesh compression framework (Choe et al., 2009).3D model simplification was also solved by cartographic methods (Du et al., 2008;Forberg, 2007;Kada, 2008;Mehra et al., 2009;Thiemann and Sester, 2004).( 2) Multi-resolution LOD algorithms.Representative works such as multi-resolution terrain mesh visualization (De Fioriani et al., 1997), progressive mesh (Hoppe, 1996), view-dependent progressive mesh (Hoppe, 1998) were proposed to reduce details at different scales.For regular grids, a variety of algorithms were designed based on recursive partitioning and visibility culling.For instance, real-time continuous LOD surface visualization algorithm was designed based on hierarchical quadtree (Lindstrom et al., 1996).Particularly, the pyramid model is one of the most widely used multi-resolution LOD methods when visualizing geographic data (Dang et al., 2014;Du et al., 2006;Luebke, 2003).(3) Optimization for Internet transmission or visualization.Gong (Gong et al., 2011) proposed an extended dynamic 3D R-tree structure concerning LOD which improves the 3D query performance.Ma (Ma and Li, 2016) proposed the KD-tree based on the compression method of a 3D dynamic scene which reduces the limitation of network bandwidth.Benefiting from both regular and recursive rules, the octree is capable of compressing the model size due to restructuring spatial relationship and finally accelerates searching speed (Peng and Kuo, 2005;Yue et al., 2009).This is also usually used for spatial subdivision in 3D geographic scenes (Jiong et al., 2017;Lixin and Jieqing, 2009).This paper started from the geographical space subdivision, and then transform the geographical coordinates into the relative coordinates in the subdivision space according to the octree structure.Finally, testing results were discussed to illustrate the performance and practicability of the method.
In later sections, a statement of the framework of our method, which containing an octree-based subdivision and an encoding structure, is elaborated.Following by the description of the whole process of geometry encoding and decoding, the evaluation indicator and result presented.

Overview of the method
This method of encoding in 3D geographic space aiming to speed up the transmission of complicated and dense 3D models in web maps, includes three phases: (1) the whole 3D geographic space being iteratively subdivided into cubes based on octree structure, (2) resampling coordinates of vertices into a discrete representation in each cubes at different subdivision depth of the octree, (3) encoding the geometry of models with both subdivision index as well as resampled coordinates and then generating the final LOD models, as is shown in Figure1.

Octree-based Subdivision and Encoding
The full extent of the space is equally subdivided into 8 cubic subspaces at the first depth level.And then each cube is iteratively subdivided into 8 equal parts at the next depth level until the depth meets the predetermined value.An octree can be defined in this way, and each node can represent the subdivided space.Every node in the octree is encoded with the combination of particular codes related to halving depth and position on r, c, h coordinate axis, which is called as the Cube Index Code (CIC) in this method.At the first depth, the root cube represents the full space, whose code is defined as (1,1,1).The CIC consists of r, c, h coordinates which is recursively defined in a halving way.The relation between halving codes is shown in ( 1) -( 8).Therefore, the node0 on the bottom-left corner is encoded as (2,2,2) while the code of the node7 on the top-right corner is (3,3,3) at the second depth.Figure 2 illustrates all the codes of nodes at depth2.This encoding method ensures two important rules.Firstly, each of the nodes in different depths of octree contains unique identification.Secondly, only one digit of the code is different between any two adjoining nodes at the same depth and the difference is 1.Given that the code of space subdivision is integral, it code value is spatially continuous when being used as spatial index.

Geometry Encoding
In a large 3D scene, the amount of vertices and triangular faces determines the storage size of a 3D model and undoubtedly have significant influences on network transmission and the rendering performance.Furthermore, Geographic coordinates are usually stored in double precision coding, which occupy the majority of storage for the whole model.Based on the reason above, this method segments each cube into 512 pixels along each axis of the octree subdivision and defines a new pixel coordinate inside each octree nodes as 512×512×512 grids, as is shown in Figure3.As a result, this technique generates a discrete representation to describe positions in the inner space of each node of the octree.Each vertex of the model will be attached to nearest isotonic unit of pixel.On the other hand, the edge length of any node is double that of its sub nodes at next depth.It means the ratio of pixels-to-meters of current depth, the scale, doubled from one to the next.Similar to the tile map, this encoding method lose different precision of position representation and geometric description at different scales.
And this loss can be calculated according to a rigorous mathematic relationship between the octree node depth and the original extent of geographical space.These particular features of the method are favourable to progressive real-time transmission allowing users to visualize or apply analytical GIS methods to partially transmitted 3D model data sets.Models are not always stored in the same octree node and those crossing different cubes need to be split into parts.As a result, the geometry information of the original model separately in different sub models, allowing partial transmission of geometry data.
Figure 3. Geometry code of model's vertices inside the octree node A problem that cannot be ignored is that, the geometry information may not be complete if a model crosses several octree nodes.To overcome this, every triangle face that intersects the boundary surfaces of octree node should be divided into a number of triangles or polygons.Afterwards, these polygons are triangulated by newly-added edges linking to grid boundary, which is supposed to ensure validity of mesh in each octree node.In the end, vertices on the boundary surfaces will be replaced after complete loading of their neighbouring octree nodes.Then shared edges need to be collapsed and duplicate vertices be removed, as is shown in Figure 4. Accordingly, the geometry information can be encoded with the combination of CICs and pixel coordinates as (r, c, h, x, y, z), for instance (2,2,2,100,132,56).The value of x, y and z must be an integral number and varies from 0 to 511.Since all vertices in one octree node have the same CIC value, every vertex in a split model need to store its pixel coordinates, (x, y, z), only and share the same CIC value recorded in the file.This approach helps to reduce a large amount of storage size in comparison with the original geographical coordinates in double precision.

Decoding
Decoding processing is a simple reverse of the encoding process.Firstly, duplicate vertices on edge surface of octree node, which were created during geometry encoding, should be removed.
They have at least one geometric coordinates being equal to 512.So it is easy to find and fix.Secondly the original geographical coordinates of the octree node are calculated based on its depth, CIC and the predefined extent of the whole geographical space, which can be defined as Where x g is geographical x coordinate of the vertex, x O is geographical coordinate of original point of the whole space, c is the first part of the CIC of current octree node, x represents the x value of the geometry code, range means the maximum edge length of the full extent, depth is the depth of the octree node, and y g , z g , y O , z O , y, z are defined correspondingly.Thus, the geographic coordinate of vertices is recovered from CIC and Geometry coding.Meanwhile, the split meshes on edge can be merged on this basis.

RESULTS
The test data set contains 5 different kinds of geographic entities and scenes including building, Chinese ancient architecture, animal, city area and terrain.The tests are conducted on a 64-bit Intel Core i7-7700HQ 6M L3 Cache processor, 8 GB of RAM, Nvidia GTX 1050 Graphics.The algorithm was running on Windows10, Google Chrome v8 5.8.283.3D dataset applied to assess the method follows the Three.jsJSON model format3.The results reflected that this encoding method was able to describe geometry of geographical entities correctly and was conductive to geometry compression.Bits per vertex (bpv) and compression rate(cr) were used to evaluate the geometry compression efficiency of this method _ _ size vertex bpv num vertex bpv is defined as bit size of whole vertexes, size_vertex, being divided by number of vertexes, num_vertex.

_ 100% _
size after cr size before Where size_before is bit size of whole vertexes before encoding and size_ after is bit size of whole vertexes after encoding.In TABLE I, vc is short for the vertices count, fc for the triangle face count, size for the file storage size.The results revealed that this method was able to reduce vertex bit size by more than 90% in most models, and archived dramatic reduction in bpv.
The time cost of the encoding was accredited while the time cost of decoding was fairly low and even browsers cannot record the decode time (replaced by "~").The speed of encoding and decoding reflected a big advantage in applying this method to web 3D data loading.In addition, a good compress rate was obviously helpful to speed up the network transmission.It is noteworthy that this method performed better in dense 3D models, such as city area but played relatively worse in models with sparse vertices.Figure 5. illustrates that models were gradually simplified with the depth decreasing, and these simplified models were still able to maintain good geometry features after reducing vertices and triangle faces.
(This picture is attached at the end of the article)

Figure 1 .
Figure 1.A framework of the encoding method

Figure 2 .
Figure 2. Cube Index Code of octree nodes

Figure 4 .
Figure 4.An overhead view of the triangulating process

Figure 5 .
Figure 5. details revealed by models at different depth

TABLE I .
THE ASSESSMENT OF THE ENCODNG METHOD IN DIFFERENT 3D GEOGRAPHICAL ENTITIES (The table is attached at the end of the article) By assessing the method on different models, this paper found this method was conductive to speed up the progressive transmission on the Internet and achieved a considerable compression rate in vertex bit size with a steerable precision loss.It shall be of positive meaning to web 3D map storing and transmission.