def show(self):
     idsToIgnore = set(self.getIdsAlreadyInOutTable())
     allRasterIds = set(qgs.getAllLayerIds(lambda x: qgs.isRaster(x)))
     self.clear()
     try:
         self.populate(allRasterIds - idsToIgnore)
     except Exception as e:
         warn(e)
         return
     self.dialog.show()
Exemple #2
0
 def show(self):
     idsToIgnore = set(self.getIdsAlreadyInOutTable())
     allRasterIds = set(qgs.getAllLayerIds(lambda x: qgs.isRaster(x)))
     self.clear()
     try:
         self.populate(allRasterIds - idsToIgnore)
     except Exception as e:
         warn(e)
         return
     self.dialog.show()
 def haveVisibleFeatures(self):
     """Return true if at least one of the time managed layers
     which are not ignored for emptiness detection in the project has
     featureCount>0 (or if we have active raster layers)"""
     all_layers = [
         x.layer for x in [
             x for x in self.getTimeLayerList() if x.isEnabled() and
             (not qgs.isRaster(x.layer)) and x.geometriesCountForExport()
         ]
     ]
     total_features = 0
     for layer in all_layers:
         total_features += layer.featureCount()
     return total_features > 0 or self.getActiveRasters()
 def show(self):
     """Update GUI elements and show the dialog"""
     self.clear()
     # determine which layers are vector and can be time controlled
     idsToIgnore = set(self.getIdsAlreadyInOutTable())
     allVectorIds = set(qgs.getAllLayerIds(lambda x: not qgs.isRaster(x)))
     unsupportedVectorIds = set(qgs.getAllLayerIds(lambda x: qgs.isWFS(x)))
     # todo: plugin layers, e.g. from QuickMapServices should also be excluded
     try:
         self.populate(allVectorIds - idsToIgnore - unsupportedVectorIds)
     except Exception as e:
         warn(e)
         return
     # finalize and show dialog
     self.addInterpolationModes(self.dialog.comboBoxInterpolation)
     self.dialog.show()
 def show(self):
     """Update GUI elements and show the dialog"""
     self.clear()
     # determine which layers are vector and can be time controlled
     idsToIgnore = set(self.getIdsAlreadyInOutTable())
     allVectorIds = set(qgs.getAllLayerIds(lambda x: not qgs.isRaster(x)))
     unsupportedVectorIds = set(qgs.getAllLayerIds(lambda x: qgs.isWFS(x)))
     # todo: plugin layers, e.g. from QuickMapServices should also be excluded
     try:
         self.populate(allVectorIds - idsToIgnore - unsupportedVectorIds)
     except Exception as e:
         warn(e)
         return
     # finalize and show dialog
     self.addInterpolationModes(self.dialog.comboBoxInterpolation)
     self.dialog.show()
 def getActiveVectors(self):
     return self.getActive(func=lambda x: not qgs.isRaster(x.layer))
 def getActiveRasters(self):
     return self.getActive(func=lambda x: qgs.isRaster(x.layer))
 def getActiveVectors(self):
     return self.getActive(func=lambda x: not qgs.isRaster(x.layer))
 def getActiveRasters(self):
     return self.getActive(func=lambda x: qgs.isRaster(x.layer))
 def haveVisibleFeatures(self):
     """Return true if at least one of the time managed layers
     which are not ignored for emptiness detection in the project has
     featureCount>0 (or if we have active raster layers)"""
     all_layers = [x.layer for x in [x for x in self.getTimeLayerList() if x.isEnabled() and (not qgs.isRaster(x.layer)) and x.geometriesCountForExport()]]
     total_features = 0
     for layer in all_layers:
         total_features += layer.featureCount()
     return total_features > 0 or self.getActiveRasters()