Monday, 16 March 2015

fields attributes - Modifying width and precision of database using QGIS?


I have a database in txt format made of several columns of real numbers. Two column are integer, 17 are real (rounded to the first decimal) and 17 are real rounded to the second decimal.


If I import it through a txt format QGIS identified the integer columns properly, but also assign a width of 24 and a field precision of 15.


How can I limit it?



Answer



You should import a csv file containing your data together with a csvt file containing the type of your data. For each column of your csv the corrensponfing column of the csvt should contain the type, such as "Real","Integer", "String". You can also specify width and precision of your data includinf the following info: "Real(2.12)","Integer(3)","String(10)".


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...