[QGIS-Developer] REST API for QGIS processing tool

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[QGIS-Developer] REST API for QGIS processing tool

Prem Kumar
Dear Community team,

Off late, I have written a custom processing tool in QGIS which works perfectly fine in QGIS application. I am wondering if there is any better way to expose the qgis processing tool over REST API so that I can use it in my front end map? Kind of geoprocessing service REST API.

Any leads would be appreciated, thank you.

-Prem

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: REST API for QGIS processing tool

Nyall Dawson
On Thu, 25 Feb 2021 at 03:28, Prem Kumar <[hidden email]> wrote:
>
> Dear Community team,
>
> Off late, I have written a custom processing tool in QGIS which works perfectly fine in QGIS application. I am wondering if there is any better way to expose the qgis processing tool over REST API so that I can use it in my front end map? Kind of geoprocessing service REST API.
>
> Any leads would be appreciated, thank you.

Look into the "WPS" standard. There's even an existing server for
this: https://github.com/3liz/py-qgis-wps

Nyall




>
> -Prem
> _______________________________________________
> QGIS-Developer mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: REST API for QGIS processing tool

René-Luc Dhont

Le 24/02/2021 à 23:27, Nyall Dawson a écrit :
>
> Look into the "WPS" standard. There's even an existing server for
> this: https://github.com/3liz/py-qgis-wps

Thanks Nyall to pointing it.

Prem, If you are interested in a REST API, implementing the OGC API
Processes standard is  being considered for py-qgis-wps
* https://github.com/opengeospatial/ogcapi-processes/
* https://ogcapi.ogc.org/processes/

py-qgis-wps is based on Tornado and any contributions are welcome.
https://github.com/3liz/py-qgis-wps

René-Luc

>
> Nyall
>
> _______________________________________________
> QGIS-Developer mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: REST API for QGIS processing tool

Prem Kumar
HI Nyall and René-Luc,

Thank you very much for the pointers, much appreciated. Looks to me, a lot to learn some good stuff. Will let you know how it goes.

-Prem

On Thu, Feb 25, 2021 at 6:59 PM René-Luc Dhont <[hidden email]> wrote:

Le 24/02/2021 à 23:27, Nyall Dawson a écrit :
>
> Look into the "WPS" standard. There's even an existing server for
> this: https://github.com/3liz/py-qgis-wps

Thanks Nyall to pointing it.

Prem, If you are interested in a REST API, implementing the OGC API
Processes standard is  being considered for py-qgis-wps
* https://github.com/opengeospatial/ogcapi-processes/
* https://ogcapi.ogc.org/processes/

py-qgis-wps is based on Tornado and any contributions are welcome.
https://github.com/3liz/py-qgis-wps

René-Luc

>
> Nyall
>
> _______________________________________________
> QGIS-Developer mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: REST API for QGIS processing tool

Prem Kumar
Hi Team,

Im afraid to make a comment but the installation instructions in the github are not specifically referring the integration of service and the qgis installation and its modules. I have tried installing py-qgs-wps on linux machine using archive tar file and ended up incompatibility issue between python version - qgis installation and the service.

If it’s not more of an effort, can you please guide me to any installation instructions? Thanks 

-Prem

On Thu, 25 Feb 2021 at 7:44 PM, Prem Kumar <[hidden email]> wrote:
HI Nyall and René-Luc,

Thank you very much for the pointers, much appreciated. Looks to me, a lot to learn some good stuff. Will let you know how it goes.

-Prem

On Thu, Feb 25, 2021 at 6:59 PM René-Luc Dhont <[hidden email]> wrote:

Le 24/02/2021 à 23:27, Nyall Dawson a écrit :
>
> Look into the "WPS" standard. There's even an existing server for
> this: https://github.com/3liz/py-qgis-wps

Thanks Nyall to pointing it.

Prem, If you are interested in a REST API, implementing the OGC API
Processes standard is  being considered for py-qgis-wps
* https://github.com/opengeospatial/ogcapi-processes/
* https://ogcapi.ogc.org/processes/

py-qgis-wps is based on Tornado and any contributions are welcome.
https://github.com/3liz/py-qgis-wps

René-Luc

>
> Nyall
>
> _______________________________________________
> QGIS-Developer mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: REST API for QGIS processing tool

dmarteau

Le 22/03/2021 à 18:26, Prem Kumar a écrit :
Hi Team,

Im afraid to make a comment but the installation instructions in the github are not specifically referring the integration of service and the qgis installation and its modules. I have tried installing py-qgs-wps on linux machine using archive tar file and ended up incompatibility issue between python version - qgis installation and the service.

If it’s not more of an effort, can you please guide me to any installation instructions? Thanks
Can you be more specific about the error your are facing ? if that's about py-qgs-wps then you should open an issue on github.

-Prem

On Thu, 25 Feb 2021 at 7:44 PM, Prem Kumar <[hidden email]> wrote:
HI Nyall and René-Luc,

Thank you very much for the pointers, much appreciated. Looks to me, a lot to learn some good stuff. Will let you know how it goes.

-Prem

On Thu, Feb 25, 2021 at 6:59 PM René-Luc Dhont <[hidden email]> wrote:

Le 24/02/2021 à 23:27, Nyall Dawson a écrit :
>
> Look into the "WPS" standard. There's even an existing server for
> this: https://github.com/3liz/py-qgis-wps

Thanks Nyall to pointing it.

Prem, If you are interested in a REST API, implementing the OGC API
Processes standard is  being considered for py-qgis-wps
* https://github.com/opengeospatial/ogcapi-processes/
* https://ogcapi.ogc.org/processes/

py-qgis-wps is based on Tornado and any contributions are welcome.
https://github.com/3liz/py-qgis-wps

René-Luc

>
> Nyall
>
> _______________________________________________
> QGIS-Developer mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: REST API for QGIS processing tool

Prem Kumar
Hi David,

While installing the service from source code files using given instructions, further details of the exception I have encountered.
image.png

 Complete output from command python setup.py egg_info:
    ERROR: Minimum supported PROJ version is 7.2.0, installed version is 4.9.3. For more information see: https://pyproj4.github.io/py  proj/stable/installation.html

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-qejkjny8/pyproj/
image.png

After several attempts of troubleshooting, I could bypass this issue with "pip3 install pyproj==1.9.6 -e ."  ..... not sure this is the correct way or not. However, after installation from source files directory, I could not either run the runwps.sh file or wpsserver from command line as the terminal unable to recognize wpsserver command.

./runwps.sh: line 15: exec: wpsserver: not found

Please suggest. Thanks.

-Prem

On Mon, Mar 22, 2021 at 11:19 PM David Marteau <[hidden email]> wrote:

Le 22/03/2021 à 18:26, Prem Kumar a écrit :
Hi Team,

Im afraid to make a comment but the installation instructions in the github are not specifically referring the integration of service and the qgis installation and its modules. I have tried installing py-qgs-wps on linux machine using archive tar file and ended up incompatibility issue between python version - qgis installation and the service.

If it’s not more of an effort, can you please guide me to any installation instructions? Thanks
Can you be more specific about the error your are facing ? if that's about py-qgs-wps then you should open an issue on github.

-Prem

On Thu, 25 Feb 2021 at 7:44 PM, Prem Kumar <[hidden email]> wrote:
HI Nyall and René-Luc,

Thank you very much for the pointers, much appreciated. Looks to me, a lot to learn some good stuff. Will let you know how it goes.

-Prem

On Thu, Feb 25, 2021 at 6:59 PM René-Luc Dhont <[hidden email]> wrote:

Le 24/02/2021 à 23:27, Nyall Dawson a écrit :
>
> Look into the "WPS" standard. There's even an existing server for
> this: https://github.com/3liz/py-qgis-wps

Thanks Nyall to pointing it.

Prem, If you are interested in a REST API, implementing the OGC API
Processes standard is  being considered for py-qgis-wps
* https://github.com/opengeospatial/ogcapi-processes/
* https://ogcapi.ogc.org/processes/

py-qgis-wps is based on Tornado and any contributions are welcome.
https://github.com/3liz/py-qgis-wps

René-Luc

>
> Nyall
>
> _______________________________________________
> QGIS-Developer mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: REST API for QGIS processing tool

dmarteau

Juste a few things:

- py-qgis-wps does not require pyProj directly, you have to check which dependency needs it and eventually install it for your platform.

- You should always install custom python package in a venv otherwise you may break your installation.

Please open an issue on https://github.com/3liz/py-qgis-wps to continue this discussion as it is not related to qgis directly.

Le 23/03/2021 à 20:47, Prem Kumar a écrit :

Hi David,

While installing the service from source code files using given instructions, further details of the exception I have encountered.
image.png

 Complete output from command python setup.py egg_info:
    ERROR: Minimum supported PROJ version is 7.2.0, installed version is 4.9.3. For more information see: https://pyproj4.github.io/py  proj/stable/installation.html

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-qejkjny8/pyproj/
image.png

After several attempts of troubleshooting, I could bypass this issue with "pip3 install pyproj==1.9.6 -e ."  ..... not sure this is the correct way or not. However, after installation from source files directory, I could not either run the runwps.sh file or wpsserver from command line as the terminal unable to recognize wpsserver command.

./runwps.sh: line 15: exec: wpsserver: not found

Please suggest. Thanks.

-Prem

On Mon, Mar 22, 2021 at 11:19 PM David Marteau <[hidden email]> wrote:

Le 22/03/2021 à 18:26, Prem Kumar a écrit :
Hi Team,

Im afraid to make a comment but the installation instructions in the github are not specifically referring the integration of service and the qgis installation and its modules. I have tried installing py-qgs-wps on linux machine using archive tar file and ended up incompatibility issue between python version - qgis installation and the service.

If it’s not more of an effort, can you please guide me to any installation instructions? Thanks
Can you be more specific about the error your are facing ? if that's about py-qgs-wps then you should open an issue on github.

-Prem

On Thu, 25 Feb 2021 at 7:44 PM, Prem Kumar <[hidden email]> wrote:
HI Nyall and René-Luc,

Thank you very much for the pointers, much appreciated. Looks to me, a lot to learn some good stuff. Will let you know how it goes.

-Prem

On Thu, Feb 25, 2021 at 6:59 PM René-Luc Dhont <[hidden email]> wrote:

Le 24/02/2021 à 23:27, Nyall Dawson a écrit :
>
> Look into the "WPS" standard. There's even an existing server for
> this: https://github.com/3liz/py-qgis-wps

Thanks Nyall to pointing it.

Prem, If you are interested in a REST API, implementing the OGC API
Processes standard is  being considered for py-qgis-wps
* https://github.com/opengeospatial/ogcapi-processes/
* https://ogcapi.ogc.org/processes/

py-qgis-wps is based on Tornado and any contributions are welcome.
https://github.com/3liz/py-qgis-wps

René-Luc

>
> Nyall
>
> _______________________________________________
> QGIS-Developer mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer