Mercurial > dive4elements > river
comparison flys-backend/contrib/shpimporter/hws.py @ 5122:5ba502e78e05 dami
Fix import of hws_* on Oracle
The OCI driver needs a field named OGR_FID as the first element
of a table, otherwise it gets confused and tries to add the
fid twice in the insert statement leading to the "too many
values" error.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 28 Feb 2013 10:09:31 +0100 |
parents | c5187ab9f571 |
children | 04eb62eae722 |
comparison
equal
deleted
inserted
replaced
5121:e4cc9aebfcf1 | 5122:5ba502e78e05 |
---|---|
88 | 88 |
89 self.copyFields(feat, newFeat, self.fieldmap) | 89 self.copyFields(feat, newFeat, self.fieldmap) |
90 | 90 |
91 newFeat.SetGeometry(geometry) | 91 newFeat.SetGeometry(geometry) |
92 | 92 |
93 newFeat.SetField("ogr_fid", feat.GetFID()) | |
94 artname = self.searchField("art$") | 93 artname = self.searchField("art$") |
95 if self.IsFieldSet(feat, artname): | 94 if self.IsFieldSet(feat, artname): |
96 self.handled(artname) | 95 self.handled(artname) |
97 kind_id = HWS_KIND.get(feat.GetField(artname).lower()) | 96 kind_id = HWS_KIND.get(feat.GetField(artname).lower()) |
98 if not kind_id: | 97 if not kind_id: |