Changeset 5879


Ignore:
Timestamp:
23/10/09 16:38:51 (10 years ago)
Author:
pnorton
Message:

Minor tidying up.

Location:
qesdi/wms_ddc_vis/trunk/lib/wms_ddc_vis/controllers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • qesdi/wms_ddc_vis/trunk/lib/wms_ddc_vis/controllers/coastwms.py

    r5849 r5879  
    11import logging 
    22 
    3 import thread 
    4 import re 
    5 import simplejson as json 
    63 
    74from StringIO import StringIO 
    85from sets import Set 
    9 from matplotlib.cm import get_cmap 
    10 from pylons import request, response, c 
    11 from routes import url_for 
    12 from routes.util import GenerationException 
    13 from genshi.template import NewTextTemplate 
    14 from cows.pylons.wms_controller import WMSController 
    15 from cows.model.wms import WmsDatasetSummary, Dimension, DataURL 
    16 from cows.model import PossibleValues, WGS84BoundingBox, BoundingBox, Contents 
     6import genshi.template  
    177from cows.pylons import ows_controller 
    18 from cows.exceptions import * 
    19 from cows import bbox_util 
    208from cows.service.imps.data_reader_geoplot_backend.rendering_option import RenderingOption 
    219from cows.service.imps.data_reader_geoplot_backend.slab_options_parser import SlabOptionsParser 
    2210from cows.service.imps.data_reader_geoplot_backend.slab_options_json_generator import SlabJSONGenerator 
    23  
    24 from wms_ddc_vis.lib.image_import import Image 
     11from cows.model import WGS84BoundingBox, BoundingBox, Contents 
     12from cows.exceptions import InvalidParameterValue 
     13 
     14from routes import url_for 
     15from cows.model.wms import WmsDatasetSummary 
    2516from wms_ddc_vis.lib.wms_request_log_utils import buildLogString, wms_request_logger 
    2617 
     
    2920from geoplot.layer_drawer_coastline import LayerDrawerCoastlines 
    3021 
    31 from cows.model.wms import Style, LegendURL, FormattedURL, MetadataURL 
     22from wms_ddc_vis.lib.base import request, response, c 
     23 
     24from cows.model.wms import MetadataURL 
    3225from cows.xml.iso19115_subset import OnlineResource 
    3326 
     
    7366        if format == 'application/json': 
    7467            t = ows_controller.templateLoader.load('wms_capabilities_json.txt', 
    75                                                    cls=NewTextTemplate) 
     68                                                   cls=genshi.template.NewTextTemplate) 
    7669        elif version == '1.1.1': 
    7770            t = ows_controller.templateLoader.load('wms_capabilities_1_1_1.xml') 
     
    310303            response.headers['Content-Type'] = format 
    311304            t = ows_controller.templateLoader.load('wms_context_json.txt', 
    312                                                    cls=NewTextTemplate) 
     305                                                   cls=genshi.template.NewTextTemplate) 
    313306            return t.generate(c=c).render() 
    314307         
  • qesdi/wms_ddc_vis/trunk/lib/wms_ddc_vis/controllers/csmlwms.py

    r5849 r5879  
    11import logging 
    2 import simplejson as json 
     2import time 
     3 
    34from geoplot.plot_lat_lon import PlotLatLon  
    45from geoplot.contour_plot import ContourPlot 
     
    219220        return lowerDictionary 
    220221 
    221                  
     222 
     223    def GetMap(self): 
     224        st = time.time() 
     225        WMSController.GetMap(self) 
     226        log.debug("Got Image response in %ss" % (time.time() - st))                 
  • qesdi/wms_ddc_vis/trunk/lib/wms_ddc_vis/controllers/csmlwms_csml.py

    r5849 r5879  
    11import logging 
     2import time 
    23 
    34from cows.pylons.wms_controller import WMSController 
     
    56 
    67from wms_ddc_vis.lib.wms_request_log_utils import buildLogString, wms_request_logger 
    7  
     8from wms_ddc_vis.lib.base import request 
    89log = logging.getLogger(__name__) 
    910 
    10 class Csmlwms2Controller(WMSController): 
     11class CsmlwmsCsmlController(WMSController): 
    1112    layerMapper = CSMLwmsLayerMapper() 
    1213 
     
    1718 
    1819 
    19  
     20    def GetMap(self): 
     21        st = time.time() 
     22        WMSController.GetMap(self) 
     23        log.debug("Got Image response in %ss" % (time.time() - st)) 
Note: See TracChangeset for help on using the changeset viewer.