Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

I'm fairly new to GIS and this is probably something very simple, but your help would be appreciated.


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
share|improve this question
    
Please provide at least the first few lines of the file. Maybe we can spot the issue. –  underdark Nov 30 '13 at 20:06
    
That was great. Thankyou. –  Martin Nov 30 '13 at 21:02
    
Please edit the question to provide additional information. It's not readable as a comment. –  underdark Nov 30 '13 at 21:04

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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