Adding Layers from CSV, XLS and XLSX Files

Note: This functionality is available to admins and sub-admins only.

Spectrum Spatial Analyst allows you to import data from .csv or .xls or .xlsx file to the map. To import data from .csv or .xls or .xlsx file, follow the steps given below:

  1. Click or touch the Add icon on the upper right corner of the map to open the Add panel.
  2. Click or touch the Browse and Add Layer option to add vector layer to map.
    Add a File page appears.
  3. Click or touch the Choose file button to add .csv or .xls or .xlsx file. After importing files successfully, you can choose to plot Addresses or Co-ordinates on the map.
    Note: You can geocode up to 1000 records only. Due to the inherent limitations of browsers and varied structure of data, there is a limit to the sizes of files that can be uploaded for Vector Mapping. In general, we suggest keeping the file size below 25 MB but depending on the complexity of data and format of file you may be able to upload up to 80 MB. For example, we have successfully processed GeoJSON file of size 85 MB. For more information see, Geocoding Your Address Data in Batches.
    Points to remember-
    • While uploading files csv, xls and xlsx, whole column is dropped if column name is blank in the file.
    • In case of duplicate column name, the values from last column is picked only and duplicate columns will not be displayed in callout, query and download.
    • If file do not contain any header then default column names are displayed, like column1, column2, column3 etc. in query, callout and download.
    • Only UTF-8 encoded files are supported (i.e. kml, GeoJSON, csv ,xls and xlsx) otherwise data may look corrupted.
  4. Select Addresses radio button to import a file that contains a column with address which will be geocoded and points will be shown on map as business layer.
    Note: This option is available only when Global Geocoding or Precisely API geocoder module is selected as the Geocoder by the Administrator.
    1. Click or touch Next. The Select Coordinates page appears. It has following options.
      Option Description
      First row as header Check if first row of the selected file is a header.
      Select Address Column Select the address column from the drop-down list.
      Style Select the style color and shape from the drop-down.
      Back Go back to previous screen.
  5. Select Coordinates radio button to import a file that contains coordinates x-y or lat-long. These point will be directly shown on map as business layer.
    1. Click or touch Next. The Select Coordinates page appears. It has following options.
      Option Description
      First row as header Check if first row of the selected file is a header.
      Projection Select or enter the projection in the format EPSG:<projection>

      You can also select from default projections-

      EPSG:4326

      EPSG:3857

      EPSE:27700
      Note: MapConfigs with 3857 projection will show long/lat (EPSG:4326) as coordinate values for POI location instead of x,y.
      X/Longitude Select the X\longitude column from the file to be added to the map.
      Y/Latitude Select the Y\Latitude column from the file to be added to the map.
      Style Select the style color and shape from the drop-down.
      Back Go back to previous screen.
  6. Click or touch on the Overflow icon and click Upload table to add the data to Spectrum Spatial repository.
    The name of the vector layer that you have added on the map is displayed and the Upload table panel opens. Next you need to provide the table details.
  7. Choose Create new table or Replace existing table to specify whether you want to create a new table or replace an existing table on the spatial repository. Based on your selection, follow the sub-steps given in the table.
    Options Sub-steps
    Create new table

    If you choose Create new table, follow these steps.

    1. From the Named Connection drop-down list select a named connection type. There are two types of named connections, file-based and database.

      • Choose the file-based connection for uploading data as TAB files.
      • Choose the SQL-based connection for uploading data as SQL table.
    2. Click to specify the File system path.

      • For file-based connection Spectrum Spatial Analyst displays the root folder. By default, Spectrum Spatial Analyst displays the name of first folder in the list on which the user has the write-access.
      • For SQL-based connection, it shows the list of schemas. For more information see, Browsing the Spatial Repository.
    3. In the Datasource table name field, displays the name of the data source. If the name already exists, you can edit the table name.
    4. In the Named table name field, the name of selected table displays. If the table name already exists, you can edit the name.
    5. Click to specify the path of the repository folder on the Spatial Spectrum server. Your table will be saved in this folder.

      Note: While browsing the repository folder, if you cannot locate a folder, check with your administrator to determine if restrictions have been placed at the file-server level. You must have Write permission to the folder that you select.
    6. Click Upload. You get a message that the files have been uploaded. If you wish, you can view the new named table by clicking the hyperlink in the message.

      After the file is uploaded, you can choose to create layer and save it to repository with the default layer style or with your custom styles.

      • The Add layer to project checkbox enables you to add the layer to your map project. By default, it is checked.
      • If required, click to browse the Spatial Spectrum repository and select another folder.
    7. (Optional) Select Define style override, to modify the style for the layer.
    8. Click or touch the Create Layer button to add the layer to the current map. When you save map project, the new layer is also saved.
    Replace existing table

    If you choose Replace table, follow these steps.

    1. In the Named Connection field, click to browse the Spatial Spectrum repository and select the named table that you want to overwrite.

      The selected named table should have the same column structure as the table being uploaded.

    2. Spectrum Spatial Analyst detects the Datasource name to which the table belongs and populates the Named connection and Datasource table name fields.
    3. Click Upload. You get a message that the files have been uploaded and the selected named table is updated. If you wish, you can view the updated named table by clicking the hyperlink in the message.
    4. Click Done to return to the Map legend panel. If a layer in your current map is based on the updated table, the map gets refreshed.