[Qgis-user] R: Re: Add table excel and categorize

Bernd Vogelgesang bernd.vogelgesang at gmx.de
Tue Nov 12 07:35:18 PST 2013


Am 12.11.2013 16:01, schrieb labiancamarilena at libero.it:
> Hi,
> yes the file is a csv (which has numeric values).
Check the csv properties within QGIS -> Fields Tab: See if your fields 
are really interpreted as integer/real values and NOT string!
Cause when this is string, the values can't show up for classification.

When you use 2.0 (at least), you might have better luck importing the 
csv through Layers -> Add delimited text file instead of drag-and-drop 
into the ToC.
There QGIS tries to guess the field type.

This might fail as well, cause your original excel sheet might have 
wrong data. A very popular bug are spaces in front or behind your numbers.
You should search and delete them there.

There is also the possibility to create an affiliated csvt-file (see 
http://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/), 
in which you define the field type for the csv. But this is a very 
tiresome work when you have lots of fields.


So, lots of speculations from my side. But we'll see ...

Cheers
Bernd



> The layer to add this csv is a shapefile (its table of attributes contains
> cod, name, lenghts of municipalities).
> I joined them and infact the table of attributes shows the name of
> municipalities, lenghts...and corresponding values.
> I saved it (ESRI Shapefile) and when I select the "Style" to graduate the
> values, the column shows only the cod. of municipalities, shape leng and area.
> Can you help me?
> Thanks a lot
>
>> ----Messaggio originale----
>> Da: bernd.vogelgesang at gmx.de
>> Data: 11/11/2013 21.45
>> A: <qgis-user at lists.osgeo.org>, "labiancamarilena at libero.it"
> <labiancamarilena at libero.it>
>> Ogg: Re: [Qgis-user] Add  table excel and categorize
>>
>> Hi,
>>
>> 1.
>> adding a csv is not the same like loading a shape. So you can't edit it.
>> Loading as dbf should give you write permissions (OpenOffice/Libre Office
>> still offer dbf support, while new Excel versions don't)
>>
>> 2.
>> I assume you joined the csv to an existing layer? In QGIS 2.0, the joined
>> columns are presented for classification, in 1.8 you will (i think) have
>> to make the join permanent by saving the joined layer to a new one. Then,
>> all attributes are editable as well.
>>
>> Hope I answered your questions
>>
>> Bernd
>>
>> Am 11.11.2013, 19:53 Uhr, schrieb labiancamarilena at libero.it
>> <labiancamarilena at libero.it>:
>>
>>> Dear all members of list,
>>> I have to add a table in excel that contains indices calculated for each
>>> municipality.
>>>
>>> I turned the sheet from excel to csv and added to the table of
>>> attributes as usual, but I have two problems:
>>>
>>> 1.
>>> Some data (indexes) when combined (the table  with common code and other
>>> attributes)
>>> appear with the word
>>> "null", I can add them manually? When I try to add them by editing the
>>> appropriate line, but the program does not save the changes.
>>>
>>> 2.
>>> When I want to customize the style,
>>> ie I want to categorize the classified data (they are many) and I do not
>>> know how to reduce or customize intervals. When I try the option
>>> graduated the values ​​joined (indices) to the table (municipalities) do
>>> not appear in the column.Thanks.
>>>
>>>
>>>
>>
>> -- 
>> Bernd Vogelgesang * Siedlerstrasse 2 * 91083 Baiersdorf * +49-9133-825374
>>
>




More information about the Qgis-user mailing list