International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XXXIX-B4, 2012
XXII ISPRS Congress, 25 August - 01 September 2012, Melbourne, Australia
416
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 arc 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. (201 la).
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) arc designed. Furthermore, for Step 3, some spatial
operators and a spatial extended Structured Query Language
(SESQL) arc 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. (201 la). In the model, we use <svg>
element to represent Map (the dataset), and use viewBox
attribute to represent its bounded range. Layer is represented as
<g> element. Point, Curve, Surface are represented as
<circle>, <path>, and <path>, respectively. <g> element 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> element which represents Layer is a child element of
<svg> clement 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. (201 la) 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, WestSouth, West, West_North,
North, and East_North), spatial metric operators (MaxDist,
MinDist, and Mean Dist), and geometrical operators
(Intersection, Union, Difference, and Buffer).
In Huang et al. (201 la), 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=’Rl’ 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 either server or browser sides based on its cost.
For each spatial query, load balancing middlewares compare the
costs of server-side execution (C server ) and browser-side
execution (C browser ). If C server is less than C browsen 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 C sen , er and C browS er 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.
Figure 1. Architecture of the load balancing middlewares