def setUpClass(cls): bbox = BBox(bbox=[(524358.0140363087, 6964349.630376049), (534141.9536568124, 6974133.5699965535)], crs=CRS.POP_WEB) gpd_request = GeopediaWmsRequest(layer='ttl1917', theme='ml_aws', bbox=bbox, width=50, height=50, image_format=MimeType.PNG) cls.data = gpd_request.get_data()
def check2(): geo_wms = GeopediaWmsRequest( # request=None, layer='SWIR', # styles=None, image_format=MimeType.PNG, custom_url_params={CustomUrlParam.TRANSPARENT: False}, theme=None, width=512, height=512, bbox=BBox(bbox=[ 6887893.492833803, 5009377.085697314, 7200979.560689886, 5322463.153553395 ], crs=CRS.POP_WEB), config=config) return geo_wms.get_data(decode_data=False)
def _get_wms_request(self, bbox, size_x, size_y): """ Returns WMS request. """ bbox_3857 = bbox.transform(CRS.POP_WEB) return GeopediaWmsRequest(layer=self.layer, theme=self.theme, bbox=bbox_3857, width=size_x, height=size_y, image_format=self.image_format)
def _get_wms_request(self, bbox, size_x, size_y): """ Returns WMS request. """ bbox_3857 = transform_bbox(bbox, CRS.POP_WEB) return GeopediaWmsRequest(layer=self.layer, theme=self.theme, bbox=bbox_3857, width=size_x, height=size_y, image_format=self.image_format, custom_url_params={CustomUrlParam.TRANSPARENT: True})