[Gvsig_english] JOIN

Benjamin Ducke benjamin.ducke at oxfordarch.co.uk
Wed Feb 4 14:09:10 CET 2009


The CSV import in 1.1.2 is weak in that it imports all table fields
as type "text". Unfortunately, you cannot use a field of that type
as a key field in a join operation. The key field needs to be type
"integer". Instead of joining data from a CSV file, save your data
as DBF (Open Office Calc does that just fine, but so should Excel --
with some added quirks, I suspect). Make sure to set the field type
to numeric with zero decimal places in your spreadsheet.
Then join the DBF table to your Shapefile.

Ben

Kai-Christian Bruhn wrote:
> Dear list,
> 
> this and the related thread starts to convince me that I'm the problem 
> in joining attribute tables and not gvSIG. Nevertheless, I tried several 
> times to join an imported csv-file with a shape-dbf-file - and failed. 
> So please dwell a little more on that subject.
> The details:
> gvSIG OA Digital Edition with Java 1.6.0_07 on XP Professional
> A shapefile with 2D-points, an integer attribute fo_id and more string
> type attribute fields.
> A csv-file like this:
> fo_id;type
> 1;burial
> 2;single finding
> 3;burial
> 4;pit
> etc...
> Both tables are in the project manager table view but join wouldn't
> work. I guess the problem emerges already during the import
> of the csv, as it seems to take the fo_id as a string type, not as
> integer. So when trying to join fo_id from the shape-dbf the dropdown of
> the last dialogue where to choose the field from the csv for joining is
> empty. For testing I went the other way around, calling the imported csv
> first and the shape-dbf second. The last dropdown then offers only the
> string-type fields from the attribute table of the shape-dbf.
> 
> Is there any way to edit plain table data in gvsig?
> Is there a way to assign types to imported table fields?
> Does it need a csvt-file as in ogr2ogr csv-handling to assign types to 
> data?
> 
> Or am I simply incapable?
> 
> Cheers
> 
> Kai
> 
> John Ladd schrieb:
>> With a little help from Benjamin Ducke I determined what I was doing
>> wrong re the JOIN function.  I was not paying attention to the buttons
>> on the first of the four screens and was then making wrong assumptions
>> re buttons on successive screens where the buttons were not clearly
>> labelled.  In hindsight this sounds just careless on my part, but it
>> underscores the problems faced by new users.  Somewhere long ago I
>> read that in the process of developing software for third party use
>> ~20% of the effort is generating software that works for the developer
>> and ~80% of the effort is packaging the software so that the third
>> party can use it.
>>
>> thank you for your patience.
>>
> 
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at runas.cap.gva.es
> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
> 
> 


-- 
Benjamin Ducke
Senior Applications Support and Development Officer

Oxford Archaeology Ltd
Janus House
Osney Mead
OX2 0ES
Oxford, U.K.

Tel: +44 (0)1865 263 800 (switchboard)
Tel: +44 (0)1865 980 758 (direct)
Fax :+44 (0)1865 793 496
benjamin.ducke at oxfordarch.co.uk




------
Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.



More information about the Gvsig_internacional mailing list