WMS Inspector - FOSS4G 2010

download WMS Inspector - FOSS4G 2010

If you can't read please download the document

Transcript of WMS Inspector - FOSS4G 2010

WMS Inspector:a Firefox add-on with tools for working with Web Map Services

Adri [email protected]://amercader.net

Hi everybody,My name is Adri Mercader, I'm a geospatial integrator and developer, and I would like to introduce you the WMS Inspector project.First of all, I would like to thank the organization of the FOSS4G for giving me the opportunity to do this presentation today, and obviously all of you for being here today.

< DISABLE APPEARANCE EFFECTS >

Thanks to

http://www.geodata.es

The presentation will be divided in the following sections:In the first place, we will see what the WMS Inspector is, which are its objectives, where the idea of developing it came from and some other bits to offer you a general idea of what it intends to be.Next, we will have a look at what actually can it do for you and what functionalities it offers.Then, I will risk with a couple of live use cases that will give a more accurate idea of its capabilities.Next, we will have a look a some of the possible developments and directions that could take the project in a future.Finally, we will focus on the project around the WMS Inspector,and the different ways to get support and get involved.

Overview

Introduction

Features

Live(?) use cases

Future

Project

The presentation will be divided in the following sections:In the first place, we will see what the WMS Inspector is, which are its objectives, where the idea of developing it came from and some other bits to offer you a general idea of what it intends to be.Next, we will have a look at what actually can it do for you and what functionalities it offers.Then, I will risk with a couple of live use cases that will give a more accurate idea of its capabilities.Next, we will have a look a some of the possible developments and directions that could take the project in a future.Finally, we will focus on the project around the WMS Inspector,and the different ways to get support and get involved.

What is it?

Firefox extension

Set of existing and new functionalities for users who work with Web Map Services

Both frequent and occasional users

In short, the WMS Inspector is an extension for the Firefox browser, that provides a set a of tools for people working with the OGC Web Map Service standard.It integrates existing tools that where dispersed or hard to find and new ones specially focused on the WMS, in a single and convenient, place.It is aimed at frequent users like developers that work with WMS on a daily basis, building web based clients or setting up WMS services, as well as users who use them more occasionally, like for instance GIS users that consume them from a desktop GIS.

Origin

Check which services are used

Debug failing requests

Check GetCapabilities responses

...

The idea of creating something like the WMS Inspector came a couple of years ago, while working in a geospatial company from Barcelona, called Geodata Sistemas. Our main field of work was the publication of georeferenced information online, setting up WMS services with MapServer and building online viewers, so there were certain tasks that came up pretty frequently on our daily work, like checking which services were used on a viewer, debug failing requests, etc. We solved all of these tasks using existing tools in Firefox itself or other extensions like Firebug, but even the more trivial ones like copying a URL or getting a GetCapabilities response, involved a certain amount of clicks. This can seem like is not big deal, but when handling several applications and services, every way of easing these tasks can have a significant impact.

Origin

Developers: help with frequent tasks

Non-developers: not familiar with concepts like clients, services, capabilities...

Tool to ease common tasks + provide a friendly approach to WMS

So, on one hand with have the need to offer developers some help with common tasks.But, apart from the developers, the other half of the company were cartographers, who worked with desktop CAD and GIS applications, so they were familiar with consuming WMS from these applications, but when introducing them to online viewers, concepts like client, request, capabilities were a little bit more hard to grasp for them.So I though it would be interesting to develop a simple tool, integrated in the existing users work environment, that could provide some help with common tasks as well as a friendly approach to the map services.And that's where the idea of developing a Firefox extension came from.

Why a Firefox add-on?

Integrated in one of the most popular browsers for developersCompanion of Firebug, HttpFox,

Privileged environment

CSS + Javascript + XUL +XPCOM

function test(){ alert("Hi!"); }

XUL

JS

But why a Firefox a extension?Which advantages does it offer?Well, in first place is one of most used browsers among web developers, specially for having extensions like Firebug, JSONView, HttpFox ..Working from a extension means that we are in fact in a privileged environment within the browser, which allow us to perform Cross-domain requests without needing a proxy, reading and writing files in the user computer, access to other browser components.And all this built with technologies very close to the web, which are CSS for the styling, Javascript for the logic and XUL for the User Interface, which is a XML-based layout language. For more advanced functionalities, you can also build cross-platform components called XPCOM, which can also be written in Javascript. So in general, they are relatively easy to develop.

Why a Firefox add-on?

Addons.mozilla.orghttp://addons.mozilla.org/addon/91406

The other main advantage that the Firefox extensions offer is the public repository at addons.mozilla.org, which is where the WMS Inspector lives.Developers can upload their extensions and they are reviewed by a group of editors to be approved as public. Once the extension is public, she gets a dedicated page, with descriptions, screenshots, reviews.., and is extremely easy for users to install it and for the developer to supply updates. You can even set up a Beta channel to deliver unstable releases.One of the most interesting features that offers addons.mozilla.org are the usage statistics, which are collected every time the browser checks for updates for your extensions. This allows to know exactly which browser versions are your users using, which is something really useful when deciding which versions to support or planning new features, and something that other platforms can not offer so easily.So in overall, I think that given the WMS Inspector needs and its potential users, a Firefox extension can be a great choice, even with the obvious drawback of only being available in Firefox.

Features: Main panel

Services Requests Parameters

ImagesMessages

Let's have a look at how it looks like.After installing the extension, an icon will appear in the right side status bar.Clicking it will show the WMS Inspector, which is divided in a toolbar and two panels.If we are on a page which is a map client and click the Refresh requests button, the application will check if it uses WMS services and if so, will list all the services in the left panel. For each service it will list all the requests made and for each request, all its parameters.When selecting one of the requests, the right panel will show the corresponding image or the message returned by the server if its an error or there is a problem with the request.Extra actions like copying the URL or opening the GetCapabilities response can be accessed with a context menu.

Features: Capabilities

HTML report (XSLT)

Original XML

Another feature allows to perform GetCapabilities requests easily from the loaded services or from ones entered by user.Apart from opening the original XML file in the browser, regardless of the MIME-type returned, the WMS Inspector can also generate an HTML report using XSL transformations.This report presents the information from the GetCapabilities response in a more user-friendly way. We will have a look at an example in a moment.

Features: Library

Export / Import

Easy access

The last version of the WMS Inspector includes a Services Library where users can store services that use frequently or that found interesting, and access them easily later on.The design is very simple and intuitive, with a clear list of the services, which can be tagged to classify the different services, but it also has a search function and different options for filtering or ordering.As in the main panel, all actions available over the services can be accessed with a context menu, which allows to copy the URL or quickly access to the services' capabilities.The services can be exported and imported to a file, which allows to share them between computers or colleagues.And if you are going to use it frequently, you can add a button to the Firefox toolbar to access it quickly.

Use case 1

Introducing the WMS on web clients to new users

Users with a cartographic background

Developers without a geospatial background

So let's see a couple of real use cases to see it in action.In the first case, we want to introduce the use of WMS on web clients to new users, both non developers or programmers with no experience in the geospatial field.

The map in an online viewer is made from different layers or images, which are requests to map services

Some of this services come from the same server as the application, but others come from external organizations

There are different kinds of request to the same service (and the same layer) ones return you a map, others a legend.

Each operation has the same set of parameters regardless of the service, that's a great practical demonstration of what a standard is

Changes in some of the parameters have an immediate effect, and some other parameters are compulsory, otherwise you get an error from the server.

And finally, each service can tell you all its capabilities, like the geographic extent or the available layers. It will send you this boring XML file, but the WMS Inspector will generate a nice HTML report for you, which has exactly the same information as the original, or even a little bit more, because it directly displays the legends.

So, to sum up, using the WMS Inspector along with a real online viewer can help non familiar users understand better the internals of the WMS requests in a web client.

Use case 2

Finding suitable services for a new project

Check possible candidates' capabilities

Keep record of interesting services

Share findings with other team members

The other use case is focused to users with more experience with WMS. They are starting a new project and need to find suitable services for their apps or for their analysis. Check what they offer, keep them for later, sharing them with other team members.Let's assume in this case that the project is about Antarctica.The first place to look, of course, it's Google.Now, the first result looks really promising. Is an SDI and they have a map viewer, so let's have a look at it. We can check the capabilities of the service.We can see the contact details, in case we needed, no access constraints, good. And it has a lot of interesting layers. This is definetly going to be an interesting one, so let's add it to the Library. We have the URL automatically filled up for us, enter a title and create a new tag "Antarctica", that will help us filter our services.Right, let's see another result. This one seems to offer Landsat imagery, which will be great for our project. Again, we can check its capabilities, see if it interest us and add it to the Library. In this case, we will add it directly from the selected text, opening up the context menu and selecting "Add to Library".We enter the title and select the "Antarctica" tag, which is now available, and we enter a new one called "Landsat".Finally, we can try another search engine like this one, OWS Search Engine, which is great. Let's see what comes up with "Antarctica". Great there is a WFS service of a ice shelves, we don't have time to check its capabilities but we want to save it for later, again with the context menu. In this case, we specify that the service is a WFS, and apart from the Antarctica tag, we can add another one like Check later.So, we could continue the search or focus in another part of the project, but whenever we want to access these services, we can do easily from the services Library. The Library can be accessed from the button on the main panel or from this button that you can add to the Firefox toolbar.Here we have all our services, but we can filter by the tag "Antarctica" to get the ones related to our project.And if we want to share them with other team members, we can export the current selection to a file, which is a simple CSV, and send it by email or import it in another computer or whatever we want.So, the WMS Inspector gives you a simple and non interfering way of storing your favorite services, so you can access easily later.

Future: General lines

Support for other mapping services: TMS, WMTS, OSM,

WMS Inspector -> OWS Inspector?

Better UI and New features

(Keeping it simple)

User customization

Feedbackwanted!So that's what the WMS Inspector can do now, but what about the future?Well, there are a few ideas of new functionalities, but the main lines I think the project should stick to are these three.Support for other mapping services like TMS, the new WMTS standard, even OpenStreetMap, Mapserver, ArcGIS Server... at the end all of them are image requests performed by your application

The second line should be getting a better user experience, (things like opening it in a new window) and adding features, but always trying to keep the application simple. We don't want to add too many features or replace Firegbug

Finally, a line I think is very important is the user customization. Every user has a different background and will probably use it in different ways.

But to help define this lines and specific new features I think is really important to have a feedback from the users. See what they think about it, how do they use it, which things they think it lacks, etc

Future: Possible features

Embedded light map viewer

Feedbackwanted! For instance, some examples of possible features could include a light map viewer, which allow to preview the services stored in the Library or from the GetCapabilities response.Something similar to the Layer preview option that has GeoServer.

wms = new OpenLayers.Layer.WMS("WMS Inspector {Layers}","{Service}",{layers: "{Layers}",srs: "{SRS}",format: "{Format}",},{buffer: 0,});

Future: Possible features

User defined actions

Feedbackwanted!Another possible addition, in line with the user customization that we were talking about, could be user defined actions on the services or requests loaded on the main panel.For instance, getting an OpenLayers WMS layer creation code, which you can paste in your script, or a WMC layer or Quantum GIS or gvSIG project file ...

Future: Possible features

Automatic mode

Customizable HTML reports

Library integrated services search

???

Feedbackwanted!And other features could include an automatic mode (right now you have to click the Refresh requests button), Customizable HTML reports and reports for other kinds of services apart from the WMS,Searching for services directly from the Library,

So there are some interesting ideas, but as I said, feedback from the users will help decide which ones are pushed into new versions.

Project

Downloadhttp://addons.mozilla.org/addon/91406

Support

[email protected]

http://www.freelists.org/list/wmsinspector

Documentation (TODO)

http://github.com/amercader/WMS-Inspector/wiki

Right, and just to finish my presentation some resources about the project. There are a lot of addresses in these two slides, but everything can be easily found on Google.First, of course is the site on the Mozilla repository where you can download the latest version of the WMS Inspector. You can see screen-shots or reviews.There is also a mailing list to ask for support or provide feedback. The email is [email protected]

The user documentation needs some work, but a first version can be found in the wiki of the github repository.

Project

Source code (GPLv3)

http://github.com/amercader/WMS-Inspector

Translationshttp://www.babelzilla.orgCurrent translations: en, es, ca, pt-BR, fr, pl, zn-CH

As I said, the source code is hosted in GitHub. The WMS Inspector is an Open Source project, released under the GPLv3, and developers are more than welcome to fork it, play around with the code and request to pull whatever changes they made. GitHub makes all this kind of stuff really easy.

And I you would like to contribute with a translation, there is site called babelzilla where you can register and help translate the extension you like,The WMS Inspector has already been translated to all of this languagesBabelzilla can be a little tricky, so if you find any problem just contact the mailing list for support.

Thank you

Adri [email protected]://amercader.net

And that's it.I hope I've given you a good idea of the WMS Inspector project and that you will give it a try a tell what you think about it.Thank you very much

PLASPLASPLASPLASPLASBRAVO!!!PLASPLASPLASPLASPLASPLASPLASPLASPLASPLASGUAPO!!!PLASPLASPLASPLASPLAS