# Path: src/compat2qgis.py
# def getCanvasDestinationCrs(iface):
#     def __init__(self, src_crs, dst_crs):
#     def setDestinationCrs(self, dst_crs):
# def getOpenFileName(parent, caption, filedir, search_filter):
#     def __init__(self, id, type):
#     def fromEpsgId(id):
# class QgsCoordinateTransform(core.QgsCoordinateTransform):
# class QgsCoordinateReferenceSystem(core.QgsCoordinateReferenceSystem):


from qgis.PyQt.QtGui import QColor
from qgis.gui import QgsRubberBand
from qgis.core import QgsRectangle
from qgis.utils import iface
from .compat2qgis import QGisGeometryType, getCanvasDestinationCrs, QgsCoordinateTransform, QgsCoordinateReferenceSystem
        self.features_rb.setWidth(2)

    def show_point(self, point, center=False):
        #check srs
        if self.need_transform():
            point = self.transform_point(point)

        self.rb.addPoint(point)
        if center:
            self.center_to_point(point)

    def clear(self):
        self.rb.reset(QGisGeometryType.Point)

    def need_transform(self):
        return getCanvasDestinationCrs(self.iface).postgisSrid() != 4326

    def transform_point(self, point):
        #dest_srs_id = getCanvasDestinationCrs(self.iface).srsid()
        #self.transformation.setDestCRSID(dest_srs_id)
        self.transform_decorator.setDestinationCrs(getCanvasDestinationCrs(self.iface))
        try:
            return self.transform_decorator.transform(point)
        except:
            print('Error on transform!')  # DEBUG! need message???
            return

    def transform_bbox(self, bbox):
        #dest_srs_id = getCanvasDestinationCrs(self.iface).srsid()
        #self.transformation.setDestCRSID(dest_srs_id)

# Path: src/compat2qgis.py
# def getCanvasDestinationCrs(iface):
#     def __init__(self, src_crs, dst_crs):
#     def setDestinationCrs(self, dst_crs):
# def getOpenFileName(parent, caption, filedir, search_filter):
#     def __init__(self, id, type):
#     def fromEpsgId(id):
# class QgsCoordinateTransform(core.QgsCoordinateTransform):
# class QgsCoordinateReferenceSystem(core.QgsCoordinateReferenceSystem):


# Path: src/rb_result_renderer.py
from qgis.PyQt.QtGui import QColor
from qgis.gui import QgsRubberBand
from qgis.core import QgsRectangle
from qgis.utils import iface
from .compat2qgis import QGisGeometryType, getCanvasDestinationCrs, QgsCoordinateTransform, QgsCoordinateReferenceSystem

        self.features_rb.setWidth(2)

    def show_point(self, point, center=False):
        #check srs
        if self.need_transform():
            point = self.transform_point(point)

        self.rb.addPoint(point)
        if center:
            self.center_to_point(point)

    def clear(self):
        self.rb.reset(QGisGeometryType.Point)

    def need_transform(self):
        return getCanvasDestinationCrs(self.iface).postgisSrid() != 4326

    def transform_point(self, point):
        #dest_srs_id = getCanvasDestinationCrs(self.iface).srsid()
        #self.transformation.setDestCRSID(dest_srs_id)
        self.transform_decorator.setDestinationCrs(getCanvasDestinationCrs(self.iface))
        try:
            return self.transform_decorator.transform(point)
        except:
            print('Error on transform!')  # DEBUG! need message???
            return

    def transform_bbox(self, bbox):
        #dest_srs_id = getCanvasDestinationCrs(self.iface).srsid()
        #self.transformation.setDestCRSID(dest_srs_id)

        self.transform_decorator.setDestinationCrs(getCanvasDestinationCrs(self.iface))