<div dir="ltr">Hi Paolo,<div><br></div><div><div>A possible insight can be this:</div><div>- Create a table with two columns: 'string from SHP' and 'respective number code'.</div><div>- In SHP create the Union with the table above.</div><div>- Use Calculator for populate the new field in SHP with value of code.</div><div><br></div><div>Good lucky.</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-01-22 9:18 GMT-02:00 Paolo Cavallini <span dir="ltr"><<a href="mailto:cavallini@faunalia.it" target="_blank">cavallini@faunalia.it</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
I have a large shp with a number of repeated strings, and I'd like to<br>
refactor it replacing strings with a numeric code. I have found a<br>
Processing alg that does it, creating a new file each time, which is<br>
cumbersome; moreover, the alg apparently changes field type, adding<br>
decimals to reals. Of course I could create a CASE statement, but this<br>
is also cumbersome.<br>
Is there a more straightforward way?<br>
Thanks.<br>
<span class="HOEnZb"><font color="#888888">--<br>
Paolo Cavallini - <a href="http://www.faunalia.eu" rel="noreferrer" target="_blank">www.faunalia.eu</a><br>
QGIS & PostGIS courses: <a href="http://www.faunalia.eu/training.html" rel="noreferrer" target="_blank">http://www.faunalia.eu/<wbr>training.html</a><br>
<a href="https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis" rel="noreferrer" target="_blank">https://www.google.com/trends/<wbr>explore?date=all&geo=IT&q=<wbr>qgis,arcgis</a><br>
______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></font></span></blockquote></div><br></div>