title: How to compare the features of all the layers
body: <p>I want to compare the geometry of all the feature of a layer to particular feature's geometry in QGIS.
  Here is my code:</p>
  
  <pre><code>class geometry_checker(base_prechecker):
      def __init__(self):
          self.target_layer_name = "layer_1"
  
      def do_geom_check(self, layer, layers):
          layer_name = self.get_layer_name(layer)
          if layer_name == self.target_layer_name:
              iter = layer.getFeatures()
              for feat in iter:
                  geom = feat.geometry()
                  e = geom.type()
                  iter1 = layers.getFeatures()
                  for fea in iter1:
                      geom_a = fea.geometry()
                      f = geom.type()
                      if e == f:
                          return True
                      else:
                          return False
  
  
  
  
  q = geometry_checker()
  lay = iface.activeLayer()
  layers = QgsMapLayerRegistry.instance().mapLayers()
  print q.do_geom_check(lay)
  </code></pre>
  
  <p>If I run this I am getting None as outout. What I really want is if the geometry type is same it should return True else False.
  Somebody pls help me</p>