istsoslib package¶
Subpackages¶
- istsoslib.filters package
- Submodules
- istsoslib.filters.DS_filter module
- istsoslib.filters.GC_filter module
- istsoslib.filters.GF_filter module
- istsoslib.filters.GO_filter module
- istsoslib.filters.IO_filter module
- istsoslib.filters.RS_filter module
- istsoslib.filters.USD_filter module
- istsoslib.filters.factory_filters module
- istsoslib.filters.filter module
- istsoslib.filters.filter_utils module
- Module contents
- istsoslib.renderers package
- Submodules
- istsoslib.renderers.DSresponseRender module
- istsoslib.renderers.GCresponseRender module
- istsoslib.renderers.GFresponseRender module
- istsoslib.renderers.GOresponseRender module
- istsoslib.renderers.IOresponseRender module
- istsoslib.renderers.RSresponseRender module
- istsoslib.renderers.USDresponseRender module
- istsoslib.renderers.factory_render module
- Module contents
- istsoslib.responders package
- Submodules
- istsoslib.responders.DSresponse module
- istsoslib.responders.GCresponse module
- istsoslib.responders.GFresponse module
- istsoslib.responders.GOresponse module
- istsoslib.responders.IOresponse module
- istsoslib.responders.RSresponse module
- istsoslib.responders.USDresponse module
- istsoslib.responders.factory_response module
- Module contents
Submodules¶
istsoslib.sosDatabase module¶
-
class
istsoslib.sosDatabase.Database¶ Connect to a database
-
closeConnection()¶ Close a database connection
-
dbName= None¶
-
getConnection()¶ Return a database connection
-
host= None¶
-
password= None¶
-
port= None¶
-
user= None¶
-
-
class
istsoslib.sosDatabase.PgDB(user, password, dbName, host='localhost', port='5432', tz=None)¶ Bases:
istsoslib.sosDatabase.DatabaseConnect to a PostgreSQL database
-
commitTransaction()¶ Commit current transaction
-
execute(sql, par=None)¶ Execute an sql statement
-
executeInTransaction(sql, par=None)¶ Execute an sql statement in an open session
-
host= None¶
-
insertMany(sql, dict)¶ Insert many values at once
-
insertManyInTransaction(sql, dict)¶ Insert many values at once
-
mogrify(sql, par=None)¶ Mogrify an sql statement (print the actual sql query that will be executed)
-
rollbackTransaction()¶ Rollback current transaction
-
select(sql, par=None)¶ Execute a select statement
-
select_array(sql, par=None)¶ Execute a select statement
-
setTimeTZ(tz)¶ Set the database Time Zone for this connection:
@param tz: object that define the Time Zone
Note
The input parameter can be af differents types: 1. A String that can be handled by postgresql (see Time Zone
- An integer, for instance -7. The time zone 7 hours west from UTC (equivalent to PDT / -07:00). Positive values are east from UTC.
- A datetime with timezone information
-
to_csv(sql, par=None, delimiter=', ')¶ Execute a select statement
-
to_string(sql, par=None, delimiter=', ', lineterminator='\n')¶
-
istsoslib.sosException module¶
-
exception
istsoslib.sosException.SOSException(code, locator, msg, othermsgs=[])¶ Bases:
exceptions.ValueErrorSOS Exception class
-
code¶ the error code
Type: int
-
locator¶ the locator identifing where error occurred
Type: str
-
msg¶ the error message
Type: str
-
children¶ the children errors
Type: list
-
AddText(text)¶ append child error text
-
ToXML()¶ render as XML
-
exception= ' <Exception exceptionCode="%s">\n%s \n </Exception>'¶
-
exceptionLoc= ' <Exception locator="%s" exceptionCode="%s">\n%s \n </Exception>'¶
-
exceptionreport= '<?xml version="1.0" encoding="UTF-8" standalone="no"?><ExceptionReport xmlns="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/1.1 ../owsExceptionReport.xsd" version="1.0.0" xml:lang="en">\n%s \n</ExceptionReport>'¶
-
exceptiontext= ' <ExceptionText>\n %s\n </ExceptionText>'¶
-
istsoslib.sosUtils module¶
-
istsoslib.sosUtils.CQLvalueFilter2PostgisSql(fildName, CQLfilter)¶ parse a CQL filter and returen an SQL filter
-
istsoslib.sosUtils.childElementNodes(xmlnode)¶
-
istsoslib.sosUtils.ogcCompCons2PostgisSql(ogcComparisonOperator)¶ parse an ogc property operator element and convert it to a PostGIS SQL WHERE clause
-
istsoslib.sosUtils.ogcSpatCons2PostgisSql(ogcSpatialOperator, geomField, epsgField)¶ parse an ogc spatial operator element and convert it to a PostGIS SQL spatial WHERE clause
