- Integration with WFSs and other WMSs
- Implementing as Web Services
- Capability-Based WMS Federations
- Performance issues with archived data access and rendering
13. Why did you implement GIS services in Web Services principles? What is the gain of extending OGC GIS as Web Services?
Web Services give us a means of interoperability between different software applications, running on a variety of platforms. A Web Services support interoperable machine-to-machine interaction over a network.
Distribution: It will be easier to distribute geospatial data and applications across platforms, operating systems, computer languages, etc.
Integration: It will be easier for application developers to integrate geospatial functionality and data into their custom applications.
Infrastructure: The GIS industry could take advantage of the huge amount of infrastructure that is being built to enable the Web Services architecture – including development tools, application servers, messaging protocols, security infrastructure, workflow definitions, etc.Easy to extend: Web Services have lots of specifications. By using any configuration of these specifications we will make our implementation more secure, more robust and fault tolerant as Web Service specs improve themselves.
14. OGC introduces capability concept to describe services. What are the differences between WSDL and capability?
WSDL is Web Service Description Language. Web Service is software that makes services available on a network using technologies such as HTTP, XML and SOAP. Web Service enables loosely coupling of services and interoperability. WSDL describes Web Services’ service functionality in operations and messages. WSDL enables access to functions through describing data encodings, location and communication protocols WSDL enables client to invoke the service’s operations through generating of stubs and skeletonsSO, Web Services are service based, in contrast capability is service+data related. Below figure shows the WSDL structure roughly with fundamental tag elements.
See the capability structure represented with its main tag elements in FAQ for Users section Q12.
15. OGC introduces capability concept to describe services. What is the difference between metadata and capability?
Metadata is data describing data. Data might be paper, article, image, sound, spatial, temporal etc. To give an example, suppose data is article, so metadata might be consists of “author”, “title”, “subject”, “source type”, “format” and possibly more. Metadata enables describing and sharing information between different data sources and applications.
SO, metadata is data based, in contrast capability is service+data related.
Here is a sample metadata describing a resource created by merging Dublin Core in RDF.
In order to get better view of the figure, please click on it.
The Web Feature Service starts processing user requests by extracting the database query from the request (encoded as a GML Filter – see below figure) and uses this to construct a corresponding MySQL query. The results of the database querying process are used to create a GML FeatureCollection which usually contains multiple features.Sample query “getFeature” encoded in XML (WMS sends to WFS to get feature data):
WMS uses basic WFS services. These are getCapabilities, describeFeatureType, and getFeature. Invocation is done through client stubs created at the WMS side according to WFS’s WSDL file before run-time. Before invocation WMS also sends a getCapabilities requests to WFS to learn which feature types WFS provides and what operations are supported on each feature type. When WMS receives any getMap or getFeatureInfo request, it creates a getFeature (see the figure in previous question -16-) request and sends it to WFS. As a response WFS sends back the set of result features meeting the search criteria to WMS as a GML encoded in XML. In case of using streaming WMS, the result feature set is returned in streaming through NaradaBrokering messaging middleware in the form of byte arrays. In case of using pure Web Service version the result set is returned as XML document in the built-in format
18. Can you give a sample “getCapabilities” request for Web Map Server?
WMS receives getCapabilities request in below format and returns its capabilities listed in Q12.
19. Can you give a sample “getMap” request for Web Map Servers?
20. Can you give a sample “getFeatureInfo” request for Web Map Servers?
WMS receives getFeatureInfo request and returns content of the feature data falling in close neighborhood (small bbox) of the clicked point on the map. Return type is mostly html or text.
21. Why do you prefer using streaming data approach through NaradaBrokering ?
In case of sending the result GML set in the form of string causes some problems when the GML is larger than some amount of size. Since the WFS returns the resulting XML document as an
22. How does data streaming from WFS to WMS work to display a scientific data?
The clients make the requests with standard SOAP messages but for retrieving the results a NaradaBrokering subscriber class is used. Through first request to web service getFeature, WMS gets the topic (publish-subscribe for a specific data), IP and port on which WFS is streaming requested data. Second request is done by NaradaBrokering Subscriber. Even whole data is not received by WMS; WMS can draw the map image with the returned science data. This depends on the WMS’s implementation.
23. In order to get further information about the feature data displayed on the map, I selected “i” map tool and clicked on the feature data on the map and saw the content data displayed in a pop-up window. How does it work?
This is done through invoking “GetFeatureInfo” interface of WMS. GML is consists of content and presentation parts. WMS’s “GetFeatureInfo” interface enables displaying of content part of the data falling in a small area. This small area is around the point that user defines by clicking on the map and formulated by WMS Client as bbox and embedded in getFetatureInfo query. Area calculation in bbox changes depending on the zoom level. If you can’t get any result you should change your resolution level by zoom-in or out. When WMS get GetFeatureInfo, it creates getFeature request and sends it to WFS. Upon receiving returned GML, it extracts the content part (all but geometry elements) and converts it to HTML by using deployed XSLT and XSLT machine. It then returns HTML file to the client. The returned HTML document’s format is defined in XSLT.
24. How do you convert feature data into HTML?
When WMS get GetFeatureInfo, it creates getFeature request and sends it to WFS. Upon receiving returned GML, WMS extracts the content part (all but geometry elements) and converts it into HTML by using deployed XSLT and XSLT machine. It then returns HTML file to the client. The returned HTML document’s format is defined in XSLT.
25. How do you transfer and display large amount of scientific data (such as 60MB) in XML format?
In order to increase the performance we use innovative techniques. Regarding the transfer of large data sets see my explanation in Q21 and Q22. Regarding the parsing and rendering the returned GML, we use Pull Parsing technique (see Q26).
26. Why do you use pull parsing? What are the advantages over DOM and SAX parsing techniques?
In case of using pull parsing, the parser only parses what is asked for by the application rather than passing all events up to the client application. The pull approach of this parsing model results in a very small memory footprint (no document state maintenance required – compared to DOM), and very fast processing (fewer unnecessary event callbacks - compared to SAX).
Pull parsing does not provide any support for validation. This is the main reason that it is much faster than its competitors. If you are sure that data is completely valid, or if validation errors are not catastrophic to your system, or you can trust validation on the server, then using XML Pull Parsing gives the highest performance results.
Since we know that returned data is GML and know all possible tag names of the possible geometry elements, it is very advantageous using pull parsing.
XML Pull Parsing Web Site: http://www.xmlpull.org.
Please see the below article where XPP2 document model is compared with other leading Java based XML parsing implementations.
27. How do you convert GML to SVG?
We convert GML to SVG by using XSLT.
28. How does WMS send the map images to the requester (WMS Client)?
There two ways one is a common pure OGC approach through HTTP and other is through SOAP messages using client stubs for the getMap interface.
In case of using HTTP, result is sent to client through java’s servlet classes. For example result is written to client port by using HttpServletResponse’s java.io.PrintWriter object. Client does not need to write any client stub or anything. He just put the URL on the web browser in a correct format defined in OGC specifications, and gets the map on the browser.In case of using SOAP, WMS returns maps in image MIME types such as image/jpeg, before returning WMS converts maps into javax.activation.DataHandler object and attaches it to SOAP message. Client needs to create stubs before runtime in order to invoke Web Service interface of “getMap” by using online WSDL file of the WMS.
29. How do you create map images from the GML data after getting it from WFS? And, how do you overlay vector data from WFS over another layers coming from other WMSs?
There are twp possible options to create a map from the WMS point of view. One is creating SVG first from the GML through XSLT and converting SVG to any image type by using java libraries. Another is extracting geometry elements by using Pull parsing technique and drawing and displaying the map by java Image object. From our experience and performance tests we figured out that second approach has higher performance results then the first approach.
Web Map and Feature Services cooperate to create map images. XML-represented geographical features obtained from Web Feature Services are converted by Web Map servers into images using matrix-pixel (raster data), or points, lines and polygons (vector data). The basic operations related to mappings include discovering the physical address of the data providers, transferring the data from data servers and rendering it to create a map.The figure below helps to explain a few more questions here (Ex. Q17, Q28 and Q30). Information Service (IS) in the figure is not completed exactly. Currently, we read the addresses of WFS and other Map services providing requested data from the WMS capability file. In the future, we plan to use any Information Service completing the architecture illustrated below.
In order to get better view of the figure, please click on it.
30. How does WMS provide services through two different protocol in your implementation, one is over HTTP and other as Web Services?
The difference of these two is at the interface level. I have written a request handler for both protocols. Request handlers get the request (in case of Web Services, they are structured XML format – getMap, getFeature or getCapabilities) and parse and extract all the parameters. After having request name and related parameters, remaining jobs are all handled through the same classes and handlers.