[Qgis-user] joinning tables

Siki Zoltan siki at agt.bme.hu
Thu Jan 30 07:51:08 PST 2014


Dear James,

thanks for your efforts and for the solution.

Best Regards,
Zoltan

On Thu, 30 Jan 2014, James Wood wrote:

> Zoltan,Just doing some testing with your shapefile: I was going to test this join error after importing the original megye_utf-8.shp into a SpatiaLite database, however it won't recognize it when I specify UTF-8 on import via the spatialite-gui (load shp error:Invalid character sequence). This leads me to think there might be something going on with your shapefile. So, I created a new shapefile (specifying UTF-8 encoding) and loaded the polygons from the original, minus the 'Nev' field values. Then I manually added some of those values back in (Budapest, Vas, Zala, Fejér and Békés). I had previously created a new ods file with some of the spreadsheet values for the same areas (also UTF-8 encoded). With the new shapefile and the new ods loaded into QGIS Desktop, all of the records join correctly via the text join whether they have accents or not. I would recommend trying to recreate your shapefile to be sure of the UTF-8 encoding and go from there. Best Regards,James
>> Date: Wed, 29 Jan 2014 22:27:13 +0100
>> From: siki at agt.bme.hu
>> To: jwood911 at gmail.com
>> CC: qgis-user at lists.osgeo.org
>> Subject: Re: [Qgis-user] joinning tables
>>
>> Dear James,
>>
>> thanks for your answer.
>> I used Save as in QGIS to convert the shape attributes from ISO-8859-2 to
>> UTF-8. If the code page of the joinded tables are different, QGIS uses the
>> code page of the joint table.
>>
>> Regards,
>> Zoltan
>>
>> On Wed, 29 Jan 2014, James Wood wrote:
>>
>>> Zoltan and Szilard,
>>>
>>>
>>>
>>> I have tested Zoltan's data with my installation of QGIS 2.0.1 on Windows 7
>>> x64. I am seeing the same problem with the original data. When I re-create
>>> some of the rows in a new Libre Office spreadsheet (Budapest, Vas, Zala),
>>> the join works fine. When I add Békés that row fails in the join. Maybe
>>> there is an issue with the UTF-8 encoding in the shapefile?
>>> Best Regards,
>>> James
>>>
>>>
>>>
>>>
>>> On Wed, Jan 29, 2014 at 3:19 AM, Siki Zoltan <siki at agt.bme.hu> wrote:
>>>
>>>> Dear Szilard,
>>>>
>>>> to tell you the truth all spreadsheet files were created by libre office,
>>>> I was able to open all as a vector layer (without grapics).
>>>> Which version and platform do you use?
>>>> I didn't test it on 64 bit Windows.
>>>>
>>>>
>>>> Regards,
>>>> Zoltan
>>>>
>>>> On Wed, 29 Jan 2014, Szabo Szilard wrote:
>>>>
>>>>  Dear Zoltan,
>>>>>
>>>>> To tell the truth I do not know what is happening.
>>>>> I am not able to read this file normally. CSV's first does not become a
>>>>> field-header (I checked with my previous csv-s and they work); I created a
>>>>> new CSV using MS Office 2010 but the results was the same.
>>>>> XLSX also was wrong, values became NULL in the table (but had the right
>>>>> header ...).
>>>>>
>>>>> I will continue in the afternoon ...
>>>>>
>>>>> Best wishes,
>>>>>
>>>>> Szilard
>>>>>
>>>>>
>>>>> 2014-01-29 Siki Zoltan <siki at agt.bme.hu>
>>>>>
>>>>>  Dear Szilard,
>>>>>>
>>>>>> thank your case study.
>>>>>> DBF file limits column names to 10 char
>> acters.
>>>>>> First I thought special Hungarian characters cause the problem, but using
>>>>>> only English ABC I got the same result.
>>>>>> Did you try to join my tables?
>>>>>> Did you get false result using textual columns?
>>>>>>
>>>>>> Best Regards,
>>>>>> Zoltan
>>>>>>
>>>>>>
>>>>>> On Wed, 29 Jan 2014, Szabo Szilard wrote:
>>>>>>
>>>>>>  Dear Zoltan,
>>>>>>
>>>>>>> I had this kind of problem when I "hurt" the normal rules of field names
>>>>>>> (i.e. using extra long field names bringing them directly from
>>>>>>> downloaded
>>>>>>> TEIR tables); afterI correction them (shortening but I am not sure the
>>>>>>> threshold), everything was fine. But You have correct and short field
>>>>>>> names
>>>>>>> ... my response is just a case study.
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Szilard
>>>>>>>
>>>>>>>
>>>>>>> 2014-01-29 Siki Zoltan <siki at agt.bme.hu>
>>>>>>>
>>>>>>>  Dear James,
>>>>>>>
>>>>>>>>
>>>>>>>> thanks for your answer.
>>>>>>>> My data are available here:
>>>>>>>> http://www.agt.bme.hu/gis/qgis/ods.zip
>>>>>>>>
>>>>>>>> You can find in the zip  a shapefile (megye_utf-8), and some
>>>>>>>> spreadsheet
>>>>>>>> files (ksh.ods, ksh.xlsx, ksh.csv) having the same data. All use utf-8
>>>>>>>> code
>>>>>>>> page.
>>>>>>>> Open megye_utf-8 and ksh.ods and make a join using "megye" and "Nev"
>>>>>>>> columns. I get NULL data in all joined column.
>>>>>>>> If ods or xlsx is not supported on your platfo
>> rm, you can use ksh.csv.
>>>>>>>> If you join the two tables using "kod" (integer value) column, the
>>>>>>>> result
>>>>>>>> is OK.
>>>>>>>> I tested it in 2.1, 1,7 and 1.8 on Linux and in 2.1 on Windows.
>>>>>>>>
>>>>>>>> Best Regards,
>>>>>>>> Zoltan
>>>>>>>>
>>>>>>>> On Wed, 29 Jan 2014, James Wood wrote:
>>>>>>>>
>>>>>>>>  Zoltan,I don't know if someone has responded to you about this; I
>>>>>>>> didn't
>>>>>>>>
>>>>>>>>  see any list posts. I am not seeing the same issue with textual joins
>>>>>>>>> in my
>>>>>>>>> QGIS 2.0.1 install. If you want to provide me with your shapefile and
>>>>>>>>> your
>>>>>>>>> join files, I'll be happy to test here.
>>>>>>>>> Best Regards,James
>>>>>>>>>
>>>>>>>>>  Date: Sat, 25 Jan 2014 20:43:59 +0100
>>>>>>>>>
>>>>>>>>>  From: siki at agt.bme.hu
>>>>>>>>>> To: qgis-user at lists.osgeo.org
>>>>>>>>>> CC: qgis-developer at lists.osgeo.org
>>>>>>>>>> Subject: [Qgis-user] joinning tables
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Dear List,
>>>>>>>>>>
>>>>>>>>>> I got into trouble joining tables in QGIS.
>>>>>>>>>> When I try to join shape to a csv, ods or xlsx file using columns
>>>>>>>>>> with
>>>>>>>>>> textual data, it doesn't work. I get only NULL values in the joint
>>>>>>>>>> columns.
>>>>>>>>>> Using integer values the join works.
>>>>>>>>>> Is it a feature or an error?
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Zoltan
>>>>>>>>>> _______________________________________________
>>>>>>>>>
>>> Qgis-user mailing list
>>>>>>>>>> Qgis-user at lists.osgeo.org
>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>   _______________________________________________
>>>>>>>>>
>>>>>>>>>  Qgis-user mailing list
>>>>>>>> Qgis-user at lists.osgeo.org
>>>>>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Dr. Szilard SZABO
>>>>>>> associate professor, head of department
>>>>>>> Department of Physical Geography and Geoinformation Systems
>>>>>>> University of Debrecen
>>>>>>> http://www.mendeley.com/profiles/szilard-szabo/
>>>>>>> Publications <https://vm.mtmt.hu/search/slist.php?lang=0&AuthorID=
>>>>>>> 10000172>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>> --
>>>>> Dr. Szilard SZABO
>>>>> associate professor, head of department
>>>>> Department of Physical Geography and Geoinformation Systems
>>>>> University of Debrecen
>>>>> http://www.mendeley.com/profiles/szilard-szabo/
>>>>> Publications <https://vm.mtmt.hu/search/slist.php?lang=0&AuthorID=
>>>>> 10000172>
>>>>>
>>>>>  _______________________________________________
>>>> Qgis-user mailing list
>>>> Qgis-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>
>>>
>


More information about the Qgis-user mailing list