Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into feature/vector_addfield_values
  • Loading branch information
johntruckenbrodt committed Jul 17, 2024
2 parents 18a8baf + d7f00d3 commit 4370bac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spatialist/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,9 @@ def feature2vector(feature, ref, layername=None):
fields = [feat_def.GetFieldDefn(x) for x in range(0, feat_def.GetFieldCount())]
vec.layer.CreateFields(fields)
for feat in features:
vec.layer.CreateFeature(feat)
feat2 = ogr.Feature(vec.layer.GetLayerDefn())
feat2.SetFrom(feat)
vec.layer.CreateFeature(feat2)
vec.init_features()
return vec

Expand Down

0 comments on commit 4370bac

Please sign in to comment.