Example #1
0
 def editGwcLayer(self, explorer):
     layer = self.element
     dlg = EditGwcLayerDialog([layer], layer)
     dlg.exec_()
     if dlg.gridsets is not None:
         explorer.run(layer.update, "Update GWC layer '" + layer.name + "'",
                      [], dlg.formats, dlg.gridsets, dlg.metaWidth,
                      dlg.metaHeight)
 def editGwcLayer(self, explorer):
     layer = self.element
     dlg = EditGwcLayerDialog([layer], layer)
     dlg.exec_()
     if dlg.gridsets is not None:
         explorer.run(layer.update,
                       "Update GWC layer '" + layer.name + "'",
                       [],
                       dlg.formats, dlg.gridsets, dlg.metaWidth, dlg.metaHeight)
Example #3
0
def createGwcLayer(explorer, layer):
    dlg = EditGwcLayerDialog([layer], None)
    dlg.exec_()
    if dlg.gridsets is not None:
        gwc = Gwc(layer.catalog)

        #TODO: this is a hack that assumes the layer belongs to the same workspace
        typename = layer.resource.workspace.name + ":" + layer.name

        gwclayer = GwcLayer(gwc, typename, dlg.formats, dlg.gridsets,
                            dlg.metaWidth, dlg.metaHeight)
        explorer.run(gwc.addLayer, "Create GWC layer '" + layer.name + "'", [],
                     gwclayer)
        return True
    else:
        return False
def createGwcLayer(explorer, layer):
    dlg = EditGwcLayerDialog([layer], None)
    dlg.exec_()
    if dlg.gridsets is not None:
        gwc = Gwc(layer.catalog)

        #TODO: this is a hack that assumes the layer belongs to the same workspace
        typename = layer.resource.workspace.name + ":" + layer.name

        gwclayer = GwcLayer(gwc, typename, dlg.formats, dlg.gridsets, dlg.metaWidth, dlg.metaHeight)
        explorer.run(gwc.addLayer,
                          "Create GWC layer '" + layer.name + "'",
                          [],
                          gwclayer)
        return True
    else:
        return False
Example #5
0
    def addGwcLayer(self, tree, explorer):
        cat = self.catalog
        layers = cat.get_layers()
        dlg = EditGwcLayerDialog(layers, None)
        dlg.exec_()
        if dlg.gridsets is not None:
            layer = dlg.layer
            gwc = Gwc(layer.catalog)

            #TODO: this is a hack that assumes the layer belongs to the same workspace
            typename = layer.resource.workspace.name + ":" + layer.name

            gwclayer = GwcLayer(gwc, typename, dlg.formats, dlg.gridsets,
                                dlg.metaWidth, dlg.metaHeight)
            catItem = tree.findAllItems(cat)[0]
            explorer.run(gwc.addLayer, "Create GWC layer '" + layer.name + "'",
                         [catItem.gwcItem], gwclayer)
    def addGwcLayer(self, tree, explorer):
        cat = self.catalog
        layers = cat.get_layers()
        dlg = EditGwcLayerDialog(layers, None)
        dlg.exec_()
        if dlg.gridsets is not None:
            layer = dlg.layer
            gwc = Gwc(layer.catalog)

            #TODO: this is a hack that assumes the layer belongs to the same workspace
            typename = layer.resource.workspace.name + ":" + layer.name

            gwclayer = GwcLayer(gwc, typename, dlg.formats, dlg.gridsets, dlg.metaWidth, dlg.metaHeight)
            catItem = tree.findAllItems(cat)[0]
            explorer.run(gwc.addLayer,
                              "Create GWC layer '" + layer.name + "'",
                              [catItem.gwcItem],
                              gwclayer)