<div dir="ltr">The functions endpoint in pg_featureserv is non-standard, so it's not surprising that client libraries don't support it.   So you will have to manually build a URL for the request.<div><br></div><div>pg_featureserv now has CQL filtering: <a href="https://github.com/CrunchyData/pg_featureserv/blob/master/hugo/content/usage/cql.md">https://github.com/CrunchyData/pg_featureserv/blob/master/hugo/content/usage/cql.md</a></div><div><br></div><div>This includes temporal filter support.  If you can build the latest code, you might want to look at this as an alternative to functions.  It saves writing and deploying functions, and it is much more flexible.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 28, 2022 at 5:49 AM Rory Meyer <<a href="mailto:rory.meyer@vliz.be">rory.meyer@vliz.be</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Afternoon all,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
I've got a PG Featureserv docker container running on a server and a couple of collections and functions published on it. The data that I'm querying is better suited for functions. It's mostly time series stuff and it's nice to give it a start/stop time and
 a couple other filter parameters. </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
I'm looking at OWSlib to build a python client that consumes off the server but it doesn't seem like the "functions" are recognised in OGC; "<a href="http://myserver.org/collections/my_data" target="_blank">myserver.org/collections/my_data</a>" is easily called in OWSlib with:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
```</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
from owslib.ogcapi.features import Features<br>
api = Features('http://<span style="color:rgb(0,0,0);background-color:rgb(255,255,255);display:inline"><a href="http://myserver.org/" target="_blank">myserver.org/</a></span>')<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
```</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
but there doesn't seem to be a "<a href="http://myserver.org/functions/my_func" target="_blank">myserver.org/functions/my_func</a>" equivalent. </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Am I missing it? Is the best way to do function queries just to build up the URL in python and do a simple request? </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Rory</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
</div>

_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
</blockquote></div>