Skip to content

Commit

Permalink
add CSW 3 client
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Feb 15, 2021
1 parent 14226ad commit 53eea3d
Show file tree
Hide file tree
Showing 13 changed files with 2,120 additions and 891 deletions.
7 changes: 7 additions & 0 deletions owslib/catalogue/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# =============================================================================
# Copyright (c) 2021 Tom Kralidis
#
# Authors : Tom Kralidis <tomkralidis@gmail.com>
#
# Contact email: tomkralidis@gmail.com
# =============================================================================
849 changes: 849 additions & 0 deletions owslib/catalogue/csw2.py

Large diffs are not rendered by default.

733 changes: 733 additions & 0 deletions owslib/catalogue/csw3.py

Large diffs are not rendered by default.

902 changes: 60 additions & 842 deletions owslib/csw.py

Large diffs are not rendered by default.

43 changes: 2 additions & 41 deletions owslib/fes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: ISO-8859-15 -*-
# =============================================================================
# Copyright (c) 2009 Tom Kralidis
# Copyright (c) 2021 Tom Kralidis
#
# Authors : Tom Kralidis <tomkralidis@gmail.com>
#
Expand All @@ -12,7 +12,7 @@
Filter Encoding: http://www.opengeospatial.org/standards/filter
Currently supports version 1.1.0 (04-095).
Supports version 1.1.0 (04-095).
"""

from owslib.etree import etree
Expand Down Expand Up @@ -213,45 +213,6 @@ def __init__(self, elem):
'ogc:Scalar_Capabilities/ogc:ComparisonOperators/ogc:ComparisonOperator', namespaces))]


class FilterCapabilities200(object):
"""Abstraction for Filter_Capabilities 2.0"""
def __init__(self, elem):

if elem is None:
self.spatial_operands = []
self.spatial_operators = []
self.temporal_operators = []
self.temporal_operands = []
self.scalar_comparison_operators = []
self.conformance = []
return

# Spatial_Capabilities
self.spatial_operands = [f.attrib.get('name') for f in elem.findall(util.nspath_eval(
'fes:Spatial_Capabilities/fes:GeometryOperands/fes:GeometryOperand', namespaces))]
self.spatial_operators = []
for f in elem.findall(util.nspath_eval(
'fes:Spatial_Capabilities/fes:SpatialOperators/fes:SpatialOperator', namespaces)):
self.spatial_operators.append(f.attrib['name'])

# Temporal_Capabilities
self.temporal_operands = [f.attrib.get('name') for f in elem.findall(util.nspath_eval(
'fes:Temporal_Capabilities/fes:TemporalOperands/fes:TemporalOperand', namespaces))]
self.temporal_operators = []
for f in elem.findall(util.nspath_eval(
'fes:Temporal_Capabilities/fes:TemporalOperators/fes:TemporalOperator', namespaces)):
self.temporal_operators.append(f.attrib['name'])

# Scalar_Capabilities
self.scalar_comparison_operators = [f.text for f in elem.findall(util.nspath_eval(
'fes:Scalar_Capabilities/fes:ComparisonOperators/fes:ComparisonOperator', namespaces))]

# Conformance
self.conformance = []
for f in elem.findall(util.nspath_eval('fes:Conformance/fes:Constraint', namespaces)):
self.conformance[f.attrib.get('name')] = f.find(util.nspath_eval('fes:DefaultValue', namespaces)).text


def setsortby(parent, propertyname, order='ASC'):
"""
Expand Down
Loading

0 comments on commit 53eea3d

Please sign in to comment.