-
Notifications
You must be signed in to change notification settings - Fork 278
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
Comments
+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) |
Is this issue still a work in progress ? |
Fixed for WFS2.0 and POST requests in #780 |
This Issue has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days. |
This Issue has been closed due to there being no activity for more than 90 days. |
Only BBOX is currently implemented
The text was updated successfully, but these errors were encountered: