Skip to content

Commit

Permalink
processing: add uuid parameter to memory: outputs (followup f64730e)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 17, 2015
1 parent 58a68b6 commit e748281
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions python/plugins/processing/tools/vector.py
Expand Up @@ -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:
Expand Down

0 comments on commit e748281

Please sign in to comment.