This is my first project regarding QGIS. My problem is I have a CSV file:

shapeId, gpsPoint=lat, gpsPoint=lon, length, segments, lengthJson, segmentsJson, name, gpsAltitude, isBoundary, wkt 
1, 8.510618353052012, 76.95793988850774, null, null, "[20.0,26.0,95.0,11.0,77.0,11.0,63.0,23.0,9.0,40.0,20.0]", "[{""x"":650,""y"":166},{""x"":592,""y"":137},{""x"":510,""y"":119},{""x"":328,""y"":363},{""x"":324,""y"":398},{""x"":449,""y"":609},{""x"":484,""y"":608},{""x"":634,""y"":473},{""x"":651,""y"":401},{""x"":639,""y"":374},{""x"":647,""y"":246},{""x"":650,""y"":166}]", palace boundary, -173.23912770954138, true, "POLYGON ((8.510618353052012 76.95793988850774, 8.510262287 76.957779182, 8.510040369 76.957551036, 8.51076993 76.957428227, 8.510874635 76.957425526, 8.511509332 76.95751038, 8.511496826 76.957609161, 8.511093044 76.957710407, 8.510878582 76.957721834, 8.510799786 76.957713931, 8.510417299 76.957719325, 8.510618353052012 76.95793988850774))"

When I load all these points in maps my coordinates are at correct positions. But when I load the CSV file to QGIS and open in Google Maps via OpenLayers Plugin it's totally wrong I don't know how to proceed.

I have gone through this link but still my coordinates appear somewhere else.

Update Please see this image

enter image description here

At the end of the csv file there is a field called wkt which I need to show on maps.

  • OpenLayer Plugin does not manage well projection. Use QuickMapServices extension instead or you will not find out if the issue is with the plugin or your csv data import
    – ThomasG77
    Jan 5 '16 at 9:51
  • @ThomasG77 Okay I will try now a let u know
    – elsa
    Jan 5 '16 at 9:54
  • @ThomasG77 I tried with QuickMapsServices but its the same issue
    – elsa
    Jan 5 '16 at 9:58
  • I obtain this result img42.com/hxRWM It the expected or the wrong one? Did you activate On the fly reprojection in your QGIS project properties?
    – ThomasG77
    Jan 5 '16 at 11:02
  • @ThomasG77 Yes this is the expected result...how did u get it ?
    – elsa
    Jan 5 '16 at 11:14

You should use QuickMapServices plugin instead of OpenLayers Plugin.

If you want to use coordinates to display point

To make things work, I just used the Layer > AddLayer > Add Delimited TextLayer

It seems the trailing character ` in line 2 of your sample make the layer opening fails. I also renamed "gpsPoint=lat" to "lat" and "gpsPoint=lon" to "lon" (not mandatory, you should avoid field names like this)

See the screenshots for detailed use case

Parameters to open specific CSV file

I didn't tick the CSV file format because your CSV is quoted.

Projection to choose

EPSG 4326 = projection of GPS = decimal degrees = latitude, longitude

If you want to use the wkt polygon

As stated by other in comment, it works but it seems you want wkt polygon.

It seems that lat, lon order is reverted.

  • You will have to open the csv file like with previous solution but choose Geometry definition to WKT. You will see the position is wrong.
  • You have to save the layer as Shapefile with Save As and add it to the canevas
  • Install the plugin SWAP XY and apply the swap process to the previous shapefile layer

PS: it seems that lat,lon or lon,lat order both exists in practice with WKT.

  • am sorry to say but still this is what I get. I followed just as u said. I have updated my question with a screenshot
    – elsa
    Jan 5 '16 at 11:39
  • Can you share the screenshot using pics sharing like imgur.com ?
    – ThomasG77
    Jan 5 '16 at 11:49
  • Thank you so much for your effort Its working now...!!! I was using lat , lon not lon , lat. I got it from your solution.
    – elsa
    Jan 5 '16 at 11:58
  • @elsa This does not seem to solve your problem, or the question is not clear. You are not showing your WKT Field (that is a polygon) on the map, but rather a single point. Jan 5 '16 at 16:36
  • I've completed my answer with both solutions: lat,lon point based, wkt polygon based
    – ThomasG77
    Jan 5 '16 at 17:55

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.