Skip to content Skip to main navigation Skip to footer

How to upload your CSV/XLS?

If you have location coordinates data, you can upload it as an Excel table (XLS) or CSV. This data can then be imported and added to a map as a layer. When using CSV/XLS import, you can have the data as coordinates (for uploading points), as H3 index (for generating a hexagonal grid), or as WKT (for all vector type geometries).

Prepare data

The data table has to have this structure, or the system won’t be able to recognize the data:

  • Make sure that a table doesn’t have complex formatting (merged cells, doubleheader, more sheets, font color, etc.). Export your table as .csv and open the table in a common text editor (e.g. Notepad++).
  • Make sure your CSV file has UTF-8 encoding so that the data is imported into GIS Cloud properly. This helps if there are any special characters in your data.
  • When using latitude and longitude, they need to have a WGS84 projection format (e.g.: 16.4986, -20.7458).
  • The header must not contain any spaces.Use underscore (_) not space e.g.street_name, or house_number etc.
  • Make sure that the column separator is a comma (,) and not a semicolon (;) e.g. Flatlands Ave, Brooklyn, NY 11234, USA.
  • The first row (header) has to contain the column title and all other columns have to contain data.
  • For the header, names use only English alphabet letters, digits and underscores (_).
  • Use full-stop as a delimiter for decimal numbers.

Import CSV or XLS

Follow these steps in the video or instructions below to upload your CSV/XLS file:

  1. Select Import CSV or XLS function.
  1. Browse for the uploaded XLS or CSV in File Manager.
  2. Set the table parameters, select the coordinate fields and click Import.

List of parameters:

  1. File – name of the original file from which data will be imported into the Database
  2. Table name – name of the table that will be created and stored in Database
  3. Import as – spatial table means that data will have coordinates, and the points will be displayed on the map. If the table is imported as a non-spatial table, only attribute data will be stored.
  4. Import action:
    • Overwrite – if there is a table with the same name in the Database, the new table will overwrite the old one.
    • Append to – if there is a table with the same name in the Database, a new table will contain both old and new attribute data.
  5. Coordinate fields – choose whether you’re importing Lat/Long, H3 or Well-Known-Text (WKT). See below for a short guide on using all three options.
  6. Type – select the column type in which the original data is. String is used for text, Integer for whole numbers, and Real for decimal numbers.
  7. Visible – uncheck the field if you don’t want to import it
  8. Import – start importing data
  9. Back to upload – navigates back to the upload window, if you want to choose a different file

Import data using Latitude/Longitude fields

If you have a CSV/XLS file that contains geographic coordinates for a particular location, you can use the Lat/Long option to upload and visualise those points on a map.

First, select Lat/Lon from the radio buttons in the Coordinate fields section.

Choose the corresponding Lattitude and Longitude fields from the drop-down lists (1).

Make sure to set the column type to Real for latitude and longitude fields (2). Change the type for other fields if needed.

Click Import to start importing your file.

Import data using H3 field

By using H3 indexing, you can represent your data on a map in a hexagonal grid. This is a great way of visualising data if you’re preparing a thematic map, for example.

To import data that contains the H3 index, Select H3 from the radio buttons in the Coordinate fields section. Make sure to select the field that contains your H3 index from the drop-down list on the right.

Click Import to start importing your file.

Importing data using WKT

By using the WKT to represent geometry, you’re able to upload layers of different geometry types (such as lines or polygons) to the Database manager, not just points – as is the case with using Latitude and Longitude fields.

To import data for which you have geometries in the WKT format, select Well-Known-Text from the radio buttons in the Coordinate fields section. Make sure to select the field that contains your coordinates in Well-Know-Text format from the drop-down list on the right.

Click Import to start importing your file.

Adding imported data to the map

The imported tables are stored in the database and can be displayed on the map.

  • Go under the Layer tab.
  • Tap Add Layer option.
  • Find your imported table in the Database select it and import it into your project.

Troubleshooting

  • All points are located in the Atlantic Ocean, near Africa.

There are several possible causes for points located near Africa. In general, this means that the system couldn’t recognize the geometry and located points at coordinates 0,0.

Check the import parameters for X and Y. Select the correct fields for latitude and longitude and try to import the layer again.

Check the coordinates format. All coordinates have to be written in WGS84 projection format e.g., 13.2656,16.2657. If the coordinates in the table are in some other e.g., local projection, reproject them first in WGS84, upload the table to GIS Cloud and try again.

  • Invalid file encoding 

This message indicates that the file has invalid encoding. 

There are various encodings, and they depend on language and special characters. Open the table in some spreadsheet application and save it with default UTF-8 encoding.

  • The uploaded file is not visible in Source Manager when selecting the file for import.

This indicates that the uploaded file is XLSX or some other unsupported format. 

Save the file as CSV or XLS and upload it to GIS Cloud again.

  • Unsupported characters

The import can fail if there are unsupported characters in column names e.g., &%$#/() or spaces. Delete them from the column names and replace them with the underscore (_). Upload the file and try again.

Was This Article Helpful?