Why truncation of column headers in shapefile translation?

39 views
Skip to first unread message

David R Sherrod

unread,
Nov 24, 2009, 11:32:37 AM11/24/09
to mapi...@googlegroups.com

Advice?
Conversion of TAB to SHP file, through Universal Translator.  Column headers get truncated.
As best I can tell, the truncation affects columns with character strings, not integers or decimals, but my sampling is too sparse to know that confidently.

Doesn't happen to the e00 files.  Only to shape files.

Truncation not always a function of the width assigned to column; that is, headers may truncate in columns with large character breadth.

I tried opening the shape "dbf" file in a text editor and overtyping the truncation, then translating the shape file back into a TAB.  Whoa, bad idea. (Translation fails.)  It's a scene from Fantasia, with the apprentice trying to work magic by putting on the sorcerer's cap.  Anybody got mop?

Examples follow.  In this table I show the character width of th column, the proper header (in TAB file), and the resulting truncation (in SHP).
(characters)  THIS  TRUNCATES TO   THIS
(ch 10)  Unit_symbol      Symbol
(ch 80)  Formation_name   Name
(ch 30)  Member_name      Name0
(ch 10)  Stearns_unit     Unit
(ch 40)  Data_source      Source

--------------------------------------------
David R. Sherrod, Cascades Volcano Observatory
U.S. Geological Survey,
1300 SE Cardinal Court, Bldg. 10
Vancouver, WA  98683
voice 360-993-8915
fax     360-993-8980
dshe...@usgs.gov
-----------------------------------------

Javier Valencia

unread,
Nov 24, 2009, 1:12:34 PM11/24/09
to mapi...@googlegroups.com

David,

 

I have used the Universal Translator extensively but it has been mostly to convert from shape files to TAB or back and forth between TAB and AutoCad formats, and I have not noticed this quirk before.

It seems that the UT has limit of 10 characters for columns names and it has a weird way of selecting the name of the new columns when the length exceeds 10 characters. In most cases, it takes the part of the name after the “_” (underline) character.

I ran a test using:

Unit_symbl – 10

Formt_name – 80

Membr_name  - 30

Stear_unit – 10

Dta_source – 40

And all the names converted correctly, albeit all the column names were converted to upper case.

I also tried converting it to a MIF file and then converting it to shape file using ArcInfo (ArcCatalog), and again it imports that table correctly but the column names are truncated to the first 10 characters. You can also open the TAB file directly with ArcMap and the columns are again truncated to 10 characters. The 10 character limit appears to be an ArcInfo limit where the columns names cannot exceed 10 characters but you can use the ALIAS option to assign a longer name to the column.

Hopefully this information is of use to you

 

Javier Valencia

913-915-3137

 


--

You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To post to this group, send email to mapi...@googlegroups.com.
To unsubscribe from this group, send email to mapinfo-l+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mapinfo-l?hl=en.

Reply all
Reply to author
Forward
0 new messages