|
@@ -40,9 +40,8 @@ class OWS:
|
|
|
if qstring:
|
|
if qstring:
|
|
|
self.qstring = qstring
|
|
self.qstring = qstring
|
|
|
|
|
|
|
|
- configFiles = [
|
|
|
|
|
- os.path.join(os.path.dirname(__file__),"config.cfg")
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ configFiles = [ os.path.join(os.path.dirname(__file__),"config.cfg") ]
|
|
|
|
|
+
|
|
|
if sys.platform == "win32":
|
|
if sys.platform == "win32":
|
|
|
pass # TODO Default conf. file on windows platform
|
|
pass # TODO Default conf. file on windows platform
|
|
|
elif sys.platform == "linux2":
|
|
elif sys.platform == "linux2":
|
|
@@ -286,7 +285,7 @@ class OWS:
|
|
|
# layerobj.metadata.get("wfs_filter") is still fine
|
|
# layerobj.metadata.get("wfs_filter") is still fine
|
|
|
|
|
|
|
|
|
|
|
|
|
-def getService():
|
|
|
|
|
|
|
+def getService(configFile=None):
|
|
|
|
|
|
|
|
qstring = os.environ["QUERY_STRING"]
|
|
qstring = os.environ["QUERY_STRING"]
|
|
|
params = urlparse.parse_qs(qstring)
|
|
params = urlparse.parse_qs(qstring)
|
|
@@ -310,13 +309,13 @@ def getService():
|
|
|
if params["owsService"][0].lower() == "wfs":
|
|
if params["owsService"][0].lower() == "wfs":
|
|
|
from wfs import WFS
|
|
from wfs import WFS
|
|
|
logging.debug("OWS.py::getService()::owsUrl: '%s'" % owsUrl)
|
|
logging.debug("OWS.py::getService()::owsUrl: '%s'" % owsUrl)
|
|
|
- return WFS(owsUrl,qstring)
|
|
|
|
|
|
|
+ return WFS(owsUrl,qstring,configFile = configFile )
|
|
|
elif params["owsService"][0].lower() == "wcs":
|
|
elif params["owsService"][0].lower() == "wcs":
|
|
|
from wcs import WCS
|
|
from wcs import WCS
|
|
|
- return WCS(owsUrl,qstring)
|
|
|
|
|
|
|
+ return WCS(owsUrl,qstring, configFile = configFile)
|
|
|
elif params["owsService"][0].lower() == "wms":
|
|
elif params["owsService"][0].lower() == "wms":
|
|
|
from wms import WMS
|
|
from wms import WMS
|
|
|
- return WMS(owsUrl,qstring)
|
|
|
|
|
|
|
+ return WMS(owsUrl,qstring, configFile = configFile)
|
|
|
else:
|
|
else:
|
|
|
raise OWSExceptions.MissingParameterValue("""owsUrl or owsService""")
|
|
raise OWSExceptions.MissingParameterValue("""owsUrl or owsService""")
|
|
|
|
|
|