Ejemplo n.º 1
0
 def GetMap(self, params):
     if params['width'] > int(self.conf.get(
             'service', 'maxwidth')) or params['height'] > int(
                 self.conf.get('service', 'maxheight')):
         raise OGCException(
             'Requested map size exceeds limits set by this server.')
     return WMSBaseServiceHandler.GetMap(self, params)
Ejemplo n.º 2
0
 def GetMap(self, params):
     if params['width'] > int(self.conf.get(
             'service', 'maxwidth')) or params['height'] > int(
                 self.conf.get('service', 'maxheight')):
         raise OGCException(
             'Requested map size exceeds limits set by this server.')
     if str(params['crs']) != str(self.crs):
         raise OGCException(
             'Unsupported CRS requested.  Must be "%s" and not "%s".' %
             (self.crs, params['crs']), 'InvalidCRS')
     return WMSBaseServiceHandler.GetMap(self, params)
Ejemplo n.º 3
0
 def _buildMap(self, params):
     """ Override _buildMap method to handle reverse axis ordering in WMS 1.3.0.
     
     More info: http://mapserver.org/development/rfc/ms-rfc-30.html
     
     'when using epsg code >=4000 and <5000 will be assumed to have a reversed axes.'
     
     """
     # Call superclass method
     m = WMSBaseServiceHandler._buildMap(self, params)
     # for range of epsg codes reverse axis
     if params['crs'].code >= 4000 and params['crs'].code < 5000:
         m.zoom_to_box(Envelope(params['bbox'][1], params['bbox'][0], params['bbox'][3], params['bbox'][2]))
     return m    
Ejemplo n.º 4
0
 def _buildMap(self, params):
     """ Override _buildMap method to handle reverse axis ordering in WMS 1.3.0.
     
     More info: http://mapserver.org/development/rfc/ms-rfc-30.html
     
     'when using epsg code >=4000 and <5000 will be assumed to have a reversed axes.'
     
     """
     # Call superclass method
     m = WMSBaseServiceHandler._buildMap(self, params)
     # for range of epsg codes reverse axis
     if params['crs'].code >= 4000 and params['crs'].code < 5000:
         m.zoom_to_box(
             Box2d(params['bbox'][1], params['bbox'][0], params['bbox'][3],
                   params['bbox'][2]))
     return m
Ejemplo n.º 5
0
 def GetMap(self, params):
     if str(params['srs']) != str(self.crs):
         raise OGCException(
             'Unsupported SRS requested.  Must be "%s" and not "%s".' %
             (self.crs, params['crs']), 'InvalidCRS')
     return WMSBaseServiceHandler.GetMap(self, params)
Ejemplo n.º 6
0
 def GetFeatureInfo(self, params):
     params['crs'] = params['srs']
     params['i'] = params['x']
     params['j'] = params['y']
     return WMSBaseServiceHandler.GetFeatureInfo(self, params,
                                                 'query_map_point')
Ejemplo n.º 7
0
 def GetMap(self, params):
     params['crs'] = params['srs']
     return WMSBaseServiceHandler.GetMap(self, params)