istsoslib.filters package¶
Submodules¶
istsoslib.filters.DS_filter module¶
-
istsoslib.filters.DS_filter.
get_fake_ds
(procedure, sosConfig)¶
-
class
istsoslib.filters.DS_filter.
sosDSfilter
(sosRequest, method, requestObject, sosConfig)¶ Bases:
istsoslib.filters.filter.sosFilter
filter object for a DescribeSensor request
This is an extension of the base filter class (sosFilter) to accept DescribeSensor request and add specific parameters
-
request
¶ the request submitted
Type: str
-
service
¶ the name of the service requested
Type: str
-
version
¶ the version of the service
Type: str
-
outputFormat
¶ the outputFormat
Type: str
-
procedure
¶ the name of the procedure to be described
Type: str
-
istsoslib.filters.GC_filter module¶
-
class
istsoslib.filters.GC_filter.
sosGCfilter
(sosRequest, method, requestObject, sosConfig)¶ Bases:
istsoslib.filters.filter.sosFilter
filter object for a GetCapabalities request
This is an extension of the base filter class (sosFilter) to accept GetCapabilities request and add specific parameters
-
request
¶ the request submitted
Type: str
-
service
¶ the name of the service requested
Type: str
-
version
¶ the version of the service
Type: str
-
sections
¶ the requested sections names, if not provided the default value is [“all”]
Type: list
-
istsoslib.filters.GF_filter module¶
-
class
istsoslib.filters.GF_filter.
sosGFfilter
(sosRequest, method, requestObject, sosConfig)¶ Bases:
istsoslib.filters.filter.sosFilter
filter object for a GetFeatureOfInterest request
This is an extension of the base filter class (sosFilter) to accept GetFeatureOfInterest request and add specific parameters
-
request
¶ the request submitted
Type: str
-
service
¶ the name of the service requested
Type: str
-
version
¶ the version of the service
Type: str
-
featureOfInterest
¶ the FeatureOfInterestId
Type: str
-
srsName
¶ the desired EPSG code of results, if missing the default istSOS reference system is used
Type: str
-
istsoslib.filters.GO_filter module¶
-
class
istsoslib.filters.GO_filter.
sosGOfilter
(sosRequest, method, requestObject, sosConfig)¶ Bases:
istsoslib.filters.filter.sosFilter
filter object for a GetObservations request
-
request
¶ the request submitted
Type: str
-
service
¶ the name of the service requested
Type: str
-
version
¶ the version of the service
Type: str
-
sosConfig
¶ the configuration preference of istSOS instance
Type: obj
-
offering
¶ the requeste offering name
Type: str
-
observedProperty
¶ the list of observed properties names as string
Type: list
-
responseFormat
¶ the name of the desired output format
Type: str
-
srsName
¶ the EPSG code of the desired reference system
Type: str
-
eventTime
¶ list of time intervals (list of two isodate) and/or time instants (list of one isodate), for example: [ [2014-10-11T12:00:00+02:00, 2014-11-11T12:00:00+02:00], [2014-13-11T12:00:00+02:00] ]
Type: list
-
procedure
¶ list of procedure names as string
Type: list
-
featureOfInterest
¶ list of feature of interest names as string
Type: list
-
featureOfInterestSpatial
¶ the SQL WHERE clause to apply the OGC filter expression in XML format specified in the request
Type: str
-
result
¶ the SQL WHERE clause to apply the OGC property operator in XML format specified in the request
Type: str
-
resultModel
¶ the model to represent the result (om:Observation)
Type: str
-
responseMode
¶ the response mode (inline)
Type: str
-
aggregate_interval
¶ the aggregation interval in ISO 8601 duration
Type: str
-
aggregate_function
¶ the function to use for aggregation (one of: “AVG”,”COUNT”,”MAX”,”MIN”,”SUM”)
Type: str
-
aggregate_nodata_qi
¶ the quality index value to use for representing no data in aggregated time serie
Type: str
-
qualityIndex
¶ if the quality index shall be returned (True) or not (False)
Type: bool
-
qualityFilter
¶ CQL-like filter on quality index (>200 returns all the records with all QI greater then 200)
Type: str
-
istsoslib.filters.IO_filter module¶
-
class
istsoslib.filters.IO_filter.
sosIOfilter
(sosRequest, method, requestObject, sosConfig)¶ Bases:
istsoslib.filters.filter.sosFilter
Filter object for a InsertObservation request
-
request
¶ the request submitted
Type: str
-
service
¶ the name of the service requested
Type: str
-
version
¶ the version of the service
Type: str
-
assignedSensorId
¶ the requested sensor id
Type: str
-
forceInsert
¶ if True overrides existing observations falling in the interval
Type: bool
-
procedure
¶ the name of the procedure
Type: str
-
oprName
¶ the names of thr observed properties
Type: list
-
samplingTime
¶ the time period of the observations to be inserted
Type: str
-
foiName
¶ the name of the feature of featureOfInterest
Type: str
-
parameters
¶ the ordered list of unit of the parameters
Type: list
-
uom
¶ the ordered list of unit of minutes associated with the parameters
Type: list
-
data
¶ a dictionary of parameter’s dictionaries with unit of minutes and values, e.g.:
Type: dict
-
.. code::
- data = {
- “urn:ist:parameter:time:iso8601”:
- {
“uom”:”sec”, “vals”:[“2009-07-31T12:00:00+02:00”,
“2009-07-31T12:10:00+02:00”, “2009-07-31T12:20:00+02:00”]
},
- “urn:ist:def:phenomenon:rainfall”:
- {
- “uom”:”mm”, “vals”:[0.1,0.2,0.3,0.4]
}
}
-
istsoslib.filters.RS_filter module¶
-
class
istsoslib.filters.RS_filter.
sosRSfilter
(sosRequest, method, requestObject, sosConfig)¶ Bases:
istsoslib.filters.filter.sosFilter
filter object for a registerSensor request
-
request
¶ the request submitted
Type: str
-
service
¶ the name of the service requested
Type: str
-
version
¶ the version of the service
Type: str
-
procedure
¶ the procedure name
Type: str
-
time_sam_val
¶ the sampling time resolution
Type: int
-
time_acq_val
¶ the acquisition taime resolution
Type: int
-
systemType
¶ the system type
Type: str
-
xmlSensorDescription
¶ the sensor description etree’s element
Type: obj
-
oprDef
¶ ordered list of observed properties definition
Type: list
-
oprDesc
¶ ordered list of observed properties description
Type: list
-
oprName
¶ ordered list of observed properties name
Type: list
-
foiName
¶ feature of interest name
Type: str
-
foiType
¶ feature of interest geometry type
Type: str
-
foiSRS
¶ feature of interest EPSG code
Type: str
-
foiGML
¶ feature of interest GML representation
Type: str
-
parameters
¶ ordered list of parameters observed by the sensor
Type: list
-
uoms
¶ ordered list of unit of measures (indexed as parameters)
Type: list
-
names
¶ ordered list of parameters’s names (indexed as parameters)
Type: list
-
descs
¶ ordered list of parameters’s description (indexed as parameters)
Type: list
-
constr
¶ ordered list of parameters’s constraints (indexed as parameters)
Type: list
-
partime
¶ ordered list 0-1 values identifing the time parameter (1) or not (0) (indexed as parameters)
Type: list
-
beginPosition
¶ set to NULL (TODO: CHECK IF REQUIRED!)
Type: str
-
xmlSensorDescription
= None from xml.dom.minidom import parseString txt = et.tostring(root, encoding=”UTF-8”) self.xmlSensorDescription = parseString(txt).toprettyxml()
-
istsoslib.filters.USD_filter module¶
-
class
istsoslib.filters.USD_filter.
sosUSDfilter
(sosRequest, method, requestObject, sosConfig)¶ Bases:
istsoslib.filters.filter.sosFilter
filter object for an updateSensorDescription request
-
request
¶ the request submitted
Type: str
-
service
¶ the name of the service requested
Type: str
-
version
¶ the version of the service
Type: str
-
assignedSensorId
¶ the assigned sensor ID
Type: str
-
xmlSensorDescription
¶ the XML representation of the senor description
Type: str
-
istsoslib.filters.factory_filters module¶
istsoslib.filters.filter module¶
-
class
istsoslib.filters.filter.
sosFilter
(sosRequest, method, requestObject, sosConfig)¶ SOS request base filters
Intercept the request and extract user inputs preferences
-
request
¶ the request submitted
Type: str
-
service
¶ the name of the service requested
Type: str
-
version
¶ the version of the service
Type: str
-
istsoslib.filters.filter_utils module¶
-
istsoslib.filters.filter_utils.
getElemAtt
(node, att)¶ Return the attribute of an XML node element
Parameters: - node – the etree node element
- att – the attribute name
Returns: The string of the attribute value
Raises: Exception – node has not attribute
-
istsoslib.filters.filter_utils.
getElemTxt
(node)¶ Return the text value of an XML node
Parameters: node – the etree node element Returns: The string of the node value Raises: Exception – node has no child node or is not of type TEXT
-
istsoslib.filters.filter_utils.
get_name_from_urn
(stringa, urnName, sosConfig)¶ Validate the URN and extract the name (last elment)
Parameters: - stringa – URN type
- urnName – URN
- sosConfig – istSOS configuration object
Returns: The name of the URN element
Raises: Exception – Urn is not valid