Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Tom Kralidis
    @tomkralidis
    @epifanio works for me without issues, what version of OWSLib are you using?
    tomkralidis @tomkralidis one of those days
    Massimo Di Stefano
    @epifanio
    @tomkralidis '0.20.0'
    root@874f513999fd:~# pip3.8 install -U owslib
    Requirement already up-to-date: owslib in /usr/lib/python3/dist-packages (0.20.0)
    WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
    You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
    root@874f513999fd:~#
    Tom Kralidis
    @tomkralidis
    @epifanio can you turn on logging for the pycsw endpoint and traceback
    Massimo Di Stefano
    @epifanio
    how to do thatg?
    :) i should know
    Tom Kralidis
    @tomkralidis
    lol
    Massimo Di Stefano
    @epifanio
    it was already enabled, this is a snippet of it: https://gist.github.com/0cee2e5190944188bc97dfa7d108197b
    seems a postgis issue: psycopg2.errors.UndefinedFunction: function get_spatial_overlay_rank(text, unknown) does not exist
    can it be?
    Tom Kralidis
    @tomkralidis
    looks like a pycsw config issue. Let’s discuss elsewhere (given this is not an OWSLib issue)
    Massimo Di Stefano
    @epifanio
    ok :) thanks!!!
    Massimo Di Stefano
    @epifanio
    that worked!
    Tom Kralidis
    @tomkralidis
    :+1:
    Massimo Di Stefano
    @epifanio
    demo in the readme
    TimeSeriesProfile is the less boring
    Massimo Di Stefano
    @epifanio
    quick question about filtering .. with owslib .. if I use this syntax in the constraints : csw.getrecords2(constraints=[sentinel_query, bbox_query]) i will get the union as a results
    how to get an intersection :) ?
    between the 2 query: [sentinel_query, bbox_query]
    Tom Kralidis
    @tomkralidis
    Massimo Di Stefano
    @epifanio
    +100
    Massimo Di Stefano
    @epifanio
    testing query .. I can't get my head around the box query

    why thius query:

    from owslib.csw import CatalogueServiceWeb
    from owslib.fes import PropertyIsEqualTo, PropertyIsLike, BBox
    
    endpoint='https://csw.epinux.com'
    csw = CatalogueServiceWeb(endpoint,timeout=30)
    
    bbox=[2,50,15,70]
    bbox_query = BBox(bbox)
    
    equalTo_query = [PropertyIsEqualTo('csw:AnyText', 'sentinel')]
    
    csw.getrecords2(constraints=[equalTo_query, bbox_query], maxrecords=20)

    returns 10 records
    while this one:

    csw.getrecords2(constraints=[bbox_query], maxrecords=20)

    returns 0

    Massimo Di Stefano
    @epifanio
    for the first query: csw.results gives me: {'matches': 442291, 'returned': 10, 'nextrecord': 11}
    for the second one 0
    and also: csw.getrecords2(constraints=equalTo_query, maxrecords=20) compared with csw.getrecords2(constraints=[equalTo_query, bbox_query], maxrecords=20)
    returns the same result .. so bbox is not taking place
    Tom Kralidis
    @tomkralidis
    @epifanio this works (note the double list notation is now in the getrecords2 function:
    from owslib.csw import CatalogueServiceWeb
    from owslib.fes import PropertyIsEqualTo, PropertyIsLike, BBox
    
    endpoint='https://csw.epinux.com'
    csw = CatalogueServiceWeb(endpoint,timeout=30)
    
    bbox=[2,50,15,70]
    bbox_query = BBox(bbox)
    
    equalTo_query = PropertyIsEqualTo('csw:AnyText', 'sentinel')
    
    csw.getrecords2(constraints=[[equalTo_query, bbox_query]], maxrecords=20)
    print(csw.request)
    print(csw.results)
    
    csw.getrecords2(constraints=[bbox_query], maxrecords=20)
    print(csw.request)
    print(csw.results)
    Massimo Di Stefano
    @epifanio

    thanks! I think I am getting there, thanks for the working example :) - now dealing with the extraction of the extent for each dataset - I got it with something like:

    for rec in csw.records:
        bbox = vars(csw.records[rec].bbox)

    which I'm gonna use to create a geojson feature.
    I am not quite sure about how to work with the generator returned by the query.
    I can get the first 10 records .. but how to access the next in the results? Do I need to repeat the query by changing the startposition parameter .. until I get all of them?

    say, csw.results gives me:

    {'matches': 274536, 'returned': 10, 'nextrecord': 11}

    I can get the values for the first "returned" 10 elements, by looping over it, like:

    for rec in csw.records:
        appendJsonFeature(name = csw.records[rec].identifiers, 
                                                   geom = vars(csw.records[rec].bbox))

    How to get the next 10 ,, and so on .. ?
    do I need to re-issue the query, like:

    startposition = csw.results['nextrecord']
    csw.getrecords2(constraints=[[equalTo_query, bbox_query]], maxrecords=20, esn='full', startposition=startposition)

    until startposition reaches the 'matches' records?

    Massimo Di Stefano
    @epifanio
    Got it :)
    David Huard
    @huard
    Would it be possible to make an OWSLib release sometime in early December ?
    Tom Kralidis
    @tomkralidis
    no objections here, @cehbrecht ?
    MacPingu
    @cehbrecht

    no objections here, @cehbrecht ?

    +1

    I can try to fix the tests before the release.
    Tom Kralidis
    @tomkralidis

    Hi all: FYI 0.21.0 has been released: https://lists.osgeo.org/pipermail/owslib-users/2020-December/000194.html

    Thanks for everyone’s contributions and @cehbrecht for continued support.

    MacPingu
    @cehbrecht
    @tomkralidis Thanks : 😊
    Tom Kralidis
    @tomkralidis
    @cehbrecht what do you think of moving OWSLib CI from Travis to GitHub Actions?
    MacPingu
    @cehbrecht

    @cehbrecht what do you think of moving OWSLib CI from Travis to GitHub Actions?

    @tomkralidis sounds good :)

    this one test fails
    similar to travis
    Tom Kralidis
    @tomkralidis
    looks like the test needs to be fixed/updated
    David Huard
    @huard
    Hi @tomkralidis, colleagues at CRIM have developed Weaver, a middleware that can expose WPS1.0 services from multiples servers as an aggregated WPS3.0 REST interface. We'd like to start building client services around this in the upcoming year. My question for you is where should this development take place? Is this something that should go in OWSLib as an "experimental" feature, or is there a pygeoapi-client, or you feel it's too early and we should keep this code in birdy for example (our high level OWSLib.wps wrapper)?
    Tom Kralidis
    @tomkralidis
    @huard by WPS3.0 REST interface, do you mean OGC API - Processes?
    David Huard
    @huard
    Yes, I think that's it.
    Tom Kralidis
    @tomkralidis
    so "OAProc” if you will. We are building out the OGC API part of OWSLib in a clean break style in https://github.com/geopython/OWSLib/tree/master/owslib/ogcapi . I would see a processes.py being put there, for example?
    David Huard
    @huard
    Got it, thanks !
    Tom Kralidis
    @tomkralidis
    note that owslib/ogcapi/__init__.py is akin to “OGC API - Common”. And the code is new-ish Python (function annotations, etc.). Looking forward to your improvements/contributions!