py-gdalogr-cookbook icon indicating copy to clipboard operation
py-gdalogr-cookbook copied to clipboard

Save centroids of input Layer to an output Layer

Open ruicruz93 opened this issue 3 years ago • 0 comments

So I found a little typo that took me quite a while to fix regarding this recipe for getting centroids for features in an input layer, as seen in this chapter of the documentation. By inserting the inFeature = None line, the connection with the current inFeature is effectively terminated thus resulting in the annulment of all attribute values insrted in the outLayer for that feature. I thus removed that line and it solved the problem. It was a good opportunity to solidify the contents learnt up until that point nonetheless.

ruicruz93 avatar Jun 01 '21 21:06 ruicruz93