I used below script to connect to postgres and load layers successfully.I want to aceive this using Oracle Spatial for both vector and raster loading.How can I achieve that?In other words what is the equivalent of postgis_utils for Oracle Spatial.From QGIS Desktop,I am able to load both raster and vector.This indicates QGIS has certain libraries to connect to Oracle and import GIS data.How can I use those libraries in standalone python script?
uri = QgsDataSourceURI()
uri.setConnection("localhost", "5432", "mydb", "postgres", "passcode")
db = postgis_utils.GeoDB(host="localhost", port=5432, dbname="v",user="postgres", passwd="passcode")
print db
tables =db.list_geotables()
print tables
render = QgsMapRenderer()
for t in tables :
uri.setDataSource(str(t[1]), str(t[0]), str(t[6]))
uri.uri()
vlayer = QgsVectorLayer(uri.uri(), str(t[0]), "postgres")
QgsMapLayerRegistry.instance().addMapLayer(vlayer)
lst = [ vlayer.id() ]
render.setLayerSet(lst)
rect = QgsRectangle(render.fullExtent())
rect.scale(1.1)
render.setExtent(rect)