Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

        def switch_bbox_epsg_axis_order(bbox, srs):
    if bbox is not None and srs is not None:
        try:
            if SRS(srs).is_axis_order_ne:
                return bbox[1], bbox[0], bbox[3], bbox[2]
        except RuntimeError:
            log.warn('unknown SRS %s' % srs)
    return bbox
        


src/m/a/MapProxy-1.6.0/mapproxy/service/wms.py   MapProxy(Download)
from functools import partial
from mapproxy.cache.tile import CacheInfo
from mapproxy.request.wms import (wms_request, WMS111LegendGraphicRequest,
    mimetype_from_infotype, infotype_from_mimetype, switch_bbox_epsg_axis_order)
from mapproxy.srs import SRS, TransformationError
            bbox = layer.extent.bbox_for(SRS(srs))
            if epsg_axis_order:
                bbox = switch_bbox_epsg_axis_order(bbox, srs)
            yield srs, bbox
 
        # add native srs
        if layer_srs_code not in self.bbox_srs:
            bbox = layer.extent.bbox
            if epsg_axis_order:
                bbox = switch_bbox_epsg_axis_order(bbox, layer_srs_code)

src/m/a/mapproxy-HEAD/mapproxy/service/wms.py   mapproxy(Download)
from functools import partial
from mapproxy.cache.tile import CacheInfo
from mapproxy.request.wms import (wms_request, WMS111LegendGraphicRequest,
    mimetype_from_infotype, infotype_from_mimetype, switch_bbox_epsg_axis_order)
from mapproxy.srs import SRS, TransformationError
 
            if epsg_axis_order:
                bbox = switch_bbox_epsg_axis_order(bbox, srs)
            yield srs, bbox
 
        # add native srs
        if layer_srs_code not in self.srs_extents:
            bbox = layer.extent.bbox
            if epsg_axis_order:
                bbox = switch_bbox_epsg_axis_order(bbox, layer_srs_code)