[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] PG Feat Serv and OGC API
From:       Martin Davis <mtnclimb () gmail ! com>
Date:       2022-04-28 15:04:04
Message-ID: CAK2ens31miQ7URDf5TTe78ouXcEcE5PxNFa64BOLBZ81D1ampw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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.

pg_featureserv now has CQL filtering:
https://github.com/CrunchyData/pg_featureserv/blob/master/hugo/content/usage/cql.md

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.

On Thu, Apr 28, 2022 at 5:49 AM Rory Meyer <rory.meyer@vliz.be> wrote:

> Afternoon all,
>
> 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.
>
> 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; "
> myserver.org/collections/my_data" is easily called in OWSlib with:
>
> ```
> from owslib.ogcapi.features import Features
> api = Features('http://myserver.org/')
> ```
> but there doesn't seem to be a "myserver.org/functions/my_func"
> equivalent.
>
> 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?
>
> Regards,
> Rory
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>

[Attachment #5 (text/html)]

<div dir="ltr">The functions endpoint in pg_featureserv is non-standard, so it&#39;s \
not surprising that client libraries don&#39;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/co \
ntent/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 &lt;<a \
href="mailto:rory.meyer@vliz.be">rory.meyer@vliz.be</a>&gt; \
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&#39;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&#39;m querying is better \
suited for functions. It&#39;s mostly time series stuff and it&#39;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&#39;m looking at OWSlib to build a python client that consumes off the server but \
it doesn&#39;t seem like the &quot;functions&quot; are recognised in OGC; &quot;<a \
href="http://myserver.org/collections/my_data" \
target="_blank">myserver.org/collections/my_data</a>&quot; 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(&#39;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>&#39;)<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&#39;t seem to be a &quot;<a \
href="http://myserver.org/functions/my_func" \
target="_blank">myserver.org/functions/my_func</a>&quot; 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>



_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic