Re: [Qgis-developer] WPS server

2012-12-04 Thread rldhont

Hi Martin,

I think we need both :
* QgsExpression for simple Process on Geometry and simple parameters
* SEXTANTE for complexe Process on Raster, Vector Layer, multiple Layer, etc

After some tests on WFS-Transaction, I need a way to validate my 
geometry before updating or adding feature. In this case SEXTANTE will 
be too big, QgsExpression is exactly what I need no more no less. I do 
not need to Process layer.


For SEXTANTE, Vincent Picavet give the good solution :
/* Making sextante totally independant of qgis GUI, to be able to run 
sextante processes in batch in command line mode//
//This will open the door to use Sextante as a real WPS processes 
generator, //

//with features not unlike an ETL (or ELT)./

René-Luc D'Hont
3Liz

Le 03/12/2012 17:43, Martin Dobias a écrit :


On Mon, Dec 3, 2012 at 2:31 PM, rldhont rldh...@gmail.com 
mailto:rldh...@gmail.com wrote:


My idea was to have a simple WPS server based on QGIS-Server, very
simple for simple vector case, and I thought it's a good idea. I
only need to validate geometry, constructing simple buffer or
intersection.

For big processing, I think SEXTANTE is better suitable, but for a
WPS serveur, SEXTANTE didn't need QGIS. We can construct a WPS
Server based on pySextante with pyWPS.

I don't really want to hack QgsExpression, just accesses to very
simple processing, I'll just it. For SEXTANTE, It will be better
to work on someting based on pyWPS.


I don't think PyWPS would be a good choice for WPS server 
implementation. From a broader view, PyWPS does the same thing as 
SEXTANTE does: it allows users to run processes and it allows 
developers to provide custom processes. The main difference is that 
PyWPS processing is meant to be triggered by WPS requests, while 
SEXTANTE processing may be triggered by anything (currently mainly 
GUI). On the backend side, PyWPS supports GRASS, while SEXTANTE offers 
much more by default. It's true that one could attach SEXTANTE to 
PyWPS and let QGIS server call PyWPS all the time, but that would 
bring just additional limitations.


In fact, the server-side WPS support could be implemented directly 
within SEXTANTE, the only thing that would QGIS server do would be to 
pass WPS request to SEXTANTE routine and send its response back to server.


So the bottom line from my point of view:
SEXTANTE +1
QgsExpression -1
PyWPS -1

Regards
Martin



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] WPS server

2012-12-03 Thread rldhont

Hi Paolo,
Hi Luca,
Hi all,

I'll explain my idea about QGIS-Server and WPS implementation.

For the next QGIS release, 3Liz has decided to improve QGIS-Server WFS 
implementation. The main improvement is to cover the maximum of the 
1.0.0 standard, especially Transaction. For Transaction and GetFeature 
Request, I needed to extend the QGIS Expressions directly in the QGIS 
core. I added some spatial operators like Intersects, Contains, Disjoint 
but I also added spatial constructor like geomFromWKT, Intersection, 
buffer. The last point means that it's possible to construct a buffer 
with the QGIS Expression system.
I also discovered that in the Filter Encoding OGC  standard, it's 
possible to use Functions and the QGIS Expression system provides a 
reader for this way of describing expressions.
And Nathan Woordrow publishing 'User defined expression functions for 
QGIS' on his blog 
http://woostuff.wordpress.com/2012/11/10/user-defined-expression-functions-for-qgis/ 
. This point explaining how the new QGIS Expression system is 
extendable. And for me it was the start for testing a WPS 
implementation, because I needed WPS for validating geometry for the WFS 
Transaction Request.


I've worked on a WPS project which provides a way to create Process in a 
wide range of programming langage, the ZOO-Project. I've worked on the 
JavaScript Provider. In this project, you have to code to create new 
process.


With the QGIS Expression you just have to know how to write an 
expression to create a new Process. It's not coding.

For example the Buffer Process can be described like this :
buffer(geometry,distance)
You want to create a Process which retrun the buffer without the geometry :
difference(buffer(geometry,distance),geometry)
And we can define a Process which return the result of a QGIS Expression 
as the Process parameter.


My plan for WPS implementation is firstly to find fund, to :
* implement the standard (defining how to declare process, how to use 
the posting XML for Excute Request, how to use QGIS layer from project, etc)

* loading Python scripts for 'User defined expression functions'
* Using Sextante

Sextante is not my priority because it is more complexe, the QGIS-Server 
doesn't load python and python plugins, and we firstly need to provide a 
way to have simple Process and simple way to describe Process, after 
that it will be easy to use SEXTANTE.


Regards,
René-Luc D'Hont
3Liz
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] WPS server

2012-12-03 Thread Martin Dobias
Hi Rene-Luc

On Mon, Dec 3, 2012 at 10:01 AM, rldhont rldh...@gmail.com wrote:

 With the QGIS Expression you just have to know how to write an expression
 to create a new Process. It's not coding.
 For example the Buffer Process can be described like this :
 buffer(geometry,distance)
 You want to create a Process which retrun the buffer without the geometry :
 difference(buffer(geometry,**distance),geometry)
 And we can define a Process which return the result of a QGIS Expression
 as the Process parameter.


Thanks for sharing your thoughts about your implementation.

I would like to express my concerns that using QgsExpression may be a dead
end for a generic WPS servers. Expressions are meant to deal with
individual features of a vector layer. You're right that it's possible to
define your own functions and chain them to create processes, but this is
very limited. For example it's not possible for a process to return more
results and it's not possible to use one result more than once. Just like
raster calculator has its own expression engine, also the processing
service should use a way of describing algorithms that suits best its needs
- and in our case that's python+SEXTANTE.

Therefore I strongly recommend using SEXTANTE for the WPS server backend. I
believe that would be less work than trying to hack QgsExpression to use it
for processing. You would just need to parse WPS query, generate a Python
script that would run SEXTANTE analysis and then create WPS reply. It's
probably not desirable to run the processing directly within the server
process (thread), so this would be a better solution either way.

Regards
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] WPS server

2012-12-03 Thread rldhont

Le 03/12/2012 14:05, Martin Dobias a écrit :

Hi Rene-Luc

On Mon, Dec 3, 2012 at 10:01 AM, rldhont rldh...@gmail.com 
mailto:rldh...@gmail.com wrote:


With the QGIS Expression you just have to know how to write an
expression to create a new Process. It's not coding.
For example the Buffer Process can be described like this :
buffer(geometry,distance)
You want to create a Process which retrun the buffer without the
geometry :
difference(buffer(geometry,distance),geometry)
And we can define a Process which return the result of a QGIS
Expression as the Process parameter.


Thanks for sharing your thoughts about your implementation.

I would like to express my concerns that using QgsExpression may be a 
dead end for a generic WPS servers. Expressions are meant to deal with 
individual features of a vector layer. You're right that it's possible 
to define your own functions and chain them to create processes, but 
this is very limited. For example it's not possible for a process to 
return more results and it's not possible to use one result more than 
once. Just like raster calculator has its own expression engine, also 
the processing service should use a way of describing algorithms that 
suits best its needs - and in our case that's python+SEXTANTE.


Therefore I strongly recommend using SEXTANTE for the WPS server 
backend. I believe that would be less work than trying to hack 
QgsExpression to use it for processing. You would just need to parse 
WPS query, generate a Python script that would run SEXTANTE analysis 
and then create WPS reply. It's probably not desirable to run the 
processing directly within the server process (thread), so this would 
be a better solution either way.


Hi Martin,

My idea was to have a simple WPS server based on QGIS-Server, very 
simple for simple vector case, and I thought it's a good idea. I only 
need to validate geometry, constructing simple buffer or intersection.


For big processing, I think SEXTANTE is better suitable, but for a WPS 
serveur, SEXTANTE didn't need QGIS. We can construct a WPS Server based 
on pySextante with pyWPS.


I don't really want to hack QgsExpression, just accesses to very simple 
processing, I'll just it. For SEXTANTE, It will be better to work on 
someting based on pyWPS.


René-Luc



Regards
Martin


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] WPS server

2012-12-03 Thread Martin Dobias
On Mon, Dec 3, 2012 at 2:31 PM, rldhont rldh...@gmail.com wrote:

  My idea was to have a simple WPS server based on QGIS-Server, very
 simple for simple vector case, and I thought it's a good idea. I only need
 to validate geometry, constructing simple buffer or intersection.

 For big processing, I think SEXTANTE is better suitable, but for a WPS
 serveur, SEXTANTE didn't need QGIS. We can construct a WPS Server based on
 pySextante with pyWPS.

 I don't really want to hack QgsExpression, just accesses to very simple
 processing, I'll just it. For SEXTANTE, It will be better to work on
 someting based on pyWPS.


I don't think PyWPS would be a good choice for WPS server implementation.
From a broader view, PyWPS does the same thing as SEXTANTE does: it allows
users to run processes and it allows developers to provide custom
processes. The main difference is that PyWPS processing is meant to be
triggered by WPS requests, while SEXTANTE processing may be triggered by
anything (currently mainly GUI). On the backend side, PyWPS supports GRASS,
while SEXTANTE offers much more by default. It's true that one could attach
SEXTANTE to PyWPS and let QGIS server call PyWPS all the time, but that
would bring just additional limitations.

In fact, the server-side WPS support could be implemented directly within
SEXTANTE, the only thing that would QGIS server do would be to pass WPS
request to SEXTANTE routine and send its response back to server.

So the bottom line from my point of view:
SEXTANTE +1
QgsExpression -1
PyWPS -1

Regards
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] WPS server

2012-12-03 Thread Luca Delucchi
2012/12/3 Martin Dobias wonder...@gmail.com:

 I don't think PyWPS would be a good choice for WPS server implementation.
 From a broader view, PyWPS does the same thing as SEXTANTE does: it allows
 users to run processes and it allows developers to provide custom processes.
 The main difference is that PyWPS processing is meant to be triggered by WPS
 requests, while SEXTANTE processing may be triggered by anything (currently
 mainly GUI). On the backend side, PyWPS supports GRASS, while SEXTANTE
 offers much more by default. It's true that one could attach SEXTANTE to
 PyWPS and let QGIS server call PyWPS all the time, but that would bring just
 additional limitations.


I don't know really well PyWPS, but I think that you can use more that
GRASS for sure at least R.
Other WPS Server as ZOO or 52north and maybe also GeoServer permit to
the user to create services with a lot of libraries, I'm using ZOO and
I can use much more than Sextante ;-)

 Regards
 Martin


-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] WPS server

2012-12-02 Thread Paolo Cavallini
Hi all.
Is anybody working (or planning to) on a WPS server implementation for QGIS? 
Does
anybody have an estimate of how much work would be involved?
Ideally, it would be good to build it on top of sextante, so to have the full 
set of
algorithms and models immediately available.
Thanks.
-- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] WPS server

2012-12-02 Thread René-Luc D'Hont
Hi Paolo,

I'm starting some WPS implementation based on QgsExpression, and it's
working.

I'll publish my first code.

René-Luc
Le 2 déc. 2012 09:25, Paolo Cavallini cavall...@faunalia.it a écrit :

 Hi all.
 Is anybody working (or planning to) on a WPS server implementation for
 QGIS? Does
 anybody have an estimate of how much work would be involved?
 Ideally, it would be good to build it on top of sextante, so to have the
 full set of
 algorithms and models immediately available.
 Thanks.
 --
 Paolo Cavallini - Faunalia
 www.faunalia.eu
 Full contact details at www.faunalia.eu/pc
 Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] WPS server

2012-12-02 Thread Paolo Cavallini
Il 02/12/2012 13:24, René-Luc D'Hont ha scritto:

 I'm starting some WPS implementation based on QgsExpression, and it's working.
 
 I'll publish my first code.

wow, great news. looking forward to it.
merci beaucoup.
-- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] WPS server

2012-12-02 Thread Luca Delucchi
Hi Renè

2012/12/2 René-Luc D'Hont rldh...@gmail.com:

 I'm starting some WPS implementation based on QgsExpression, and it's
 working.


could you explain a little bit more about your idea?
what languages/library will be supported by the services?

 I'll publish my first code.

 René-Luc


Thanks

-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] WPS server

2012-12-02 Thread Paolo Cavallini
Il 02/12/2012 13:24, René-Luc D'Hont ha scritto:
 Hi Paolo,
 
 I'm starting some WPS implementation based on QgsExpression, and it's working.

Any plan to expand it to use more functions? As said, using sextante would be 
the
real killer here.
Thanks.
-- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer