Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement remaining spatial filters in owslib.fes #128

Closed
kwilcox opened this issue Mar 3, 2014 · 5 comments
Closed

Implement remaining spatial filters in owslib.fes #128

kwilcox opened this issue Mar 3, 2014 · 5 comments

Comments

@kwilcox
Copy link
Member

kwilcox commented Mar 3, 2014

Only BBOX is currently implemented

@lpinner
Copy link

lpinner commented Jan 6, 2015

+1 for this to be implemented.

I'm currently working around with some simple envelope only code based on the owslib.fes.BBox code:

## owslib.fes only supports BBox spatial filter, so add a few more
## Modified by Luke Pinner (2014) from original owslib.fes.BBox code
class SpatialOp(OgcExpression):
    """Construct a BBox, two pairs of coordinates (west-south and east-north)"""
    def __init__(self, operator, bbox, crs=None):
        self.operator = operator
        self.bbox = bbox
        self.crs = crs
    def toXML(self):
        tmp = etree.Element(util.nspath_eval(self.operator, namespaces))
        etree.SubElement(tmp, util.nspath_eval('ogc:PropertyName', namespaces)).text = 'ows:BoundingBox'
        tmp2 = etree.SubElement(tmp, util.nspath_eval('gml:Envelope', namespaces))
        if self.crs is not None:
            tmp2.set('srsName', self.crs)
        etree.SubElement(tmp2, util.nspath_eval('gml:lowerCorner', namespaces)).text = '%s %s' % (self.bbox[0], self.bbox[1])
        etree.SubElement(tmp2, util.nspath_eval('gml:upperCorner', namespaces)).text = '%s %s' % (self.bbox[2], self.bbox[3])
        return tmp

class Contains(SpatialOp):
    def __init__(self, bbox, crs=None):
        SpatialOp.__init__(self,'ogc:Contains',bbox,crs)

class Disjoint(SpatialOp):
    def __init__(self, bbox, crs=None):
        SpatialOp.__init__(self,'ogc:Disjoint',bbox,crs)

class Within(SpatialOp):
    def __init__(self, bbox, crs=None):
        SpatialOp.__init__(self,'ogc:Within',bbox,crs)

@Zeitsperre
Copy link
Contributor

Is this issue still a work in progress ?

@huard
Copy link
Contributor

huard commented Jul 5, 2021

Fixed for WFS2.0 and POST requests in #780

Copy link

github-actions bot commented Oct 6, 2024

This Issue has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.

@github-actions github-actions bot added the stale label Oct 6, 2024
Copy link

This Issue has been closed due to there being no activity for more than 90 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants