1

I am using QGIS.
I have a .csv file containing 3 pieces of information on each row; name, longitude and latitude.
I would like to turn each row of the .csv file into a vector point.

The file will load into QGIS when I open it as a vector layer, but whatever I do, the screen remains blank.

Here is the metadata for the file:

General:
Storage type of this layer: CSV
Source for this layer: G:/VECTOR FILES for qgis/Maritime Traffic Visualisation/ships2.csv
Geometry type of the features in this layer: No geometry
The number of features in this layer: 20189
Editing capabilities of this layer: Add Features
Extents:
In layer spatial reference system units : unknown extent
Layer Spatial Reference System: +proj=longlat +datum=WGS84 +no_defs


Here are the first 10 rows:

name    lon lat
NAPOLEON I  -79.5231    8.66208
ZZ-9 VERTROUWEN 3.91968 51.64689
MIN LONG YU 66628   118.4183    24.12905
ZZ-5 CONSTANT PETRUS    3.92033 51.64691
MIN JIN YU 8401 118.574 24.33855
MIN LONG YU 60209   118.4849    24.15916
JINTANGYU03817  117.7681    39.07499
GOLDEN SCEPTRE PD50 -1.7716 57.5045
MIN  LONG  YU  62503    118.4402    24.27062
THILANT 4.43238 51.88438
VIKING  4.431762    51.23607
TYCHA   4.12002 51.9541
ILHAN AGA   27.981  43.199
ANKIE   -0.7144283  53.60629
0

1 Answer 1

4

Use Add delimited text layer instead of Add vector layer. It will recognize the lat/lon columns and create a point layer.

Add vector layer uses GDAL to open files. If you want to open your CSV with this tool, follow the instructions in Reading CSV containing spatial information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.