How do I import data from a text file?

Cartographica supports importing data from a text file that is written in standard "CSV" format (Comma-Separated Values). Beyond the normal use of commas for separation, Cartographica also recognizes double-quotes for string fields which may contain values that have special meaning (including double-quotes and commas).

To import data from a CSV text file, the data must contain one of the following:

  • An address to be geocoded (assuming you have the geocoding service or database available and already configured in your document)
  • Geospatial data in the form of X,Y and optionally Z coordinates (latitude, longitude and altitude, or data from another projection in known units)
  • Tabular data that contains a field which is linked to another layer already in the Map document (an example might be a census tract number or Zip code number that exists both in the file to be imported and an existing layer)

Once you have established that you have the right kind of data for import, and prepared any other necessary data prior to loading (such as the aforementioned geocoding or corresponding layers), you are ready to follow one of these procedures

Joining to an existing layer

  1. Choose File > Table Data... 
  2. Select Join in the tab to the right
  3. Select the Vector layer into which you are merging from the Target Layer pop-up menu
  4. For each Key column (each column that you need to have match the existing data in the Target Layer), select the matching column name in the "Map To" column in the same row as the imported field name. For example: if you are matching on zip code and the field in the existing layer is "Zip" and in the file you are importing it is "zip_code", you would find the row with field "zip_code" in it and select "Zip" from the Map To column.
  5. Check the Key box in the same row for each key field
  6. For non-key fields, you may select New Column to add a new column to the existing layer, an existing column name to replace the existing column for each matching records, or "- Do not import - " for any column in the imported data that you don't want to import
  7. Click Import to complete the operation.

Importing data with a geospatial component

  1. Select File > Import Table Data... 
  2. Select Coordinates in the tab to the right
  3. Select the Target Layer into which you are loading the data from Target Layer pop-up menu
  4. (normally this will be New Layer, but if you are adding data to an existing layer, you may select it)
  5. Find the field name for the X value and select "X (or longitude)" in the "Map To" column of that row
  6. Find the field name for the Y value and select "Y (or laitude)" in the "Map To" column of that row
  7. If the file also contains Z or M data, you may select those in the "Map To" column of that row
  8. For non-coordinate fields, you may select New Column to add a new column, an existing column name, or "- Do not import - " for any column in the imported data that you don't want to import (existing column names will only be available when you are importing into an existing layer)
  9. Click Import to complete the operation.

Importing data for geocoding

Geocoding procedures can vary widely based on the type of geocoder you are using and the specifications for that geocoder. For purposes of this procedure, we are assuming that you are using US Census TIGER/Line files, or something with a similar configuration. The particular minimum matching characteristics of your data set will be dependent upon your data and your geocoding layer.

  1. Select File > Import Table Data... 
  2. Select Geocoding in the tab to the right
  3. Select the Target Layer into which you are loading the data from Target Layer pop-up menu
  4. (normally this will be New Layer, but if you are adding data to an existing layer, you may select it)
  5. For each geocoding field that you are using (Address 1-4, City, State, Zip, Country), find the field row corresponding to that field in the imported data and select the corresponding geocoding field in the "Map To" column.
  6. For non-coordinate fields, you may select New Column to add a new column, an existing column name, or "- Do not import - " for any column in the imported data that you don't want to import (existing column names will only be available when you are importing into an existing layer)
  7. Click Import to complete the operation.
Have more questions? Submit a request

Comments

Powered by Zendesk