Mercurial > dive4elements > river
comparison flys-backend/contrib/shpimporter/importer.py @ 3677:c37effda3655
Added 'path' attribute to each geo relation; adapted the shape importer to set the path for each feature.
flys-backend/trunk@5309 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 30 Aug 2012 09:51:04 +0000 |
parents | 8654e4480fc6 |
children | 2cd2657b3d60 |
comparison
equal
deleted
inserted
replaced
3676:ae16bd95879e | 3677:c37effda3655 |
---|---|
118 feat, | 118 feat, |
119 name=name, | 119 name=name, |
120 path=path) | 120 path=path) |
121 | 121 |
122 if newFeat is not None: | 122 if newFeat is not None: |
123 newFeat.SetField("path", path) | |
123 newFeat = self.transform(newFeat) | 124 newFeat = self.transform(newFeat) |
124 res = destLayer.CreateFeature(newFeat) | 125 res = destLayer.CreateFeature(newFeat) |
125 if res is None or res > 0: | 126 if res is None or res > 0: |
126 shpimporter.Error("Unable to insert feature: %r" % res) | 127 shpimporter.Error("Unable to insert feature: %r" % res) |
127 else: | 128 else: |