geopython / pygeoapi

pygeoapi is a Python server implementation of the OGC API suite of standards. The project emerged as part of the next generation OGC API efforts in 2018 and provides the capability for organizations to deploy a RESTful OGC API endpoint using OpenAPI, GeoJSON, and HTML. pygeoapi is open source and released under an MIT license.
https://pygeoapi.io
MIT License
490 stars 260 forks source link

Shapely functions as sample process #1565

Closed jeafreezy closed 5 months ago

jeafreezy commented 7 months ago

Overview

This PR exposes some selected shapely functions as sample process. The selection cut across different operations in shapely. It uses the name of the category of that function as the namespace. E.g union operation under the set module is described as set:union. This is to avoid clashes with other functions.

As mentioned in the issue, it accepts list of geometry inputs (WKT and/or GeoJSON geometry), performs the operation and returns the result in the specified output_format (optional).

The approach is describe in the image below:

image

Related issue / discussion

https://github.com/geopython/pygeoapi/issues/1439

Additional information

Todo/Idea/Challenge

Dependency policy (RFC2)

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

francbartoli commented 7 months ago

@jeafreezy thanks for your great contributions. I have just one general comment about security:

tomkralidis commented 7 months ago

Agree; it makes sense to have the plugin in the codebase without having in default configuration.

jeafreezy commented 7 months ago

Thank you both for the review and feedback. Please, how do you think I should go about this? I have a few ideas;

image

image

Kindly advise. Thank you.

webb-ben commented 6 months ago

Hi @jeafreezy, I believe the correct approach would be to omit the configuration entirely from the default pygeoapi configuration file, and instead, documenting the capacities of the Shapely Process Provider here / location in source code

jeafreezy commented 6 months ago

Thank you @webb-ben . I will work on that

jeafreezy commented 5 months ago

Not sure if we need need pytest to ensure function of the process capacities.

Apart from that, small changes to docs and a couple of files I am not sure need to be included in this PR, got my +1.

Thank you for reviewing my PR. I will address the issues.

jeafreezy commented 5 months ago

Thank you for reviewing my PR @tomkralidis. I have addressed the issues to the best of my knowledge. Kindly let me know if there is anything else I missed. Thank you.

tomkralidis commented 5 months ago

Thank you @jeafreezy for this valuable contribution!