At times it may be necessary to add data to an existing layer by cross-referencing that data with another table. Cartographica does this by matching columns in an existing layer with data from a file and adding the new data to features which match. This operation is called a join in database parlance and by some GIS packages.
To join data, use the
Map To column to specify the destination column for the imported data (or
New Column if you want to add a new column for the imported data). Matching criteria is specified by checking the
Key box next to a column. Checking more than one
Key box will only add the data when all Key fields match.
As an example, here is some existing Polygonal data (Example Data A) for three Counties that exist in two different States:
Area (Sq KM)
Note that Floyd counties exist in both states
Here is the data you want to join with the above data (Example Data B):
|County Name||State Name||1990 Census Population||2000 Census Population|
Here is the result of performing the Join of Example Data B to Example Data A using County Name and State Name columns as keys:
|County Name||State Name||Area||1990 Census Population||2000 Census Population|
In the final table, the extraneous data supplied in Example Data B \(Adair, Iowa and Barren, Kentucky) which did not match entries in the existing table is discarded. Further, the lack of data about Floyd, Virginia resulted in empty columns.
Note that if only the County Name was used as a key and all other columns were matched, then both Floyd counties \(the one in Virginia and the one in Kentucky would have values set in all columns, including replacing the State Name column. However, the explicit use of a multiple key means that Cartographica will only consider a match when all elements match.
|County Name||State Name||Area||1990 Census Population|
In the case that a feature in the layer matches multiple rows in the joined table, each row from the table will replace columns in succession, resulting in the final feature data matching the last matching row in the table.