Re: [QGIS-Developer] Factorizing a dbf

2018-01-25 Thread Paolo Cavallini
Il 24/01/2018 07:37, Nyall Dawson ha scritto: > How would you see this working within processing? I guess you could > select all the desired columns, and then an auto-generated field name > could be made for each new field based on the original column. It's > probably best left to a separate

Re: [QGIS-Developer] Factorizing a dbf

2018-01-23 Thread Paolo Cavallini
Il 24/01/2018 07:37, Nyall Dawson ha scritto: > How would you see this working within processing? I guess you could > select all the desired columns, and then an auto-generated field name > could be made for each new field based on the original column. It's > probably best left to a separate

Re: [QGIS-Developer] Factorizing a dbf

2018-01-23 Thread Nyall Dawson
On 24 January 2018 at 16:25, Paolo Cavallini wrote: > Hi Nyall, > > Il 23/01/2018 01:16, Nyall Dawson ha scritto: > >> Option 1: >> Run the "Add unique value field index" algorithm to add an >> autogenerated code for each unique category. Then, run the "List >> unique

Re: [QGIS-Developer] Factorizing a dbf

2018-01-23 Thread Paolo Cavallini
Hi Nyall, Il 23/01/2018 01:16, Nyall Dawson ha scritto: > Option 1: > Run the "Add unique value field index" algorithm to add an > autogenerated code for each unique category. Then, run the "List > unique values" algorithm selecting both the original field and the > newly created field for the

Re: [QGIS-Developer] Factorizing a dbf

2018-01-22 Thread Nyall Dawson
On 22 January 2018 at 21:18, Paolo Cavallini wrote: > Hi all, > I have a large shp with a number of repeated strings, and I'd like to > refactor it replacing strings with a numeric code. I have found a > Processing alg that does it, creating a new file each time, which is >

Re: [QGIS-Developer] Factorizing a dbf

2018-01-22 Thread Paolo Cavallini
Il 22/01/2018 14:02, Régis Haubourg ha scritto: > Hi, maybe the field refactor alg' with a "replace()" mixed with a > attribute(get_feature , etc...) looking in the reclassification table > could do? sure, thanks Régis and Luiz. Both approaches however are still cumbersome; I guess this could

Re: [QGIS-Developer] Factorizing a dbf

2018-01-22 Thread Régis Haubourg
Hi, maybe the field refactor alg' with a "replace()" mixed with a attribute(get_feature , etc...) looking in the reclassification table could do? Cheers Régis 2018-01-22 13:18 GMT+01:00 Luiz Motta : > Hi Paolo, > > A possible insight can be this: > - Create a table with

Re: [QGIS-Developer] Factorizing a dbf

2018-01-22 Thread Luiz Motta
Hi Paolo, A possible insight can be this: - Create a table with two columns: 'string from SHP' and 'respective number code'. - In SHP create the Union with the table above. - Use Calculator for populate the new field in SHP with value of code. Good lucky. 2018-01-22 9:18 GMT-02:00 Paolo

[QGIS-Developer] Factorizing a dbf

2018-01-22 Thread Paolo Cavallini
Hi all, I have a large shp with a number of repeated strings, and I'd like to refactor it replacing strings with a numeric code. I have found a Processing alg that does it, creating a new file each time, which is cumbersome; moreover, the alg apparently changes field type, adding decimals to