When merging layers, why do I get duplicate columns?

When merging layers, Cartographica can attempt to combine data for columns that have the same names.   Under some circumstances, when this option is selected, Cartographica will instead create a second column with a different name as the result of the merge.

The problem in this case is most likely one of mismatched column "keys".   The native Shape File format requires column names of 10 characters or fewer.   In order to make working with data easier, Cartographica uses what we call a "Display name" which is shown in all lists and field specifications, but isn't necessarily the same as the name that is exported in the shape files themselves.   Whereas it is often convenient to not have to work within the confines of the 10-character limit, the dual naming system can cause some surprising results when merging layers, because it is the "key" that is used to determine if columns match, not the "display name".

Consider the following scenario:  one layer with two columns with keys "HIGH" and "LOW" with display names "Upper Limit" and "Lower Limit", and one layer with two columns "HI" and "LO" with display names "Upper Limit" and "Lower Limit".   If these two layers are merged using Merge Layers, Cartographica will create 4 columns in the resultant layer, one each for "HIGH", "LOW", "HI", and "LO", but it is probably not what you want.

To resolve this problem, the column "keys" will need to be edited. To do this, bring up the Layer Info Window (Window > Show Layer Info) and then check the box "Show Keys".   This will cause an additional column to be displayed that contains the keys for the each column in the data file.   As with the "display name", these can be edited by typing new values in.   So, change the second layer's column keys to "HIGH" and "LOW" and then try the merge again.   In this case, the resulting layer will have only 2 columns: "Upper Limit" and "Lower Limit" comprising the data from all features in both layers.

Note that this same issue arises for data consolidated by using copy and paste.

Have more questions? Submit a request


Powered by Zendesk