Skip to content
Permalink
Browse files

processing: add uuid parameter to memory: outputs (followup f64730e)

  • Loading branch information
jef-n committed Feb 17, 2015
1 parent 58a68b6 commit e7482816678697603d6f77f5f39bff8919f6d070
Showing with 5 additions and 4 deletions.
  1. +5 −4 python/plugins/processing/tools/vector.py
@@ -399,13 +399,14 @@ def __init__(self, fileName, encoding, fields, geometryType,
if self.fileName.startswith(self.MEMORY_LAYER_PREFIX):
self.isMemory = True

uri = GEOM_TYPE_MAP[geometryType]
uri = GEOM_TYPE_MAP[geometryType] + "?uuid=" + str(uuid.uuid4())
if crs.isValid():
uri += '?crs=' + crs.authid() + '&'
uri += '&crs=' + crs.authid()

fieldsdesc = ['field=' + _fieldName(f) for f in fields]
if fieldsdesc:
uri += '&' + '&'.join(fieldsdesc)

fieldsstring = '&'.join(fieldsdesc)
uri += fieldsstring
self.memLayer = QgsVectorLayer(uri, self.fileName, 'memory')
self.writer = self.memLayer.dataProvider()
else:

0 comments on commit e748281

Please sign in to comment.
You can’t perform that action at this time.