# An Approach to Generate Spatial Voronoi Treemaps for Points, Lines, and Polygons

Authors: Song Tian; Ximin Cui; Yu Gong
Journal: Journal of Electrical and Computer Engineering
 (2015)

---

## Abstract

As a space-filling method, Voronoi Treemaps are used for showcasing hierarchies. Previously presented algorithms are limited to visualize nonspatial data. The approach of spatial Voronoi Treemaps is proposed in this paper to eliminate these problems by enabling the subdivisions for points, lines, and polygons with spatial coordinates and references. The digital distance transformation is recursively used to generate nested raster Voronoi polygons while the raster to vector conversion is used to create a vector-based Treemap visualization in a GIS (geographic information system) environment. The objective is to establish a spatial data model to better visualize and understand the hierarchies in the geographic field.


---

## Body

## 1. Introduction

As a well-known approach of visualizing hierarchical structures, Treemaps use recursive subdivision algorithms to partition ann-dimensional plane into the nested regions without producing holes or overlaps. The size of each region corresponds to the value of a data element and the nesting depth represents the depth of the data element in the corresponding hierarchical data structure [1]. Treemaps were first presented by Johnson and Shneiderman in 1991 designed to visualize the files on a hard drive [2]. Nowadays, they have been widely applied to a variety of domains, such as the sports reporting [3], the photo management [4], the business data visualization [5], and the repository search visualization [6].Previously presented Treemap algorithms mainly focus on displaying hierarchical data using the nested rectangles, such as Slice-and-Dice Treemaps [7], Squarified Treemaps [8], Strip Treemaps [4], Spiral Treemaps [9], and Spatially Ordered Treemaps [10]. They have one thing in common: their branches are all given rectangles which are tiled with smaller rectangles in accordance with their respective generation norms. Subsequently, approaches to visualize the hierarchies with the nonrectangular regions were addressed, such as Voronoi Treemaps [11, 12], Jigsaw Treemaps [13], and Circular Treemaps [14].Voronoi Treemaps enable the two-dimensional subdivisions of the arbitrary polygons following the norms of Treemaps and Voronoi diagrams within the areas of arbitrary shapes. Since introduced by Balzer and Deussen [11, 12] to visualize the software metrics, they have been used in many applications ranging from the biodiversity exhibition [15] to the gene expression [16]. But they are rarely used in the field of geography, let alone integrated with the mainstream GIS software. For better integration of Voronoi Treemaps and GIS, we present an approach of generating spatial Voronoi Treemaps for points, lines, and polygons to better visualize the hierarchies in the geographic field. For simplicity, we use the term “SVT” for the spatial Voronoi Treemaps for points, lines, and polygons; except explicit specification is made.In Section2, the principles of the SVT and the relevant concepts are introduced. Section 3 elaborates the implementation of the layout algorithm. Section 4 shows several examples. Discussions and the conclusions are given in Section 5.


## 2. Preliminary Knowledge

The SVT is a visualization method to create geographical map-like representations of trees with ordinary or weighted Voronoi polygons (or called cells) from a set of generators, such as points, lines, and polygons. As is shown in Figure1, an SVT is composed of nested cells and their corresponding generators. A level i cell contains all level i+1 generators that are closer to that level i generator than to any other (e.g., a level 1 cell V(e1) contains three level 2 generators e4, e5, and e6). Each cell in the hierarchy has a size that is the sum size of its contained leaf cells (e.g., the size of V(e1) is equal to the total size of V(e4), V(e5), and V(e6)) and a depth that corresponds to its contained generator’s depth. The initial boundary of all generators is regarded as the root node, which has an arbitrary shape, mostly a rectangle.Figure 1
An SVT and its corresponding tree.As a combination of Voronoi Treemaps and Voronoi diagrams, the SVT is motivated by the work of Balzer and Deussen on Voronoi Treemaps [11, 12] and the work of Dong on multiplicatively weighted Voronoi diagrams for point, line, and polygon features [17]. Traditional Voronoi Treemaps consist of nested cells without spatial information. Differently, the nested cells and their corresponding generators, both of which have spatial coordinates and references, are used by our proposed Treemap layout to express hierarchies. Generators can represent various kinds of geographic objects, such as cities, railways, and lakes, and cells are their corresponding dominant areas. Voronoi Treemap algorithms usually use centroidal Voronoi tessellations to create nested polygonal structures. In each recursion step, generators are generated randomly and shift to the center of mass of its cell using Lloyd’s method [18], whereas generators of different levels are preset and fixed for an SVT. At each recursive subdivision step, the cells are subdivided into smaller polygons from the generators contained within.Generators can be obtained from the files in shapefile format for an SVT. The shapefile format is a popular geospatial vector data format for GIS software, which is developed and regulated by Environmental Systems Research Institute (ESRI) as an open specification for data interoperability among GIS software products. It can describe vector spatial features (points, lines, and polygons) with spatial coordinates and references. Each feature commonly has attributes to describe itself, such as the name and the location. To clearly convey the idea of the SVT, several key concepts are introduced first.


### 2.1. Relevant Definitions

Definition 1 (see [19]).
Letp be a point and let e be a generator (a point, line, or polygon) in R2; the distance between p and e is defined as below:(1)dp,e=inf⁡dp,q∣q∈e,where the denotation d(p,q) represents a specified distance function between two points p(xp,yp) and q(xq,yq); mostly the Euclidian metric is used, which is defined as(2)dep,q=xp-xq2+yp-yq2,but others, such as the Manhattan metric or the Chessboard metric, are possible as well.
The Manhattan metric is(3)dmp,q=xp-xq+yp-yq.
The Chessboard metric is(4)dcp,q=max⁡xp-xq,yp-yq.
In vector mode,xp and xq are x-coordinates and yp and yq are y-coordinates. In raster mode, the coordinates are defined by integer numbers of row and column of raster pixels. Figure 2 shows three distance metrics in raster mode.Figure 2
The Euclidean, Manhattan, and Chessboard distance in raster mode. (a) A raster region ofde≤3, (b) a raster region of dm≤3, and (c) a raster region of dc≤3.
(a)
(b)
(c)Definition 2.
LetE={e1,e2,…,en} be a set of n distinct generators in R2. For each ei∈E, a weight w(ei) is assigned. A weighted Voronoi diagram for points, lines, and polygons V(E,w(E))={V(e1,w(e1)),V(e2,w(e2)),…,V(en,w(en))} denotes a subdivision of R2 into n cells with a property that a point p lies in a cell V(ei) if and only if dmw(p,ei)<dmw(p,ej) for each ei,ej∈E with i≠j. The notation dmw(p,ei) is defined as (5)dmwp,ei=dp,eiwei,wei>0.
Ifwe1=we2=⋯=w(en), V(E,w(E)) is reduced to an ordinary Voronoi diagram for points, lines, and polygons V(E)={V(e1),V(e2),…,V(en)}.Definition 3.
LetV(E,w(E))={V(e1,w(e1)),V(e2,w(e2)),…,V(en,w(en))} be a weighted Voronoi diagram for points, lines, and polygons. V(ei,w(ei)) denotes the cell of the generator ei with a positive real weight w(ei). If there are any weighted Voronoi diagrams V(Fi,w(Fi))={Vfx,wfx∣V(fx,w(fx))⊂V(ei,w(ei)),fx∈V(ei,w(ei)),1≤x<∞,1≤i≤n} which could meet the criteria ∑V(fx,w(fx))≡V(ei,w(ei)), then the expression V(E,w(E))={V(F1,w(F1)),V(F2,w(F2)),…,V(Fn,w(Fn))} is called a weighted SVT. Regardless of weights of generators, the expression V(E)={V(F1),V(F2),…,V(Fn)} is named as an ordinary SVT. A weighted SVT is a special case of the ordinary SVT that takes weights into consideration. Both of them are collectively called the SVT.


### 2.2. Distance Transformation

It can be known from the above contents that an SVT consists of layers of ordinary or weighted Voronoi diagrams for points, lines, and polygons. To construct an SVT, we need to generate its compositions first. The Voronoi diagram or weighted Voronoi diagram algorithms can be divided into two categories: vector-based methods and raster-based methods. Vector-based methods are suitable for point sets but not good for line and area sets. By contrast, the computation of Voronoi diagrams or weighted Voronoi diagrams for line and polygon sets is as easy as that for point sets in raster mode. Computation via distance transformation is one of the important raster-based methods.A distance transformation is a derived form of a digital image. Supposing that the digital binary image consists of feature and nonfeature pixels and the features can be points, lines, or polygons, the distance transformation is an operator that converts this binary image to a grey-level image where all pixels have a value corresponding to the distance to the nearest feature pixel [20]. It uses only a structuring mask at a time based on the following idea: global distances in the image are approximated by propagating local distances [20]. There are various types of distance transformations, depending on which distance metric is used to determine the distance between pixels. In this paper, three most basic metrics are used. They are the Manhattan metric (a cross shaped mask), the Chessboard metric (a 3 × 3 square mask), and the Euclidean metric.In a digital space, the fulfillment of Euclidean geometry is a complex operation due to the discrete structure [21]. In order to get a better approximation of Euclidean distance transformation, several approaches are proposed, such as chamfer distance algorithms [20], sequence algorithms [22, 23], and parallel algorithms [24]. To simplify the calculation, octagonal distance is used to approximate Euclidean distance transformation, which is an alternate usage of Chessboard distance and Manhattan distance [20]. It needs to point out that it is not our intention to acquire a better approximation of Euclidean distance transformation. Such discussions will be encouraged following this paper.


## 2.1. Relevant Definitions

Definition 1 (see [19]).
Letp be a point and let e be a generator (a point, line, or polygon) in R2; the distance between p and e is defined as below:(1)dp,e=inf⁡dp,q∣q∈e,where the denotation d(p,q) represents a specified distance function between two points p(xp,yp) and q(xq,yq); mostly the Euclidian metric is used, which is defined as(2)dep,q=xp-xq2+yp-yq2,but others, such as the Manhattan metric or the Chessboard metric, are possible as well.
The Manhattan metric is(3)dmp,q=xp-xq+yp-yq.
The Chessboard metric is(4)dcp,q=max⁡xp-xq,yp-yq.
In vector mode,xp and xq are x-coordinates and yp and yq are y-coordinates. In raster mode, the coordinates are defined by integer numbers of row and column of raster pixels. Figure 2 shows three distance metrics in raster mode.Figure 2
The Euclidean, Manhattan, and Chessboard distance in raster mode. (a) A raster region ofde≤3, (b) a raster region of dm≤3, and (c) a raster region of dc≤3.
(a)
(b)
(c)Definition 2.
LetE={e1,e2,…,en} be a set of n distinct generators in R2. For each ei∈E, a weight w(ei) is assigned. A weighted Voronoi diagram for points, lines, and polygons V(E,w(E))={V(e1,w(e1)),V(e2,w(e2)),…,V(en,w(en))} denotes a subdivision of R2 into n cells with a property that a point p lies in a cell V(ei) if and only if dmw(p,ei)<dmw(p,ej) for each ei,ej∈E with i≠j. The notation dmw(p,ei) is defined as (5)dmwp,ei=dp,eiwei,wei>0.
Ifwe1=we2=⋯=w(en), V(E,w(E)) is reduced to an ordinary Voronoi diagram for points, lines, and polygons V(E)={V(e1),V(e2),…,V(en)}.Definition 3.
LetV(E,w(E))={V(e1,w(e1)),V(e2,w(e2)),…,V(en,w(en))} be a weighted Voronoi diagram for points, lines, and polygons. V(ei,w(ei)) denotes the cell of the generator ei with a positive real weight w(ei). If there are any weighted Voronoi diagrams V(Fi,w(Fi))={Vfx,wfx∣V(fx,w(fx))⊂V(ei,w(ei)),fx∈V(ei,w(ei)),1≤x<∞,1≤i≤n} which could meet the criteria ∑V(fx,w(fx))≡V(ei,w(ei)), then the expression V(E,w(E))={V(F1,w(F1)),V(F2,w(F2)),…,V(Fn,w(Fn))} is called a weighted SVT. Regardless of weights of generators, the expression V(E)={V(F1),V(F2),…,V(Fn)} is named as an ordinary SVT. A weighted SVT is a special case of the ordinary SVT that takes weights into consideration. Both of them are collectively called the SVT.


## 2.2. Distance Transformation

It can be known from the above contents that an SVT consists of layers of ordinary or weighted Voronoi diagrams for points, lines, and polygons. To construct an SVT, we need to generate its compositions first. The Voronoi diagram or weighted Voronoi diagram algorithms can be divided into two categories: vector-based methods and raster-based methods. Vector-based methods are suitable for point sets but not good for line and area sets. By contrast, the computation of Voronoi diagrams or weighted Voronoi diagrams for line and polygon sets is as easy as that for point sets in raster mode. Computation via distance transformation is one of the important raster-based methods.A distance transformation is a derived form of a digital image. Supposing that the digital binary image consists of feature and nonfeature pixels and the features can be points, lines, or polygons, the distance transformation is an operator that converts this binary image to a grey-level image where all pixels have a value corresponding to the distance to the nearest feature pixel [20]. It uses only a structuring mask at a time based on the following idea: global distances in the image are approximated by propagating local distances [20]. There are various types of distance transformations, depending on which distance metric is used to determine the distance between pixels. In this paper, three most basic metrics are used. They are the Manhattan metric (a cross shaped mask), the Chessboard metric (a 3 × 3 square mask), and the Euclidean metric.In a digital space, the fulfillment of Euclidean geometry is a complex operation due to the discrete structure [21]. In order to get a better approximation of Euclidean distance transformation, several approaches are proposed, such as chamfer distance algorithms [20], sequence algorithms [22, 23], and parallel algorithms [24]. To simplify the calculation, octagonal distance is used to approximate Euclidean distance transformation, which is an alternate usage of Chessboard distance and Manhattan distance [20]. It needs to point out that it is not our intention to acquire a better approximation of Euclidean distance transformation. Such discussions will be encouraged following this paper.


## 3. The SVT Algorithm

The SVT uses a recursive layout algorithm to segment a two-dimensional plane into nested cells from a set of generators. Generators can be points, lines, and polygons that represent different forms of spatial objects in the real world, among which points are abstracted as their locations, lines represent their skeletons, and polygons depict their boundaries. Each generator is assigned two initial parameters. One is “level” that represents generator’s hierarchy and the other is “weight” that reflects generator’s certain property.The construction of SVTs is as follows: first, classify generators into different sets in accordance with their level values. Then, regard the initial boundary and its contained level 1 set of generators as a digital image and process it via distance transformation. The output is a set of raster cells, which makes up a raster ordinary or weighted Voronoi diagram of level 1. For the next hierarchy level, this procedure is performed recursively for all leveli+1 generators within respective level i cells. When the recursion ends, converting the digital images to vector files and overlaying them, a complete layout of SVT is obtained.For simplicity, letVi represent an ordinary Voronoi diagram V(E) or a weighted Voronoi diagram V(E,w(E)) of level i in the hierarchy, and let Vi(j) denote an ordinary Voronoi region Vi(ej) or a weighted Voronoi region Vi(ej,w(ej)) of ej; except explicit specification is made in this section.In Algorithm1, C is a set of z pixels determined by V0,Width, andHeight. Each pixel cj∈C corresponds to five properties: an identifier ic(cj), an identifier of the father node if(cj), an original transformation speed to(cj), a current transformation speed tc(cj), and a status s(cj). Consider s(cj)∈{-1,0,1}, where “s(cj)=-1” signifies that cj is waiting to be processed, “s(cj)=0” represents that cj is being processed, and “s(cj)=1” denotes that pixel cj has been processed. While initializing C for an ordinary SVT, define ic(cj)=-1, if(cj)=-1, and s(cj)=-1 for each cj∈C. While initializing C for a weighted SVT, define ic(cj)=-1, if(cj)=-1, s(cj)=-1, to(cj)=0, and tc(cj)=0 for each cj∈C. Gi is a set of z pixels for Vi, in which each gj∈Gi has the same properties as cj in C. While initializing Gi for an ordinary SVT, define ic(gj)=-1, if(gj)=ic(cj), and s(gj)=-1 for each gj∈Gi. While initializing Gi for a weighted SVT, define ic(gj)=-1, if(gj)=ic(cj), s(gj)=-1, to(gj)=0, and tc(gj)=0 for each gj∈Gi. Ei is a subset of E with l(ek)=i for each ek∈Ei, which is obtained from the functionGetLevelGenerators().count is the number of pixels with s(gj)=1 in Gi, which is obtained from the functionPixelsUpdate().Algorithm 1:SVT subdivision.
Input: a set of n generators E={e1,e2,…,en} meeting the criteria that each ek∈E corresponds to an
unique identifieri(ek), a level l(ek) and a weight w(ek) with i(ek)>0, w(ek)>0 and l(ek)=1,2,…,h;
V
0: the boundary of E; Height: the number of rows of the output image; Width: the number of columns of the output image
Output: an SVT {V1,V2,…,Vh}
Begin
z = Width × Height
initializeC: a set of z pixels for V0
h=max(l(e1),l(e2),…,l(en))  %Get the maximum level value of E
for  i≔1; step 1 until  h  do
initializeGi: a set of z pixels for Vi
Ei = GetLevelGenerators(E,i)  %Ei: an array for level i set of generators.
PixelsAssignment(Gi,Ei)
count = 0
while (count≠z) do
PixelsTransformation(Gi)
PixelsUpdate(Gi,count)
endwhile
C=Gi
TreemapExport(Gi)
endfor
EndThe functionGetLevelGenerators() (Algorithm 2) is to acquire a level i set of generators from E.Algorithm 2:
GetLevelGenerators().
Input: a set of n generators E={e1,e2,…,en}, a level value i
Output: the level i set of generators Ei
Begin
Initialize an arrayEi for the level i set of generators.
for  j≔1; step 1 until  n  do
if (l(ej)=i)then
Ei←ej  %add ej to Ei
endif
endfor
EndA weighted SVT subdivides the two-dimensional space recursively with consideration of both location and weight of each generator, while an ordinary SVT partitions space only considers generator’s location. The different division approaches necessitate a different handling of the auxiliary functionsPixelsAssignment() andPixelsTransformation() in Algorithm 1.The functionPixelsAssignment() ( Algorithm 3) is to assign values of generators to pixels correspondingly if pixels intersect with generators in the two-dimensional raster space, which is a vector to raster conversion of spatial objects in essence. Specifically speaking, assign i(ek) to ic(gj) and set s(gj) to 0 if a pixel gj intersects with a generator ek. In addition, to(gj) is set to w(ek)/max⁡(w(Ei)) for a weighted SVT. It can be known that to(gj)∈(0,1], which determines the speed of distance transformation of pixel gj. tc(gj) is an accumulator of to(gj). In this function, define tc(gj)=to(gj). Figures 3(a) and 3(b) describe the variations of pixel properties for a weighted SVT after executing the functionPixelsAssignment().Algorithm 3:(a) PixelsAssignment() for an ordinary SVT. (b) PixelsAssignment() for a weighted SVT.
(a)
Input: a set of m generators Ei={e1,e2,…,em}, a set of pixels Gi={g1,g2,…,gz}
Output: a set of pixels Gi={g1,g2,…,gz}
Begin
for  j≔1; step 1 until  z  do
for  k≔1; step 1 until  m  do
if (gj∩ek≠{}) then
ic(gj)=i(ek)
s(gj)=0
endif
endfor
endfor
End
(b)
Input: a set of m generators Ei={e1,e2,…,em}, a set of pixels Gi={g1,g2,…,gz}
Output: a set of pixels Gi={g1,g2,…,gz}
Begin
maxweight = max(w(e1),w(e2),…,w(em))  %Get the maximum weight of Ei
for  j≔1; step 1 until  z  do
for  k≔1; step 1 until  m  do
if (gj∩ek≠{}) then
ic(gj)=i(ek)
to(gj)=w(ek)/maxweight
tc(gj)=to(gj)
s(gj)=0
endif
endfor
endfor
EndFigure 3
The core process of the subdivision for a raster layer of a weighted SVT: (a) three generatorse1, e2, and e3 within a 10 × 10 binary image, where e1 is a square with w(e1)=10, e2 is a line with w(e2)=6, and e3 is a point with w(e3)=4; (b) pixels assignment for e1, e2, and e3. A pixel gj (j=1,2,…,100) will be marked with a sign “tc(gj)/s(gj)” if it intersects with a generator, in which tc(gj) is the current transformation speed of the pixel and s(gj) is the status. Blank pixels are marked with “0/-1” in default. (c) The Manhattan distance transformation for e1, e2, and e3 for the first time. If tc(gj)<1, it continues to execute accumulation, else gj will propagate and s(gj) will change to 1. (d) Pixels update for e1, e2, and e3 for the first time. The state s(gj) of the pixel gj will change to 0 if gj has been assigned values yet has not executed distance transformation (s(gj)=-1). (e) The Manhattan distance transformation and pixels update for e1, e2, and e3 for the second time. (f) The Manhattan distance transformation and pixels update for e1, e2, and e3 for the third time.
(a)
(b)
(c)
(d)
(e)
(f)The functionPixelsTransformation() (Algorithm 4) is to create a raster Voronoi diagram or weighted Voronoi diagram via distance transformation. For an ordinary SVT, each pixel gj with s(gj)=0 will propagate in each loop in accordance with a structuring mask R, which can be a cross shaped mask (the Manhattan metric), a 3 × 3 square mask (the Chessboard metric), a disk shaped mask (the Euclidean metric), and so forth. Once a pixel gj propagates, its state s(gj) will change to 1, which means that this pixel will cease to be processed in the next loop. If gj’s neighbor x pixels rk (k∈[1,x]) own the same father node with gj (if(rk)=if(gj)) and have not been processed (ic(rk)<0), assign ic(gj) to ic(rk).Algorithm 4:(a) PixelsTransformation() for an ordinary SVT. (b) PixelsTransformation() for a weighted SVT.
(a)
Input: a set of pixels Gi={g1,g2,…,gz}
Output: a set of pixels Gi={g1,g2,…,gz}
Begin
for  j≔1; step 1 until  z  do
if (s(gj)=0)then
initialize R: a set of x pixels around gj
for  k≔1; step 1 until  x  do
if (ic(rk)<0  &  if(rk)=if(gj)) then
ic(rk)=ic(gj)
endif
endfor
s(gj)=1
endif
endfor
End
(b)
Input: a set of pixels Gi={g1,g2,…,gz}
Output: a set of pixels Gi={g1,g2,…,gz}
Begin
for  j≔1; step 1 until  z  do
if (s(gj)=0) then
tc(gj)=to(gj)+tc(gj)
if (tc(gj)≥1) then
initialize R: a set of x pixels around gj
for  k≔1; step 1 until  k  do
if (ic(rk)<0  &  if(rk)=if(gj)) then
ic(rk)=ic(gj)
to(rk)=to(gj)
tc(rk)=tc(gj)-1
endif
endfor
s(gj)=1
endif
endif
endfor
EndFor a weighted SVT, we use the propertytc(gj) to control whether a pixel gj with s(gj)=0 propagates in each loop. If tc(gj) is less than an established threshold, it continues to execute accumulation. Once it exceeds the threshold, gj will propagate and its state s(gj) will change to 1. In Algorithm 4, as the maximum of original transformation speed is 1, so the threshold is set to 1. If gj’s neighbor x pixels rk (k∈[1,x]) own the same father node with gj (if(rk)=if(gj)) and have not been processed (ic(rk)<0), the properties of rk will be assigned as follows: ic(rk)=ic(gj), to(rk)=to(gj) and tc(rk)=tc(gj)-1. It can be known from Algorithm 4 that a pixel with a higher original transformation speed owns a higher priority to execute distance transformation. For example, a pixel ga with to(ga)=1 will propagate every time and a pixel gb with to(gb)=0.5 will propagate every two times. From the point of view of vector space, it means that a generator with a bigger weight will dominate more area. Figures 3(d), 3(e), and 3(f) describe the first three steps of distance transformation for a raster layer of a weighted SVT and the variations of pixel properties.The functionPixelsUpdate() (Algorithm 5) is to update the status of pixels and calculate the parametercount. In each loop, if a pixel gj has been assigned values by a neighbor pixel (ic(gj)>0) yet has not executed distance transformation (s(gj)=-1), set s(gj) to 0, which means that this pixel will participate in the next distance transformation. Figures 3(c) and 3(d) show an instance of the functionPixelsUpdate() and the variations of pixel properties.Algorithm 5:
PixelsUpdate().
Input: a set of pixels Gi={g1,g2,…,gz}, count
Output: a set of pixels Gi={g1,g2,…,gz}, count
Begin
for  j≔1; step 1 until  z  do
if (ic(gj)>0) then
if (s(gj)=-1)then
s(gj)=0
endif
if (s(gj)=1)then
count ++
endif
endif
endfor
EndThe functionTreemapExport() specifies the output mode of SVTs: for each level set of generators Ei={e1,e2,…,em}(i=1,2,…,h), a level i set of pixels Gi={g1,g2,…,gz} that represents a raster ordinary or weighted Voronoi diagram for points, lines, and polygons is exported correspondingly. Pixels that have the same identifier will be converted to a vector ordinary or weighted Voronoi polygon Vi(j)(j=1,2,…,m) through a raster to vector conversion. Then, a vector file in shapefile format Vi with spatial coordinates and references can be obtained. Overlaying E1,E2,…,Eh with V1,V2,…,Vh, we can construct a final hierarchical layout suitable for GIS environment.


## 4. Examples

Four Treemap layouts shown in Figure4, respectively, use the data set with 200, 130, 100, and 130 generators that are randomly generated without spatial references at 4 hierarchy levels. Figure 4(a) is an ordinary SVT for points based on the Manhattan metric; Figure 4(b) is an ordinary SVT for lines based on the Chessboard metric; Figure 4(c) is a weighted SVT for polygons based on the Euclidean metric; Figure 4(d) is a weighted SVT for points, lines, and polygons based on the Euclidean metric. Different legend symbols represent different sets of generators. Border thickness expresses the different levels of cells. The coarser boundaries indicate a higher hierarchical level of cells in the Treemap layout.Figure 4
Different types of SVTs. (a) An ordinary SVT for points based on the Manhattan metric; (b) an ordinary SVT for lines based on Chessboard metric; (c) a weighted SVT for polygons based on the Euclidean metric; (d) a weighted SVT for points, lines, and polygons based on the Euclidean metric.
(a)
(b)
(c)
(d)We implemented the SVT algorithm in C# and used ArcGIS Engine (a complete library of embeddable GIS components) to read shapefile and execute conversions between vector and raster data. The hardware of our experiments is an Intel Pentium Dual-Core E5800 3.2 GHz and 4 G RAM, running under Microsoft Windows 7. In this experiment, the program is running in single thread mode using one core of the CPU. The computations of four layouts shown in Figure4 require 1.80 min, 1.88 min, 1.99 min, and 2.13 min, respectively. For many GIS applications, the speed is acceptable.To better visualize the spatial hierarchies in the real world, we use the SVT to express the spatial pattern of the population landscape as shown in Figure5, which is motivated by the research of Mu and Wang [25]. The point generators are abstracted as the locations of cities that are municipal level and above in China (342 cities in all, not including Zhoushan, Hong Kong, Macau, the Hainan Province, and Taiwan Province of China). The boundary is the inland border of China. They are, respectively, obtained from a point file and a polygon file in shapefile format at a scale of 1 : 100,000, that is, the Lambert projection-based maps.Figure 5
The population landscape pattern of urban hierarchy for China based on the Manhattan metric.According to [25], we only choose population as the weight of each city. The population data were obtained from theTabulation on the 2010 Population Census of the People’s Republic of China by Township. In China, cities can be divided into five categories based on the urban concentration of the population. They are “Mega” city, “Macro” city, “Large” city, “Middle” city, and “Micro” city. Their population sizes are “10,000,000 and above,” “5,000,000–10,000,000,” “1,000,000–5,000,000,” “500,000–1,000,000,” and “1–500,000,” respectively. As the proportion of “Middle” and “Micro” city is small (“Mega”: 13, “Macro”: 76, “Large”: 213, “Middle”: 19, and “Micro”: 21), we combined them with the 213 “Large” cities. Thus, an urban population hierarchy can be defined as in Table 1.Table 1
Urban hierarchy by population in China.
Category
Population size
The number of cities
Level
Mega
≥10,000,000
13
1
Macro
5,000,000–10,000,000
76
2
Large/Middle/Micro
0–5,000,000
253
3Using the SVT subdivision algorithm, we can get a spatial Voronoi Treemap that represents the population landscape pattern of urban hierarchy (Figure5). In Algorithm 1, the generators E={e1,e2,…,en} denote the cities in China and n=342. For each ek∈E, the unique identifier i(ek) is set to k, the level l(ek) corresponds to the value in field “Level” in Table 1, and the weight w(ek) is equal to the population of the city. V0 is the inland border of China.


## 5. Discussions and Conclusions

This paper presents an approach for the generation of SVTs. Contrary to the existent Voronoi Treemaps that are used to visualize hierarchical nonspatial objects, our proposed layout algorithm allows to create Voronoi Treemap visualizations for geographical objects with spatial coordinates and references, which can serve as a spatial data model to express urban hierarchies, organization structures, region differences, and so forth.The SVT approach accepts point, line, and polygon files in shapefile format, classifies generators into different groups according to their level values in their attribute tables, uses a vector to raster conversion to create an initial raster layer, and then generates raster images using distance transformation. Through a raster to vector conversion, layers of ordinary or weighted Voronoi diagrams in shapefile format can be generated to construct a Treemap layout, which can be applied in mainstream GIS software. Input generators and output Treemap layers can be stored together in geodatabase and flexibly change their styles. All GIS symbols and layout styles can be used to enhance the visual effect of Treemaps and to support the user in the perception and interpretation of the Treemap visualizations; for example, Figure4(a) uses star, square, triangle, and circle symbols to depict different levels of point features.The layout algorithm needs to loop through all generators one by one to generate an SVT, so the process may be relatively slow while facing massive input features. Because the major processing steps are raster-based, it is possible that an input generator does not have an output Voronoi polygon if that generator is very close to others and raster cell size is not small enough. This problem can be eliminated by reducing the cell size.In future work, the efficiencies and applications of the presented layout method will be studied extensively.



---

*Source: 787163-2015-07-29.xml*