Final Report Google Summer of Code 2018 - GarimaNatani/WebWorldWind GitHub Wiki

NASA-ESA WebWorldWind;Support for WFS Project

  • Author : Garima Natani
  • Mentor 1 : Jakub Balhar
  • Mentor 2 : Gabriele Prestifilippo
  • Organization : OSGeo, NASA WorldWind

Abstract

OGC Web Feature Service allows a client to retrieve and update geospatial data encoded in Geography Markup Language (GML) from multiple Web Feature Services. WFS Server supports various operations like 'Get Feature', 'Describe Feature Type', 'Lock Feature' and 'Transaction' Operations.

Transaction operation is an optional operation which allows the feature instances and their properties to be updated or deleted and it can also be used to insert new features. Each transaction will consist of zero or more Insert, Update, and Delete elements, with each transaction element performed in order. The Transaction operation request will contain transformation operations like Create, Update and Delete and web accessible feature instances in which operations need to be applied. When the transaction will complete, a web feature service will generate an XML response document indicating the completion status of the transaction.

In this project, classes are created which supports Web Feature Service[WFS] operation like 'Get Capability', 'Get Feature' and 'Transaction' Operation by using WFS standard request and response. It also supports parsing of response and creation of Create, Update and Delete requests of the transaction operation by providing shapes as an object.

The state of the art before GSoC2018

Web WorldWind is a free, open-source virtual globe for web pages. Written in JavaScript, Web WorldWind enables web page and application builders to quickly create interactive visualizations of geographic information on an interactive 3D globe or 2D map. Web WorldWind provides an API that enables JavaScript programs to control every detail of visualization and interaction. This can be Used to embed a globe in a web page or create various application. Web WorldWind runs on all major operating systems, desktop and mobile devices, and web browsers.

Web World wind provides facility to display and interact with data. It provides interactive features such as shapes and paths, as well as standard protocols developed by the OGC (Web Coverage Service, Web Map Service). Before GSoC 2018, Web Feature Service and its operations were not supported.

The addition that my project brought to the software.

  • With the code that I created, 'Get Capability' operation request and response parsing of Web Feature Service can be done for versions 1.0.0, 1.1.0 and 2.0.0
  • With the Code that I created, now it is possible to use 'Get Feature' and 'Transaction' operations of Web Feature Service, as parsing of response is supported
  • Creation, updation and deletion operation of the Transaction operation request XML can be created on providing shapes, schema and feature type as input
  • After selecting feature from the feature list, Vector Layer features can be displayed on the 3D Globe or map

Changes through this project:

Following classes are created

Class Name Description Karma Test file
WfsCapabilities.js This class takes 'Get Capability' response XML and parsed all elements. Version 1.0.0 1.1.0 and 2.0.0 of 'Get Capability' response parsing is supported. wfsCapabilities.test.js: This file covers test cases of various scenario like parsing different versions and different elements of the response.
WfsGetFeature.js This class takes 'Get Feature' operation response XML as a input and parse various elements. getFeature.test.js This file covers test cases of different type of 'Get Feature' response (Multipolygon, Multisurface) and testing of various elements of request
WfsTransaction.js This class is used to parse transaction operation response wfsTransaction.test.js: This file covers tests for the transaction response parsing
InsertXmlBuilder.js This class is used to create element of insert request for transaction operation transactionInsDelUp.test.js: It covers test cases for creating insert XML. It takes shape, schema and the feature to be modified
UpdateXmlBuilder.js This class is used to create update request for transaction operation transactionInsDelUp.test.js
DeleteXmlBuilder.js This class is used to create delete request for transaction operation transactionInsDelUp.test.js
ShapeTransformer.js This class take shape as an input and return its type and coordinates. shapeTransform.test.js: This file covers tests for shape to type and coordinate conversion.
WfsService.js To create 'Get Capability' request and then parse response It is used by other class
WfsGetFeature.js This is the example of 'Get Feature' layer display on the globe WfsGetFeature.html: HTML file used to display 'Get feature' Layer response on globe
Wfs.js and Wfs On passing web feature server Url, it displays list of features supported by that server. On selecting a particular feature from the list it creates 'Get Feature' Url and will send to request to server. 'Get Feature' Response will be parsed and displayed on the 3D Globe. Wfs.html File to test 'Get Feature' request builder and display its response on the globe or map
WfsUrlBuilder.js This class is used used to build 'Get Feature' request Url buildUrl.test.js Test for 'Get Feature' URL builder

Below files are also updated

Below are sample xmls used for testing

Link to commit history

All the changes made by me during GSoC 2018 can be followed through the below link, which redirects to commit history. Commit History

Link to Wiki and Repository

What Left?

Classes are created that can create a request by passing shape as the object. To improve functionality shape object can be passed by drawing shape on the globe.

Future Scope:

Below Operations of WFS can be implemented by drawing a shape on the globe.

  • GetPropertyValue
  • GetFeatureWithLock
  • CreateStoredQuery
  • DropStoredQuery
  • ListStoredQueries
  • DescribeStoredQueries