Mercurial > dive4elements > river
comparison flys-backend/contrib/shpimporter/hws.py @ 5382:f66a6c1a73e7
Explicitly force the kind to be 2 when it is not set.
This is the default in the database schema but it is not used
in oracle
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 22 Mar 2013 16:54:43 +0100 |
parents | 028ff568b196 |
children | 95050a944d81 |
comparison
equal
deleted
inserted
replaced
5381:d6782d0c7472 | 5382:f66a6c1a73e7 |
---|---|
114 self.handled(artname) | 114 self.handled(artname) |
115 kind_id = HWS_KIND.get(feat.GetField(artname).lower()) | 115 kind_id = HWS_KIND.get(feat.GetField(artname).lower()) |
116 if not kind_id: | 116 if not kind_id: |
117 logger.warn("Unknown Art: %s" % \ | 117 logger.warn("Unknown Art: %s" % \ |
118 feat.GetField(artname)) | 118 feat.GetField(artname)) |
119 newFeat.SetField("kind_id", 2) | |
119 else: | 120 else: |
120 newFeat.SetField("kind_id", kind_id) | 121 newFeat.SetField("kind_id", kind_id) |
122 else: | |
123 newFeat.SetField("kind_id", 2) | |
121 | 124 |
122 fname = self.searchField("Bundesland$") | 125 fname = self.searchField("Bundesland$") |
123 if self.IsFieldSet(feat, fname): | 126 if self.IsFieldSet(feat, fname): |
124 self.handled(fname) | 127 self.handled(fname) |
125 fed_id = FED_STATES.get(feat.GetField(fname).lower()) | 128 fed_id = FED_STATES.get(feat.GetField(fname).lower()) |