Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Massimo Di Stefano
    @epifanio
    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!
    David Huard
    @huard
    No problem. FYI, work on this is not planned short-term, but later in the year. We're still working on the server-side deployment.
    Tom Kralidis
    @tomkralidis
    Great/+1
    check out the recent update we made in pygeoapi for job management, if any of that is helpful
    Tom Kralidis
    @tomkralidis
    @cehbrecht et. al. if possible I’d like to cut a release of OWSLib given the recent 19115-2 enhancements, so 0.22.0. Any objections/comments/considerations?
    Angelos Tzotsos
    @kalxas
    +1
    MacPingu
    @cehbrecht
    +1
    Tom Kralidis
    @tomkralidis
    thanks. 0.22.0 released.
    MacPingu
    @cehbrecht
    @tomkralidis can we make a new release 0.23.0 with the latest fixes? Just wait for this one (or merge it):
    geopython/OWSLib#739
    Tom Kralidis
    @tomkralidis
    sure, feel free to merge if you approve @cehbrecht and we can cut a release. Is there anything driving this one?
    MacPingu
    @cehbrecht

    @tomkralidis I have prepared the release 0.23:
    geopython/OWSLib#744

    Please cut a release 0.23.0. It has a fix for the wcs timeout issue:
    geopython/OWSLib#738

    Tom Kralidis
    @tomkralidis
    thanks @cehbrecht does the fix constitue 0.23.0 or 0.22.1 ?
    MacPingu
    @cehbrecht
    The list of fixes is longer … so I suggested 0.23.0.
    Tom Kralidis
    @tomkralidis
    ok thanks. I will cut 0.23.0 tomorrow.
    MacPingu
    @cehbrecht
    Thanks 😊
    Tom Kralidis
    @tomkralidis
    thank you :) FYI 0.23.0 released.
    MacPingu
    @cehbrecht

    thank you :) FYI 0.23.0 released.

    :thumbsup:

    Paul van Genuchten
    @pvgenuchten
    I'm trying the docs of owslib on ogcapi-records
    image.png
    at records, don't you need to select a collection first? or if there is 1 collection, it will automatically use that one?