Importing Text Files and Table Data

Cartographica can import text files that contain tables as geospatial and data sources. Cartographica can use text files (either CSV, TSV or DBF) to provide three different types of data:

Coordinate dataCoordinate data contains either X,Y coordinates or latitude and longitude.
Grid dataGrid data contains locations using a specific grid system.
Address dataAddress data contains postal addresses.
Tabular dataTabular data contains no geospatial information.

Because there is a great variety of sources and types of data which originate in non-geospatial files, Cartographica has a few mechanisms that are used consistently in many of our importing systems.

The Import Map

Cartographica uses the Import Map when importing tabular data and acquiring database data. It serves two purposes: first to determine how to associate new data with an existing or new layer, and second, to determine how to relate the imported data geospatially to the rest of the data in the map.

Import Map Window


The left side of the Import Map window is used to define the relationship between fields within the file or database that is being imported and the layer that they are being imported into. The meaning of each column is detailed here.

FieldPurpose
Field NameThe name of the field being imported. Based either on the initial line of the file or the database source that the data is coming from.
TypeThe kind of data being imported (String, Number, Date, etc). This is determined either directly from the import source or by heuristic. If necessary, the type information may be overridden by choosing a different type in the Type menu.
Map To

Determines which column this field will map to in the resultant layer. When set to New Column, a new column with this name will be added to the table. Special values for geocoding and Coordinate import are also available. Existing fields are listed if the target layer is not new. - Do Not Import - tells Cartographica not to import this field at all.

Key

The Key field is only used for the Join style of importing, and we be detailed in section Joining Non-Geospatial Data. When the Key box is checked, the corresponding relationship between the imported field and the Map To field is used to determine which feature to associate a row from the data file with.

Importing data from Text and DBF files

Importing files containing coordinate data
  1. Choose  File > Import Table Data….
    The import table file chooser appears.

    Import Table File Chooser


    This chooser is a standard file chooser with a few additional options to control how the imported text is interpreted. The character set may be chosen, overriding the default character set in the file. For text files, you may also tell Cartographica to consider the first line of the file to contain field names (the default), and designate the column separator and number format.

  2. Select the location of the text or table file you want to import and click Open.
    The Import Map window appears and describes the format of the file and requests that you determine how it should interpret the data as it is read.
  3. Using  Target Layer select an existing layer to append the data to, or choose  New Layer.
  4. Choose Coordinates from the right hand set of tabs in the window. This will enable coordinate import mode.
    Because you are in coordinate import mode, the choices in your  Map To  column include X (or longitude)Y (or latitude),   Z (or altitude) and  M (or time), along with the standard options of  - Do Not Import -New Column, and any columns that exist in your selected target layer.
  5. Using the Import Map (as described in The Import Map, map the incoming data fields to your selected layer, making sure that you map at least one column to the X and Y coordinates. Without both of these, Cartographica cannot place the data on the map.
  6. Click  Import to import your data into the map.
    Cartographica will read the data from the file, interpret the columns to the best of its abilities and store them into the requested layer.
  7. Once you have imported the data, choose   Layer > Set Layer Projection…  to confirm that the coordinate system of the data is accurately represented.
Importing files containing grid reference data
  1. Choose  File > Import Table Data….
    The import table file chooser appears.

  2. Select the location of the text or table file you want to import and click Open.
    The Import Map window appears and describes the format of the file and requests that you determine how it should interpret the data as it is read.
  3. Using  Target Layer select an existing layer to append the data to, or choose  New Layer.
  4. Choose Grid from the right hand set of tabs in the window. This will enable grid reference import mode.
    Because you are in grid reference import mode, the choices in your  Map To  column include Reference,   Z (or altitude) and  M (or time), along with the standard options of  - Do Not Import -New Column, and any columns that exist in your selected target layer.
  5. Choose the desired grid from the  Grid pop-up menu. Each grid is associated with a specific reference system and CRS.
    Check the  Use Polygons box if you want polygons instead of points for references (this is more useful if you have large grid references that cover entire areas). If unchecked, Cartographica will choose the point in the lower-left corner of the grid reference.
    Check the  Include Diagnostics box if you want Cartographica to include any grid size information and any errors (note: these will only show up if you also check  Import Non-Matching data).
  6. Using the Import Map (as described in The Import Map, map the incoming data fields to your selected layer, making sure that you map at least one column to the Reference. Without that column, Cartographica cannot place the data on the map.
  7. Click  Import to import your data into the map.
    Cartographica will read the data from the file, interpret the columns to the best of its abilities and store them into the requested layer.
  8. Once you have imported the data, choose   Layer > Set Layer Projection…  to confirm that the coordinate system of the data is accurately represented.


Importing files containing address data

Before importing address data, the geocoder must be appropriately configured. This is an easy process, explained in Geocoding Addresses.

  1. Choose  File > Import Table Data….
    The import table file chooser appears.
  2. Select the location of the text or table file you want to import and click  Open.
    The Import Map window appears and describes the format of the file and requests that you determine how it should interpret the data as it is read.
  3. Using  Target Layer select an existing layer to append the data to, or choose  New Layer.
  4. Choose  Geocode from the right hand set of tabs in the window. This will enable address geocoding mode.
    Because you are in address geocoding mode, the choices in your  Map To column include Address 1 through Address 4,   CityStateZIP ZIP+4, and  Country along with the standard options of - Do Not Import -, New Column, and any columns that exist in your selected target layer.
  5. Check the  Include Diagnostics box if you want Cartographica to include additional diagnostic and position information obtained through geocoding.
  6. Using the Import Map (as described in The Import Map, map the incoming data fields to your selected layer, making sure that you map at least one column to Address 1. If it is the only column specified, then it will be presumed to have a full address in it.
  7. If necessary, fill in one or more of the  City, State, or  Country boxes in the right pane. These act as defaults for the geocoder in the event that there are no columns that match. Often city data is delivered with only the street portion of the address, and these fields can be used to limit the search to that particular city.
  8. Click  Import to import your data into the map.
    Cartographica will read the data from the file, interpret the columns to the best of its abilities using the geocoding specifications and store them into the requested layer.
  9. Once you have imported the data, choose  Layer > Set Layer Projection…  to confirm that the coordinate system of the data is accurately represented.