diff flys-backend/contrib/shpimporter/importer.py @ 4885:89a8764cabcc

Importer: Only show imported fields if copy_fields is used
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 28 Jan 2013 12:27:04 +0100
parents b457532dae63
children 8e99d2d9364d
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/importer.py	Mon Jan 28 12:25:24 2013 +0100
+++ b/flys-backend/contrib/shpimporter/importer.py	Mon Jan 28 12:27:04 2013 +0100
@@ -15,6 +15,7 @@
         self.dest_srs = osr.SpatialReference()
         self.dest_srs.ImportFromEPSG(config.target_srs)
         self.handled_fields = []
+        self.tracking_import = False
 
     def getKind(self, path):
         raise NotImplementedError("Importer.getKind is abstract!")
@@ -93,6 +94,7 @@
         The Key is the attribute of the source feature to be copied
         into the target attribute named by the dict's value.
         """
+        self.tracking_import = True
         self.handled_fields.extend(mapping.keys())
         for key, value in mapping.items():
             if src.GetFieldIndex(key) == -1:

http://dive4elements.wald.intevation.org