4

I have a .csv file of coordinates that looks like this:

Is there a way for QGIS to plot coordinates formatted like this? I've tried Adding a Delimited Text Layer... in QGIS, but do not see any options appropriate for this format:

Nxx.xx.xxx Wxxx.xx.xxx

I am able to use a GPS Coordinate Converter website to convert that data to Decimal Degrees, Degrees, Minutes & Seconds, and UTM. For example, inputting N39.56.854 W074.28.013 outputs a latitude of 39.947567, and longitude of -74.466883. However, I would like to stay in QGIS and make the same conversion.

Things I've tried:

  • Created a new .csv that has formatting that matches the output of coordinate conversion site mentioned above, and with separated lat-long columns:

    However, using the QGIS Add Delimited Text Layer... option yields no visualization of the points.

8

The 'Add Delimited Text Layer' dialog can add DMS coordinates (DegreeMinutesSeconds). Tick the checkbox DMS coordinates.

enter image description here

I don't know the QGIS version this was implemented, but it is in QGIS 2.10.1. Remember the x field runs west and y field north.

You need a minor manipulation of your cvs format changing:

north west
N39.56.854 W074.28.013

to

north west
N39'56.854 W074'28.013

This can be done in setting an advanced text editor like Notepad++ in column mode, selecting the dot to replace and the replace within in the selection with '.

The QGIS documentation (help button on dialog) says:

DMS angles: if selected coordinates are represented as degrees/minutes/seconds or degrees/minutes. QGIS is quite permissive in its interpretation of degrees/minutes/seconds. A valid DMS coordinate will contain three numeric fields with an optional hemisphere prefix or suffix (N, E, or + are positive, S, W, or - are negative). Additional non numeric characters are generally discarded. For example N41d54'01.54" is a valid coordinate.

Update: If you add a separator like comma to you format change, it will also work:

latitude, longitude
N39 56.854, W074 28.013

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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