Esempio n. 1
0
    def exportRasterLayer(layer):
        '''Takes a QgsRasterLayer and returns the filename to refer to it, which allows external
        apps which support only file-based layers to use it. It performs the necessary export
        in case the input layer is not in a standard format suitable for most applications, it is
        a remote one or db-based (non-file based) one
        Currently, the output is restricted to geotiff, but not all other formats are exported.
        Only those formats not supported by GDAL are exported, so it is assumed that the external
        app uses GDAL to read the layer'''
        exts = GdalUtils.getSupportedRasterExtensions()
        for ext in exts:
            if (unicode(layer.source()).endswith(ext)):
                return unicode(layer.source())

        #TODO:Do the conversion here
        return unicode(layer.source())
Esempio n. 2
0
    def exportRasterLayer(layer):
        '''Takes a QgsRasterLayer and returns the filename to refer to it, which allows external
        apps which support only file-based layers to use it. It performs the necessary export
        in case the input layer is not in a standard format suitable for most applications, it is
        a remote one or db-based (non-file based) one
        Currently, the output is restricted to geotiff, but not all other formats are exported.
        Only those formats not supported by GDAL are exported, so it is assumed that the external
        app uses GDAL to read the layer'''
        exts = GdalUtils.getSupportedRasterExtensions()
        for ext in exts:
            if (unicode(layer.source()).endswith(ext)):
                return unicode(layer.source())

        #TODO:Do the conversion here
        return unicode(layer.source())
 def getSupportedOutputRasterLayerExtensions(self):
     return GdalUtils.getSupportedRasterExtensions()
 def getSupportedOutputRasterLayerExtensions(self):
     return GdalUtils.getSupportedRasterExtensions()