[OpenLayers-Dev] wps protocol

Jachym Cepicky jachym.cepicky at gmail.com
Fri Sep 23 17:23:57 EDT 2011


Hi,

having a look in to the OpenLayers trunk, there is implementation of 
OpenLayers.Format.WPSCapabilities, DescribeProcess and Execute (I'll do 
some tests againts various WPS servers, known to me now days).

How is the OpenLayers.Protocol supposed to be used (not implemented-yet, 
or did not found any) ? According to API doc, Protocol is to be used 
together with vector layers, for reading the features.

I had a look into WFS protocol, my impression is, that it is used for 
GetFeature request exclusively.

I think, it would be good, to let the user proceed somehow 
GetCapabilities-DescribeProcess-Execute chain.

In my current implementation, I create following set of classes

OpenLayers.WPS.Process
OpenLayers.WPS.ComplexPut (used for In- and Output)
OpenLayers.WPS.LiteralPut (used for In- and Output)
OpenLayers.WPS.BBoxPut (used for In- and Output)


The in/outputs do have getValue and setValue methods, as well as some 
others, for easy manipulation with the process in and outputs.

Again, the OpenLayers.WPS.Process, several attributes and methods are 
defined, so the user (coder) can easily manipulate with particular 
process (including execution, adding in and outputs instances and so on).

The process could be configured either automatically (getcapabilities, 
describeprocess) or by hand, for example:

	var my_process = new OpenLayers.WPS.Process({
			identifier: "buffer",
			inputs: [
				new OpenLayers.WPS.ComplexPut({
					identifier: "data",
					value: OpenLayers.Format.GML.v2.prototype.write(vlayer.getFeatures())
				}),
				new OpenLayers.WPS.LiteralPut({
					identifier: "size",
					value: 20
				})
			],
			outputs: [
				new OpenLayers.WPS.ComplexPut({
					identifier: "buffer"})
			]
		});

	// defined earlier
	my_server.addProcess(my_process);

	// do the work, event will be fired
	my_process.execute();

(hope, it is self-explaining)

So, questions:

Does it make sense to use OpenLayers.Protocol in this case? Shall we 
write OpenLayers.Protocol.WPS.GetCapabilities, DescribeProcess, Execute 
classes? Would it be acceptable, to add OpenLayers.WPS namespace to 
OpenLayers base class? Do you (OpenLayers trunk-commiters, psc) want 
more deeper support for OGC WPS in OpenLayers, than "just" the Format 
reader ?

Thanks

Jachym


More information about the Dev mailing list