I have loaded rasters from PostGIS and Oracle Spatial 11g with below script. Both layers are visible in QGIS Dekstop. My OWS settings are correct but the Oracle raster layers are not visible in QGIS-Web-Client.

Why are these not visible?

uri = QgsDataSourceURI()
uri.setConnection("localhost", "5432", "MYRASTER", "postgres", "password")
connString = "PG: dbname=MYRASTER host=localhost user=postgres password=pass port=5432 mode=2 schema=public column=rast table=demelevation" 
layer = QgsRasterLayer( connString, "My Postgres Raster" )
QgsMapLayerRegistry.instance().addMapLayer( layer )

#Connect to Oracle and Fetch Table Names 
con = cx_Oracle.connect('ins/ins@')
print con.version
cur = con.cursor()
cur.execute(u"select DISTINCT RASTERID from MASTER_RDT ")
tables = cur.fetchall()
print tables

print "Layer loop"
for t in tables :
   print str(t[0])
   conn3= str(t[0])

Figured it out by trial and error.If the Layer name is comma separated like MYRASTER,2348 the layer is visible in Desktop but not in Web Client.I changed the name of Oracle rasters to single word and now can view them QGIS Web Client.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.