[PyWPS-dev] Handle complex input of a process within/without a chain in a same way possible?

Suzana Barreto suzana.barreto at envsys.co.uk
Wed Dec 19 01:43:41 PST 2018


Hi Gunner,

I have been trying to get chaining to work but have not had any luck yet,
my understanding is that a process should not know whether it is part of a
chain.  I would be interested in knowing how you have structured your
chained request, if you wouldn't mind sharing that information with me.

All the best,
Suzana

On Mon, 17 Dec 2018 at 13:07, Carsten Ehbrecht <ehbrecht at dkrz.de> wrote:

> Hi Gunnar,
>
> I haven’t looked into process chaining, but this question was just raised
> recently:
>
> https://lists.osgeo.org/pipermail/pywps-dev/2018-December/001363.html
>
> Here is in addition a description of how a process chain can be done:
> http://geoprocessing.info/wpsdoc/Concepts#chaining
>
> I’m not sure how your code and your chain works (the gitlab link is not
> public). A comment from my side would be, that your “worker” process should
> not know that it is part of a process chain.
>
> Cheers,
> Carsten
>
> On 12 Dec 2018, at 6:34 pm, gunnar.stroeer at yahoo.de wrote:
>
> Hi Everybody,
>
> I currently develop some processes for a masterthesis using PyWPS v4 as
> implementation. Mostly it works fine for single processes, as well with
> QGIS as client. However I stucked when it comes to chaining.
>
> Normally in single processes I use "in_file =
> request.inputs['in_geom'][0].file" for read in some complex GML geometry.
> In cases I wanna use the same process in a chain the code above doesn't
> work anymore because the input is the same as the output of the prior
> process. Therefore "in_file = request.inputs['in_geom'][0].file"
> additionally gets all the XML code of the prior response - and the process
> crashed.
>
> To handle this I use "import lxml" to parse the response XML looking for
> the "xlink:href" attribute value with the referenced GML output file of the
> first process. It works for the process in a chain, only. Whether the
> process is used in a chain or not I could handle in the process code, like
> a case distinction. Therefor I have to parse XML all the time again and
> again... and it makes me feel that I use PyWPS in a wrong way.
>
> I also could use "RawDataOutput", but this is obviously a bad solution for
> large data inputs/outputs.
>
> Is there any method to handle the described problem without writing too
> much code just to get know whether the process is used in a chain or not?
> Or is there something completely wrong what I'm doing?
>
>
> https://gitlab.com/hadlaskard/integration-of-wps-in-local-sdi/blob/master/processes/proc_buffer.py
>
> Thanks,
> Gunnar
> _______________________________________________
> pywps-dev mailing list
> pywps-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pywps-dev
>
>
> _______________________________________________
> pywps-dev mailing list
> pywps-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pywps-dev



-- 



*Dr Suzana BarretoSoftware AnalystEnvironment Systems*
Tel: +44 (0) 1970 626688
www.envsys.co.uk

The information contained in this e-mail is intended only for the use of
the person(s) to whom it is addressed and may contain confidential or
privileged information. If you have received this e-mail in error please
contact the sender and delete the material without copying, distributing or
disclosing the content. All reasonable precautions have been taken to
ensure that this e-mail is free from any virus, however, the recipient
should verify this to be the case. Please 'think before you print'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pywps-dev/attachments/20181219/4061b361/attachment.html>


More information about the pywps-dev mailing list