Timeline for Best way (performance wise) to add Attribute fields in PyQGIS on large files
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 2, 2018 at 7:40 | vote | accept | Miron | ||
Apr 27, 2018 at 7:47 | comment | added | Miron | Thanks for the Link, it helped me figuring out what caused the error: apparently, the ogr driver “ESRI Shapefile” fails to load the file if the .dbf contains umlauts. Such a pity. So I’m stuck with the old method. | |
Apr 26, 2018 at 15:30 | comment | added | Kadir Şahbaz | I've no idea. This post may help. | |
Apr 26, 2018 at 15:25 | comment | added | Miron | Thanks for the additional help! This works well. The only thing is: for some input shape files, I get the error: "'NoneType' object has no attribute 'GetLayer' See log for more details" This error points at the line "layer = dataSource.GetLayer()". If I try the same file withe the old method, it workd withaot an error... | |
Apr 26, 2018 at 15:03 | history | edited | Kadir Şahbaz | CC BY-SA 3.0 |
added 14 characters in body
|
Apr 26, 2018 at 15:01 | comment | added | Kadir Şahbaz | If you just want to add some fields and save it as new file, the shortest and easiest way is to copy it. But If you don't want to add some input layer fields, plaese review Python GDAL/OGR Cookbook. | |
Apr 26, 2018 at 14:55 | history | edited | Kadir Şahbaz | CC BY-SA 3.0 |
added 542 characters in body
|
Apr 26, 2018 at 14:18 | comment | added | Miron | Thanks, that works and it seems to be quite fast! Just one thing: right now, the script ist structured so that the Input file is edited and the changes are saved in the input file. What can I do to save the changes in a new file? Thanks a lot anyway! | |
Apr 26, 2018 at 13:38 | history | edited | Kadir Şahbaz | CC BY-SA 3.0 |
added 88 characters in body
|
Apr 26, 2018 at 13:33 | history | answered | Kadir Şahbaz | CC BY-SA 3.0 |