-1

I have a csv file which I created from a SQLite3 database. I want to display the points from the csv in QGis - which does not work.

My coordinates are Lat/Long. They get displayed completely wrong. See here (all the points should be in Paris, Eifeltower): Display

My basemap (the purple world map) is in WGS84 and when QGis asked me in which format it shall format the .csv I told it WGS84 as well. On the fly projection is turned on to WGS84 as well.

I tried to load the csv file into Google Earth pro to see how that gets displayed - did not work. I could not import the directly from the SQLite3 database created csv file into Google Earth. However, I created a csv file from the point layer which I got from QGis (when I imported the csv file). That could be displayed. Google Earth displays it right. There are some points outside of Paris, creating a line just like in the image. But that are just a few... It looks like this (the big white ball is in Paris while next to it there are a few dots, a line running from south to north):

Google Earth

My example .csv file can be downloaded here http://s000.tinyupload.com/?file_id=17576339249280389460

Any ideas why that does not work?! Working with QGis 2.8

2

You gave your softwares something gibberish- garbage. You need to cleanse your data before project in a projection-space.**---Please clean up your Lat-Long column--- **For instance i am attaching some screenshot as an upshot of quick look..!!

Long

Lat

  • Well, yes and no. When I open the file in QGis, it looks like this : s9.postimg.org/kk2p290nj/… Everything is nicely and neatly formatted. – Stophface Mar 21 '15 at 16:57
  • How latitude can be 10171 degree..? – SIslam Mar 21 '15 at 17:03
  • Yep, I know. There are 238 values which cannot be correct. Thats what QGis tells when I import the data. But there should be more than one point in France... – Stophface Mar 21 '15 at 17:05
  • Well I guess I have to write a script which reads the data out of the database since "saving as csv" is not working... – Stophface Mar 21 '15 at 17:06
  • 1
    @Stophface Even the screenshot from your first comment here shows at least one potential issue. One of the rows has all the field values shifted right by one column, indicating an extra or missing value/delimiter in it or one of the two adjoining rows as inc42 indicates (possibly a comment that should be part of a field value being interpreted as a delimiter instead). You've now removed the file your question links to but I suspect a similar issue has caused what is exhibited by SIslam's screenshots. Note the preview only shows the first few rows, so everything may look fine but fail later. – Chris W Mar 21 '15 at 19:59
1

How did you make QGIS parse this file? Its inline commas are not escaped so I was unable to load it correctly. Make sure your file has valid field delimiters/separators. I suggest using tab instead of commas as field separator; it makes it much easier for tools as you rarely have tabs in your content.

  • I told it "seperate by commas", which showed me in the little preview window that everything is nice formatted. What do you mean by "its inline come are not escaped" and "make sure has valid". – Stophface Mar 21 '15 at 16:49
  • Sorry, you are right. The window confused me for a moment. The data looks ok here, apart from the errors. Zoom in to Paris, the data there seems correct. The things that confuse you are bad coordinates, those are already in your data. Their latitudes are bad. – inc42 Mar 21 '15 at 16:56
  • Yes there are few bad coordinates, but not that many... When I imported that csv into QGis it said there are around 238 bad datapoints which were removed... Or are you talking about the latitude of all the data? – Stophface Mar 21 '15 at 17:12

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.