Section 4. Finally, Section 5 draws conclusions and presents
future work.
2. SPATIAL ANALYSIS IN XML-BASED WEBGIS
XML/GML/SVG-based solutions have been shown to be a
promising approach for building WebGIS. In these solutions,
GML is used as a coding, storing and transmitting standard of
spatial data on server sides, while SVG is considered as a
rendering tool for displaying spatial data on browser sides.
The workflow of spatial analysis includes four steps (Wu,
2002): 1) define the goal and evaluation criteria; 2) represent
the needed spatial dataset; 3) carry out spatial querying and
analysis with GIS tools; 4) appraise and explain results. Steps 1
and 4 require domain knowledge and are mainly carried out by
domain experts. For Steps 2 and 3, GIS tools are needed to
support/assist human-computer interaction. In order to provide
spatial analysis in XML-based WebGIS, methods to support
and assist Steps 2 and 3 are proposed in Huang et al. (2011a).
Specifically, for Step 2, SVG/GML-based spatial information
representation models which can be used to represent the
needed spatial datasets in SVG (browser sides)/ GML (server
sides) are designed. Furthermore, for Step 3, some spatial
operators and a spatial extended Structured Query Language
(SESQL) are implemented to support spatial query and analysis
directly on spatial datasets represented in SVG/GML.
2.1 SVG/GML Based Spatial Information Representation
SVG is developed primarily as a rendering tool for 2D graphics.
However, spatial information has a particular way in
representing and organizing spatial features and their
relationships (such as hierarchical structure of map - layer -
spatial object, spatial attributes vs. non-spatial attributes). To
represent the needed spatial dataset in SVG, a model
considering the characteristics of spatial information is
proposed in Huang et al. (2011a). In the model, we use <svg>
clement to represent Map (the dataset), and use viewBox
attribute to represent its bounded range. Layer is represented as
<g> clement. Point, Curve, Surface are represented as
<circle>, <path>, and <path>, respectively. <g> clement is
also used to represent the Multipoint, Multicurve, Multisurface
and Multigeometry. Both spatial and non-spatial attributes of
spatial objects are represented as corresponding SVG elements’
attributes. In the model, if B is PART-OF A, B is represented as
a child element of A. For example, Layer is PART-OF Map, so
<g> clement which represents Layer is a child element of
<svg> element which represents Map.
Similarly, a GML-based spatial information presentation model
is designed (Huang et al., 2011a). With these models, the
needed spatial dataset can be effectively represented in both
server (GML) and browser (SVG) sides. An algorithm is also
proposed to losslessly covert GML-based dataset to SVG-based
dataset, and vice versa.
2.2 Spatial Operators and Spatial Extended SQL
In order to support spatial query and analysis directly on spatial
datasets represented in SVG/GML, Huang et al. (2011a) design
some spatial operators to access spatial attributes, calculate
topological relationships, and perform geometrical operations.
Five types of operators are introduced: attribute access
operators (GeometryType, Centroid, Length, Area, and
Envelope), spatial topological operators (Disjoint, Touch,
Crosses, Within, Overlap, and Contain), spatial order operators
(East, East South, South, West South, West, West North,
North, and East North), spatial metric operators (Max Dist,
Min Dist, and Mean Dist), and geometrical operators
(Intersection, Union, Difference, and Buffer).
In Huang et al. (2011a), these five types of spatial operators are
then integrated into a spatial extended SQL (SESQL), which
can be used on both server and browser sides for spatial query
and analysis on GML and SVG. For example, a query of “list
cities which are crossed by river ‘R1”” can be implemented as
the SESQL sentence “select city.id from city, river where
river.id='R1' and crosses (river.d, city.d)=true”. The only
difference in applying SESQL for spatial analysis on SVG and
GML is the implementation of the SESQL compiler.
3. LOAD BALANCING SPATIAL ANALYSIS
With the above models and methods, spatial analysis can be
easily provided in XML-based WebGIS. This section focuses
on designing the load balancing middlewares to distribute a
spatial query to cither server or browser sides based on its cost.
For each spatial query, load balancing middlewares compare the
costs of server-side execution (Cyne) and browser-side
execution (Cyowe 1f. Cou i$ less than. Cis execute the
query on the server, and send the result data to the browser.
Otherwise, send the input data to the browser, and carry out the
query on the browser. The cost of a spatial query includes
computational costs (execution of the query) and network
transmission costs (input/output data of the query). As a normal
PC's processor performance has been drastically improved, the
difference in computational costs between server and browser
sides becomes less significant for most of the spatial queries.
Therefore, the difference between Czerver ANA Chrowser Mainly
depends on the network transmission cost. Our discussions
below will focus on comparing the network transmission cost.
In our former work Huang et al. (2011b), a simple solution,
which employs a very coarse granularity (by layers) for
organizing and transmitting spatial data, was proposed to the
load balancing middlewares. This article will improve the
former work on the following aspects: using a finer granularity
(by spatial objects), and identifying more flexible and precise
decision rules for distributing spatial operations.
3.1 Load Balancing Middlewares
In order to compare network transmission costs and distribute
spatial operations, a browser-side middleware and a server-side
middleware are designed. Figure 1 shows the architecture.
Server side — Browser side
GMLdataset| | SVG dataset | | HTML interface
| GML dataset | **" | i :
|
r — T sESQL Compller or SVG
| |
|
SESQL Compiler for GMI | Internet |
| | —M— [7 Decision-maker
| ||
| Decision-maker | |
| | | T7 sVGIGML translator
| | |
GML2SVG translator | Cache structure
| ——— — Server-side middleware — | Browser-side middleware
Figure 1. Architecture of the load balancing middlewares
311 Br
middleware
SVG2GML
The SESOI
analysis for
is employec
The cache :
the browse
tasks show
operations.
transmitting
unit of orga
is the data s
Class cac
{
String s
ArrayLi
//w
Bool bE
//si
//lay
Bool bA
/lare
}
ArrayList
In the abc
bAllTransm
fact: an “ex
which shoul
an importar
layer is invo
The decisio.
objects) fro:
sentence by
all the need
examining t
sends the re
312 Ser
includes an
and a decisi
translate GI
responsible
middleware,
Spatial query
the network
3.2 Decisio
The general
execute a sp
Side executi
execution («
When design
Server-side's