DESIGN AND IMPLEMENTATION OF A WEB INTERACTIVE THEMATIC CARTOGRAPHY METHOD BASED ON A WEB SERVICE CHAIN

There is a tendency toward the creation of thematic maps on the web in the ongoing development of cartographic technology. However, automatically creating maps through the web and creating interactive web maps are two challenges associated with this field. To solve these problems, a web thematic cartography method based on a web service chain is presented here. Automated cartography is performed through knowledge-based web cartographic services, and interacting with the services is possible. The method is implemented in the construction of a urban thematic atlas in Shenzhen, China that is dedicated to supporting decision making for urban planning and public participatory thematic map making on the web.


INTRODUCTION
Thematic maps are used to represent spatial thematic information.With thematic maps, the spatial distribution of thematic information is intuitive; thus, such maps can provide assistance in visual thinking to the map user and are widely used in many research areas to facilitate decision making.However, creating thematic maps on a desktop is time consuming, and the map is not widely disseminated; thus, it is very difficult for the user to access the map.With the development of Web 2.0 technology, it is possible to create thematic maps on the web; thus, users in distributed environments will have greater access to maps to facilitate their research or daily work.The research of some experts in related fields has mainly focused on spatial thematic data visualization and web thematic cartography methods.
Some representative findings from the existing literature on spatial thematic data visualization are available.In interactive visualization, when designing visualization methods, according to Bertin's theory of symbolization, which includes six visual variables -shape, size, density, color, brightness, and orientation (BERTIN, 1967) -several visual variables, such as shape, size, and color, can be transformed into unique parameters such that the symbol can be interactively manipulated by changing the visual parameters.Experts have also shown interest in the basic rules of intelligent spatial thematic data visualization, which has been investigated by Andrienko (1999aAndrienko ( , 1999bAndrienko ( and 2002)), Dykes (1995Dykes ( , 1997aDykes ( , 1997bDykes ( and 2005)), Mackinlay (1986), Roth and Mattis (1990), Zhan and Buttenfield (1995), Dobesova and Brus (2011), and Zhang et al. (2008), according to whom these rules can be summarized into data that are based on characteristics, user goals, and visualization knowledge.Their research has laid the foundation for automated thematic data visualization.
Web thematic cartography has developed quickly with the help of web services.Andreas (2012) described a web mapping idea based on the World Wide Web services and a set of Open Geospatial Consortium (OGC) standards, such as Web Map Service (WMS); Jung and Shih (2005) introduced a web mapping method by operating the Geolinked Data Access Service (GDAS), Geolinking Service (GLS), and WMS, which are provided by the OpenGIS standards.In addition, Rex (2005) discussed preliminary web mapping services composed of a base map service and thematic data service, and Jern (2007) discussed numerous interactive web mapping and graphics visualization techniques, such as dynamic linking and highlighting, and also provided an interesting storytelling mechanism to enrich the information provided by web maps.Recently, Rautenbach et al. ( 2012) introduced a method by orchestrating OGC web services to produce a thematic map.MacEachren (1994) and MacEachren and Kraak (1997) probed into and further elaborated on the paradigm of web cartography, which includes three key elements: private map use (an individual generates a map for his or her own needs), direction toward revealing unknowns rather than presenting known facts, and high humanmap interaction (HARDISTY and ANTHONY, 2011).
The above-mentioned research work contributes mainly to automated data visualization, interactive map manipulation, and web mapping services.Developments in this field have been focused on web service-based thematic cartography.However, there are still limitations in the available research.First, there is a concept framework of a "Thematic Map Service" (REX, 2005), which is designed to represent the visualization of spatial thematic data, but the content of the web service is not clearly designed and achievement of the web service is not mentioned.Second, it is possible to create thematic maps with some existing standard OGC services (RAUTENBACH et al., 2012); however, a large number of customized programming schemes must be standardized by wrapping Web Processing Service (WPS) services, and the Styled Layer Descriptor (SLD), which is used to vary map styles, is not open to the user.Thus, such programming capabilities provide very limited functionality for the interactive manipulation and interoperability of thematic maps.To solve these problems, a thematic cartographic method based on a web thematic mapping service chain (WTMSC) was designed that utilizes powerful development web service chain technology.In the next section, the technological and cartographic knowledge base will be discussed, and then, a detailed presentation of the method is provided.

SOA and Web Service Chain
Service-oriented architecture (SOA) is a conceptual architecture that uses loosely coupled and interoperable web services in a distributed computing environment (GRANELL et al., 2010).Web service technology is typically applied to the interoperability of the exchange of information, such as data, functions, and software, among web environments.A basic web service should comply with two common web service standards: the web service description language (WSDL) and simple object access protocol (SOAP).WSDL is used to describe the interface, and SOAP allows messages to be sent and received by extended mark-up language (XML) format data files between web services (ZENG et al., 2011).In the GIS community, the OGC has defined several geospatial web services, such as web map services (WMS), web feature services (WFS), and web coverage services (WCS), many of which have become the web service specification in the GIS community (PERCIVALL, 2002).Web service-based GIS is currently very popular in the development of GIS systems (because a web thematic mapping program is a type of WebGIS system).A web service-based GIS typically has a well-defined input and output, which enable operational capabilities, and users do not have to utilize complex data structures and data processing in the web service.In such a system, users can access the GIS functionality freely to their demand, even under distributed circumstances.In some situations, there are many complex applications and a joint effort of several web services is needed to accomplish a task; the composition of web services that form a workflow chain is called a web service chain, or an extended use of web services.The web services in a chain must abide by some general rules.For example, the output of a former web service is supposed to share the same structure as the input of a latter web service (YUE et al., 2007) because once incompatible situations occur, the execution of the chain will be terminated and exceptions should be thrown out.In our approach, a web service chain called a WTMSC is constructed to visualize spatial thematic data.

Elements of Web Thematic Maps
Because web thematic maps are designed to be viewed on web pages and the bandwidth of the Internet is limited, it is important to know which elements are unique for a web thematic map or, in other words, the necessary elements that should be singled out to provide as much spatial information as possible.The web thematic map designed by Jern (2007) provides multimedia elements, including not only the thematic data layer and base map layer but also text information and audio information (storytelling).However, the web thematic maps produced by Jung and Shih (2005), Rex (2005) and Rautenbach et. al. (2012) only include such elements as the thematic data layer and base map layer.In this research, the thematic data and base map layers are found to be necessary but not sufficient elements of a web thematic map; some descriptive information is needed, so a legend layer is added.With text information and the symbol legend illustrated in the legend layer, the map cannot be misinterpreted.Although some multimedia information, such as audio and/or video in nature, could be helpful in enriching the map information, such information is very difficult to disseminate over the Internet and equally difficult to interoperate and manipulate.As a result, the web thematic map is designed with the elements of a base map layer, thematic symbolizing layer, and legend layer.

Knowledge Base for Automated Thematic Data Visualization
In this approach, user preferences and the relationship between thematic data characteristics and visualization will be integrated into the knowledge base that is utilized in automatic thematic data visualization.The details are described below.

User preference
User preferences are considered in the interactive visualization of spatial thematic data.In this approach, the following factors related to the user preference are investigated: • User knowledge background: The user knowledge background refers to the user's professional knowledge.Because the user may be an expert in cartography, may have certain knowledge in urban planning, or may be simply a layman customer, the user is categorized as either an expert user, domain user, or public user.For the experts, some complex analysis visualization methods are provided.For the domain user, the visualization methods that are related to their domain are provided.For the public user without any foundational understanding, fundamental visualization methods are provided.• Skilled with computer systems: Because this program is a web-based GIS system, the user's level of skill with the system is important.For a computer engineer, it is very easy to understand how to access the spatial thematic data and find the correct visualization methods; however, for an ordinary user who may be unfamiliar with systems, it is rather hard to find the correct way to use the program.Thus, there is a wizard available for the user that teaches them how to use the program to make thematic maps.The user only has to make small choices and fill tables, and the visualization will be accomplished automatically.• Personal information: Because personal information, such as age, gender, and area of interest, plays a crucial role in determining the preference of a person, these pieces of information are collected and stored as auxiliary information in designing the visualization methods.For example, for a young lady, a modern and warmer style is popular, whereas for an aged professional man, a traditional and cooler style is preferable.• Color preference: unique people have unique color preferences, and occasionally, it is rather difficult to identify the color preference of a certain group of users.Therefore, a list of typical color styles is provided to the users, and when the users design maps with this program, their choice color style will be recorded, which will contribute to the color preference of the users.

Relationship between data characteristics and visualization methods
The thematic data discussed in this paper contain three types of information: location information, such as a specific point or boundary; time information, which takes the form of a time unit, such as a year or month; and indicator information, such as population indicators.Based on the location information, thematic data are classified into point-based, polygon-based and space-series-based datasets.
• Point-based dataset: This type of dataset contains one specific geographical point with an (x, y) coordinate for locating the thematic result, and the thematic value is stored as a z value.This dataset is the basic data type of all datasets.• Polygon-based dataset: The polygon-based dataset contains a specific geographical polygon with a series coordinates (x, y, x1, y1…) for locating spatial data.The polygon is often used to describe the districts of a city, and this type of dataset is the one used most frequently in urban planning.• Space-series dataset: The space-series dataset contains a series of points with (x, y) coordinates, and the thematic result is located not on these points but in the polygons generated by these points, such as a Thiessen polygon or triangulated irregular network (TIN).The relationship between data characteristics and visualization methods is vital for intelligent visualization.An array of symbolizing methods for spatial thematic data is available in traditional thematic cartography.According to the data classification scheme, these methods are also classified, and the proper methods are selected for specific data.The methods used to visualize point-based datasets include pie symbols, bar symbols, pyramid symbols, scatter plots, and several other artist symbols; for polygon-based data, polygon-based thematic symbols and choropleth maps can be easily identified as the proper methods; for space-series datasets, TIN and contours are appropriate.The matches between data and the visualization methods are fetched by the experience of experts and stored as the basic knowledge for automated data processing and visualization, which is shown in Table 1.• Type: the ID of a thematic symbolizing method.
• Thumbnail: a thumbnail to illustrate the method.
• Name: a name for the symbolizing method.
• Dataset: the data classification discussed above, including point, polygon, and space-series datasets • Time: the time attributes of a spatial thematic data; single refers to a time point, such as the year 2008, whereas multi refers to multi-time points, such as the years 2008, 2009, and 2010.• Indicator: the indicator value of a spatial thematic data; single refers to one indicator value, such as the "House Area", and multi refers to multi-indicators, such as "House Area, Commercial Area, Factory Area".Using the above paragraph, it is possible to decide which symbol is suitable for the specific thematic data that the user wants to visualize on a thematic map.Which data are visualized is determined based on the user preference and restricted by the characteristic of the thematic data: the type of dataset to which the data belongs, the number of time attributes, and the number of indicator values in the data.

Web Thematic Mapping Service Chain
Following the above analysis of the technology and cartography knowledge base is the design of the web thematic mapping service chain.The WTMSC is comprised of four sub-services: a Symbolizing Service (SS) used to visualize spatial data to provide a spatial-related thematic symbolizing layer; a Base Map Service (BMS) to provide the geographical layer (base map); a Legend Service (LS) to describe the map and the legend of the symbolizing layer; and an Integrating Mapping Service (IMS) to integrate the symbolizing layer, base map layer, and legend layer to produce a complete map.The process of a WTMSC can be described as follows: 1) Thematic data are fetched from the data base; 2) The data are transformed into visual variables and then processed by the SS, which produces the symbolizing layer; 3) A geographical layer is produced by the BMS according to the boundary of the symbolizing layer; 4) A thematic symbol legend layer is produced by the LS according the thematic data and some metadata.
5) The map elements are integrated by the IMS to produce a complete thematic map.
The entire process is illustrated in Figure 1.

Base Map Service (BMS)
Space elements of spatial data, such as points, polygons, or space series, are described with a series of geographical coordinates.A proximity boundary of a map can be obtained by calculating the coordinates.The proximity boundary helps to alleviate the burden of requesting the base map from an online Geo-Data source, such as a WMS, ARCGIS REST Service, or any other map service.The response to the request is fetched as a base map layer; it is an image map URL.A typical base map service defined by the program could be described as follows: http://localhost:7001//szOnlineCarto/WMSServer?VERSION=1&REQUEST=1&LAYERS=12 s01&STYLES=1&CRS=1&BBOX=79099.55629545472,11019.068422182201,182908.0751697845 7,55784.08027877053&WIDTH=1345&HEIGHT=580&FORMAT=png The parameters are the same as a standard WMS, which includes VERSION, REQUEST, LAYERS, STYLES, CRS, BBOX, WIDTH, HEIGHT, and FORMAT.
The BBOX is the geographical boundary of Shenzhen, China.The services are defined below.
2.4.2Symbolizing Service (SS) Spatial data with information of space, time, and indicators can be transformed into visual variables.Bertin's theory of symbolization includes six visualizing variables -shape, size, density, color, brightness, and orientation (BERTIN, 1967)some of which (shape, size, and color) are made into unique parameters in visualization methods.These parameters can then be interpreted by a Symbol Engine of the SS to visualize the data as a symbolized layer.
The SS is similar to a WMS in structure, whereas the parameters are defined according to Bertin's theory.It is not advisable to depict more than one thematic variable on a single map, but in this case, the theory is extended by introducing multi-thematic variables with multi-visual values.For example, if there are two thematic variables, for each thematic variable, the visual variables are defined separately, such as the color parameters, which will contain two red, green, and blue (RGB) values, in accordance with two thematic variables.
To demonstrate how the SS works, a typical SS could be requested as follows: In this request, http://localhost:7001//szOnlineCarto/WCSServe is the server address in the Internet, followed by 10 parameters in the web service, which can be interpreted in order as follows: • WC: the geographical boundary of the thematic symbolizing layer, similar to the BBOX of a WMS.

•
DC: the size of the output thematic map, similar to the WIDTH and HEIGHT of a WMS.

•
Data: the name of the spatial thematic data, typically an XML-based spatial thematic data source.

•
Type: the ID of the symbolizing method, typically expressed as an integer number.For example, 10 represents a pie symbol in our system, and the size of the symbol represents the value of the data.For example, a larger pie area stands for a larger data value, and a larger bar height stands for a larger data value."Type" has a connection with the visual variables "shape" and "size"..4969991903,13747.789911237 436,183527.13446604897,53044.15282892762&DC=0,0,1366,511&Data=V$JIAN_ZHU_M&Ty pe=10&Time=2008;&Spatial=1&Color=102,255,51;255,0,0;0,0,255;&Field=HOUSE_DEN;IND US_DEN;TRADE_DEN &Transparency=0.6&Orientation=horizontal of the symbol; in a map of a larger scale, the size of the symbol also appears larger.

•
Field: the indicator name of the spatial thematic data, which points to the data value of the indicator (a single or multi-indicator is supported).

•
Color: the RGB color of the indicator, which is used to symbolize the data and is related to the visual variable "Color".If there are additional variables, the "Color" parameters will contain more values.For example: Color=102, 255, 51 represents one thematic variable; Color=102, 255, 51; 255, 0, 0 represents two thematic variables.

•
Transparency: the transparency of the thematic symbolizing layer, which is useful when the features should not be blocked in a geographical layer.

•
Orientation: the orientation of the symbol, which is related to the visual variable "Orientation".The request will be interpreted by the SS engine on the server side, and a thematic symbolizing layer will be relayed as the output.

Legend Service (LS)
The LS is used to generate a legend layer to describe the map; it provides some auxiliary information, such as text information (i.e., map title, units of the data) and the thematic symbol legend.A typical legend service could be requested as follows: The parameters of the LS are the same as those of the SS with the addition of a parameter called "MetaData", which is used to fetch the XML format description data for the legend metadata information.

Integrating Mapping Service (IMS)
The IMS is an interface used to request the previous three web services, as the geographical layers, symbolizing layers, and legend layers are generated separately.At the end of the mapping, the IMS is used to integrate these layers and produce a complete map.Because the geographical and symbolizing layers are constructed with the same coordinate system, these two layers can be overlaid.The legend can also be added to the layer, with the position of the legend adjusted to the map content.

Execution of the WTMSC
The execution of the WTMSC is illustrated in Figure 2. As shown in Figure 2, there is a web portal for the user to access the WTMSC, and the spatial thematic data are an XML format file with the spatial coordinates, the time value, the indicator value, and some metadata.The user, after selecting a data source, will be able to access the BMS, SS, and LS.Then, the Base Map URL, Thematic Symbolizing Layer URL, and Legend URL will be displayed, and with these URLs, a request will be made for the IMS.Finally, a complete thematic map will be generated.The execution of the WTMSC is driven by the user interaction, but it will work automatically after the thematic data source is assigned.The resulting output map is also an image URL.Furthermore, the parameters of each map service are open to the user, and the service is accessible with a URL simply through a common Internet browser.

IMPLEMENTATION
Based on the web cartography method described above, a web thematic mapping program can be developed; some typical applications are provided below.

Fast map making for decision support in urban planning
Using this program, web thematic maps can be automatically produced, and the dissemination of these maps is made faster, with significant time saved in map design and publishing and efficiency greatly improved.Based on this program, an online atlas for presenting spatial thematic information of Shenzhen greatly facilitates urban planning and management and has been built into the Spatial Information of Shenzhen.(The website was tested under IE7.0 from the platform website of "szgeoinfo".)There are 13 themes in the atlas consisting of 113 maps in total, all of which are the outputs of this program.After the thematic data resources are defined, all of the work can be completed in no more than one week, representing a much shorter process than when using traditional map-making methods.The atlas provides overview information of Shenzhen and makes it very convenient for urban managers to fetch the useful information to support decision making.Figure 3 shows the web portal of the online atlas; there are many themes of maps on the web page, and each theme is illustrated with a map with a certain thematic symbol that is automatically generated using this program.With the program and the online atlas website, urban managers who are from different departments in a distributed environment can conveniently search the mapping results and obtain straightforward information about spatial distributions.If the results available on the website are insufficient, spatial thematic data can be accessed from other resources, new mapping results can be produced using the program, and the outputs can be published on the website.The program and online atlas website have been implemented in daily urban management in Shenzhen and became a subsystem to the Shenzhen geo-information platform.In contrast to traditional map making, the program is a promotion for spatial data visualization that is not only employed by urban managers but also appreciated by citizens as a window to understanding urban development in Shenzhen.One typical application in decision support is the house building density distribution map.The density of buildings in urban areas is important thematic information for urban planners; when the density of a specific area is too high, there will be heavier traffic and citizen mobility will be restricted.Therefore, urban planners must be able to acquire building density information in real time; when they find the density of a specific urban area is too high, no new buildings should be allowed to be built there.In contrast, when the density of a certain urban area is low, the creation of new buildings could be permitted.Figure 4 is an illustration of the visualization and exploration of the house building density distribution of Shenzhen.As indicated in Figure 4, which shows the distribution of house building density in Shenzhen in the year 2008, when the index of the house building density is higher, the color is darker.In Figure 4, there is a legend box on the right (the image in the legend box is the output of the LS); the main map is the overlay of the images from the BMS and SS.An urban planner can easily access the map from a common IE browser.With the map, the urban planner may find that the house building densities of the Luohu District and Futian District are high (index: 0.39-0.58)and that the land area of the districts are small, whereas the densities of the Longgang District (index: 0.06-0.1)and Baoan District (index: 0.1-0.22),which occupy a rather large land area, are still low.Therefore, house building projects may be planned in these two districts.
Another typical application in decision support is the pyramid map for the population.Census data are a vital part of urban spatial thematic data and a crucial element of citizen-related decision making.Figure 5 is a pyramid map and presents the population of males and females of different age groups, with the color orange representing females and the color blue representing males.The map is used in the prediction of population growth.From the map, an urban planner may find that the age groups of 15-44 account for the majority of the entire population and that the percentage of the population over the age of 70 is very low, which implies that Shenzhen is a city with many young people and that its economy will enjoy demographic dividends.The percentage of babies in the population is also not high, which means that the birth rate is very low and thus that in the foreseeable future, the population of young people might decline, potentially affecting the labor force.

Public participating web thematic mapping
With the WTMSC, creating thematic maps is possible even for members of the public with little map-making knowledge.The thematic mapping process in the program is designed to be user friendly and equipped with an easy-to-use wizard.There are five general steps: 1) submit the user preference information; 2) input a map name for the thematic map; 3) select spatial thematic data online; 4) confirm the thematic information; and 5) acquire the thematic map URL.In this process, the users only need to choose a spatial thematic data source and type in a name for the map.A URL of the WTMSC based on the user classification and intelligent visualization methods (discussed in Section 2.3) will be automatically returned to the user, who can preview the results in IE or another browser.It is clearly possible and convenient for the public to participate in web-based thematic mapping.

CONCLUSION
In this approach, an online thematic cartography method is introduced for web thematic cartography.Web service chain technology is introduced, and the elements of web thematic maps are investigated, followed by the suggestion of a web thematic mapping program based on the WTMSC.The WTMSC is designed by chaining together with a BMS, SS, LS, and IMS.The correspondent web services could be accessed through standard URLs with defined parameters, which are used to produce the base map layer, thematic symbolizing layer, and legend layer, with all of the URLs integrated to produce a complete thematic map.The parameters of the URL of each web service are open to individual users; thus, the web service can be conveniently manipulated through a common internet browser.
Compared with the other currently available web cartography methods, the advantages of a WTMSC-based method can be summarized as follows: the method is more open to the public, the mapping flow is smooth, the parameters of the mapping services are accessible to the user, and users can conveniently interact with the program and acquire intuitive spatial thematic information.With the WTMSC, the mapping of spatial thematic data can be produced automatically in a distributed environment, which minimizes the time consumed in data visualization and mapping and improves the efficiency of the thematic data mapping.Because urban spatial thematic data continuously change with time and are dynamic, new maps can be regenerated as soon as the data are updated.Furthermore, the WTMSC shares a similar structure as the OGC standards, which are widely used in the application of web maps, thus significantly facilitating the future standardization of web thematic mapping.
There are also some limitations to this method.The first is concerned with the resolution of the output map; because the program is developed in Java and the default output resolution of a Java application is 72 dots per inch (DPI), all of the maps generated by the program are of a 72-DPI resolution.However, users may request a larger map to acquire a map of higher resolution.For example, a map of 2048*1536 pixels has a higher resolution than one of 1024*768 pixels.As spatial analysis-powered mapping is a trend in the development of web thematic mapping, the functionality of spatial thematic data analysis also must be improved, and more data models for spatial thematic data analysis must be added to this program.Fortunately, many of these models are available in MATLAB, GEODA, or ARCGIS, and future efforts are expected in extracting data models from different sources and integrating these models into this program.

Figure 1 -
Figure 1 -Process of the web thematic mapping service chain.

Figure 2 -
Figure 2 -Execution of the web thematic mapping service chain.

Figure 4 -
Figure 4 -Map of the housing density distribution.

Figure 5 -
Figure 5 -Pyramid map of the population.

Table 1 -
Relationship between data characteristics and visualizing methods.
In Table1, there are 30 typical thematic cartography symbols.The header of the table is described below.