Introduction
If you need to extract coordinates and generate polygons for uploading to the Orbify platform, structured CSV formatting is essential. Many GIS datasets originate in tables or spreadsheets. By leveraging tools like QGIS, you can import structured text files and convert them into vector layers, which can then be uploaded to Orbify. This guide outlines the process for formatting and preparing your CSV file correctly.
Importing Spreadsheets or CSV Files in QGIS 3
QGIS supports importing structured text files with coordinates as vector layers. The Data Source Manager in QGIS allows you to load delimited text files, including Comma-Separated Values (CSV) and Tab-Separated Values (TSV) files, as point layers.
Overview of the Task
We will import a text file containing earthquake locations in TSV format into QGIS and create a points layer. This process can be adapted for any dataset that includes latitude and longitude coordinates.
Step 1: Import the CSV/TSV File into QGIS
Opening the Data Source Manager
Open QGIS.
Click the Open Data Source Manager button from the Data Source Toolbar or use the keyboard shortcut Ctrl + L.
Navigate to the Delimited Text tab.
Click the … button to locate the downloaded file.
If the file does not appear, switch the file format filter to All files (;.*).
Select your CSV or TSV file and click Open.
Configuring the Import
The selected file's path will appear in the File Name field.
Change the Layer Name to something descriptive (e.g.,
1900_2000_earthquakes
).In the File Format section:
Choose Custom delimiters.
Select Tab if importing a TSV file or Comma if importing a CSV file.
In the Geometry Definition section:
Select Point Coordinates.
Ensure the X Field is set to
Longitude
and the Y Field is set toLatitude
.The default CRS (Coordinate Reference System) should be
EPSG:4326 - WGS 84
. If your dataset uses a different CRS, select the correct one.
Click Add to import the data.
Verifying the Import
Once the data is imported, it will appear in the QGIS Canvas as a new layer (e.g., 1900_2000_earthquakes
) with CRS EPSG:4326. You should see the earthquake locations displayed as points on the map.
Step 2: Generating Polygons from Points
To create polygons from imported points:
Open Processing Toolbox (Ctrl + Alt + T).
Use Convex Hull or Delaunay Triangulation to generate polygons from the points.
If necessary, manually edit the polygons using the Vertex Tool.
Save the final layer as a GeoJSON, Shapefile, or CSV format with polygon definitions.
Step 4: Preparing CSV for Orbify Upload
If your dataset contains polygons, structure your CSV file accordingly:
CSV Format for Points:
id,latitude,longitude
1,18.56520783273038,54.44461019273572
CSV Format for Polygons:
id,latitude,longitude
1,17.594776872918402,52.53749819249012 2,17.594776872918402,52.536944837948425 3,17.5971315320063,52.536944837948425 4,17.5971315320063,52.53749819249012
The above example defines a polygon by listing its vertices.
Uploading to Orbify
Open your Orbify App.
Navigate to the Create Project button.
Select Upload File.
Review and edit shapes as necessary.
Submit the dataset to generate the project area.
Conclusion
By following these steps, you can efficiently extract coordinates from CSV files, create polygons, and upload them to Orbify for project area analysis. QGIS simplifies the process of converting structured text files into geospatial layers, ensuring accurate and usable spatial data. If you have further questions or need assistance, feel free to explore QGIS documentation or Orbify’s support resources.