<div dir="ltr">I would recommend using the Load Delimited Text Layer plugin (in 1.8, core feature in 2.0) because it will handle types automatically.<div><br></div><div>- Nathan </div></div><div class="gmail_extra"><br><br>

<div class="gmail_quote">On Sun, Sep 8, 2013 at 12:30 AM, Telmo Nunes <span dir="ltr"><<a href="mailto:pinanunes@gmail.com" target="_blank">pinanunes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Olá Hugo,<div><br></div><div>Thanks! csvt can solve the problem! </div><div>Now a question remains: Why then having the "Quote" option on the csv loading dialog? Just to remove them (that would save the find/replace solution from your first link) ?</div>


<div>On the "user friendly" prespective (what Qgis aims I believe) it could be used to check quoted columns and create the csvt file with text for those columns before loading it (or since we there, make a simple dialog to pick the format for each field and create the csvt file before loading the csv).</div>


<div><br></div><div>Creating the csvt is not an issue (for some users), but is an extra "manual" processing step that I believe could be avoided.</div><div><br></div><div>Anyways thanks for the tip!</div><div><br>


</div><div>Cheers</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Telmo</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/7 Hugo <span dir="ltr"><<a href="mailto:hfpmartins@gmail.com" target="_blank">hfpmartins@gmail.com</a>></span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ola Telmo,<div><br></div><div>OGR supports an additional file (.csvt) to specify the types of the attribute columns of a csv file. Check these blogs:</div>


<div><a href="http://sigsemgrilhetas.wordpress.com/2013/05/07/visualizar-dados-dos-censos-2011-com-o-qgis/" target="_blank">http://sigsemgrilhetas.wordpress.com/2013/05/07/visualizar-dados-dos-censos-2011-com-o-qgis/</a><br>



</div><div><a href="http://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/" target="_blank">http://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/</a><br>


</div>
<div><br></div><div>Cheers,</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Sat, Sep 7, 2013 at 1:20 PM, Telmo Nunes <span dir="ltr"><<a href="mailto:pinanunes@gmail.com" target="_blank">pinanunes@gmail.com</a>></span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">I have a recurrent issue when loading csv files.<div>When one of the fields is a text field only with numeric characters qgis allways imports that field as numeric. You might ask why would I want a field with numeric characters to be a text field, and the answer is that one dataset I usually use, the administrative regions regions are coded with numeric characters as text...for example 011312 that is converted to 11312 even if the values in the csv file have the quote markers (" or ') and I define that on the csv import dialog (see below a csv example)</div>




<div><br></div><div>I have found diferent workarround solutions for this issue like:</div><div><br></div><div>- converting the code on the original shapefile to numeric</div><div>- importing the csv to a database and loading from the database</div>




<div>- creating a dummy record where i put a letter character in that field</div><div><br></div><div>They all work, but is just annoying to do this over and over and adds some unecessary steps in the data analysis workflow (for example when importing a satscan gis file output to map the clusters). My question is:</div>




<div><br></div><div>- Am I missing something here?</div><div>- If not, is it possible to fix that?</div><div><br></div><div>Below is a portion of a csv file, if you manage to import the file and keep the LOC_ID field as text please let me know.</div>




<div><br></div><div><div>'ID';'LOC_ID';'CLUSTER';'P_VALUE';'CLU_OBS';'CLU_EXP';'CLU_ODE';'CLU_RISK';'LOC_OBS';'LOC_EXP';'LOC_ODE';'LOC_RISK'</div>




<div>1;'070105';1,00;1,0e-17;283,00;72,06;3,92;13,44;0,00;0,00;0,00;0,00</div><div>2;'070101';1,00;1,0e-17;283,00;72,06;3,92;13,44;0,00;2,58;0,00;0,00</div><div>3;'070103';1,00;1,0e-17;283,00;72,06;3,92;13,44;0,00;2,72;0,00;0,00</div>




<div>4;'071002';1,00;1,0e-17;283,00;72,06;3,92;13,44;47,00;3,12;15,03;17,07</div></div><div><br></div><div>My best regards</div><span><font color="#888888"><div><br></div><div>Telmo Nunes</div></font></span></div>




<br></div></div>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><span><font color="#888888"><br></font></span></blockquote></div><span><font color="#888888"><br>


<br clear="all"><div><br></div>-- <br>Hugo Martins<br>
</font></span></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br></blockquote></div><br></div>