def __init__(self, style, tile_format='png'): # the spherical mercator world tile covers (-π, -π) to (π, π) t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1) self.projection = MercatorProjection(0, t) self.style = style self.tile_format = tile_format
def __init__(self, apikey, style=None): # the spherical mercator world tile covers (-π, -π) to (π, π) t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1) self.projection = MercatorProjection(0, t) self.key = apikey if style: self.style = style
def __init__(self, template): # the spherical mercator world tile covers (-π, -π) to (π, π) t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1) self.projection = MercatorProjection(0, t) self.templates = [] while template: match = re.match(r'^(http://\S+?)(,http://\S+)?$', template) first = match.group(1) if match: self.templates.append(first) template = template[len(first):].lstrip(',') else: break
def __init__(self, server, params=None): self.params = copy(Provider._PARAMS) if not params is None: self.params.update(params) if 'SLD_BODY' in self.params: self.postData = self.params['SLD_BODY'] del self.params['SLD_BODY'] else: self.postData = None self.server = server.replace('gwc/service/','') self.wms = '?' + urlencode(self.params) if 'SRS' in self.params and self.params['SRS'] == 'EPSG:4326': self.projection = LinearProjection(20, Transformation(166886.05360752725, 0, 524288, 0, -166866.05360752725, 524288)) else: self.projection = MercatorProjection(26, Transformation(1.068070779e7, 0, 3.355443185e7, 0, -1.068070890e7, 3.355443057e7))
def __init__(self): # the spherical mercator world tile covers (-π, -π) to (π, π) t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1) self.projection = MercatorProjection(0, t)
def __init__(self): t = Transformation(1.068070779e7, 0, 3.355443185e7, 0, -1.068070890e7, 3.355443057e7) self.projection = MercatorProjection(26, t)