6

Using QGIS 2.10.1 I am importing a csv point file into a project in CRS World_Gall_Stereographic (EPSG:54016) (shapefile layers correctly reprojected and saved as new shp files beforehand). I am working on a global scale and need meter as units, so this projection was recommended as the best.

Importing the csv file and choosing EPSG:54016 as CRS, the results I am getting are completely off, the points are displayed in the wrong place and in a completely wrong scale. Opening the csv point file in a new project with EPSG:54016 gives me good results, saving it as shp file works but importing it into the work project gives the same odd results. I have played with OTF activated or not, but no changes either.

Here are some pictures to illustrate the problem:

World map in WGS84, purple dots correctly displayed point shp file World map reprojected to ESPG:54016, orange dot is reprojected point shp file

This is a sample of my data in csv format:

MMSI,TIME,LONGITUDE,LATITUDE
1001,20120601_100157,165.7150667,52.6985
1001,20120601_124723,166.1643833,52.9314
1001,20120601_124723,166.1643833,52.9314
1001,20120601_220220,165.7496667,52.85125
1001,20120601_220519,165.7520667,52.8536
1001,20120602_235323,165.9094167,52.95831667
1001,20120603_112921,165.7208,52.83848333
1001,20120603_113224,165.7075833,52.83575
1001,20120603_130453,165.7627167,52.899
1001,20120603_144053,165.8316,52.97681667
1001,20120603_161908,166.0608833,53.03563333
1001,20120604_092627,166.1136333,52.93046667
1001,20120604_092927,166.1053833,52.9295
1001,20120604_113524,165.7658667,52.8703
1001,20120604_163411,166.45675,53.03293333
1001,20120605_003227,166.3319667,52.98035
1001,20120605_134348,166.2827667,52.9799
1001,20120605_165256,166.3453333,53.01598333
1001,20120605_231128,166.1088,52.96871667
1001,20120606_092004,166.8022833,53.21533333
1001,20120606_135901,167.9537667,53.59735
1001,20120606_171113,168.7523167,53.86685
1001,20120607_095605,170.53445,55.15393333
1001,20120607_100243,170.53395,55.13795

Something tells me I might be overlooking something or making a mistake with the reprojection.

2
  • Is your source CSV file already reprojected into SRID 54016, or is the source data in latitude/longitude (WGS84), and you'd like to reproject it into 54016? Could you paste the top few rows of your CSV file?
    – danpelota
    Aug 24, 2015 at 15:57
  • 1
    The source csv is in lat/long and I'd like to reproject it, already wondered if the reprojection might be the problem. I added a data sample to my question above.
    – Kristina
    Aug 24, 2015 at 16:13

1 Answer 1

7

If you want to reproject data from one CRS to another, DO NOT simply change the CRS with Set CRS for Layer. This will NOT reproject any coordinates. So please change the CRS back to EPSG:4326 since that is the correct CRS for your lat/lon data.

Instead, use Save As... to another file name and CRS. You might want to use ESRI Shapefile format, since CSV does not store CRS information inside the file.

5
  • Thanks AndreJ, I am aware of this. As maybe not made clear above, I did save it in the new CRS when converting it to a shape file. I am puzzled why this goes wrong, as the shapefile should hold the information for the new projection.
    – Kristina
    Aug 24, 2015 at 18:07
  • Under Settings -> Options, CRS tab, set CRS for new layers to Prompt for CRS to avoid any automated missettings for the CRS. The extent of the shapefile should be much larger than +/- 180/90. You can look it up under Layer Properties, metadata tab.
    – AndreJ
    Aug 24, 2015 at 18:57
  • If the CRS for the CSV is set to anything other than 4326 before you reproject it, the reprojection won't be correct. You have to select 4326 when you first import the CSV, or by using Set CRS for Layer, then use Save As... to save as a shapefile. You want to select the Gall project in the Save As... dialog (third field in the dialog), and at no time before that.
    – dericke
    Aug 24, 2015 at 19:13
  • Dericke, that worked! Thanks a lot! I am not sure why the program works this way and why I have stumbled upon this right now, but it seems that did the trick. Thanks!!!
    – Kristina
    Aug 24, 2015 at 19:36
  • And AndreJ, now I grasp what you were saying, thanks to you, too!
    – Kristina
    Aug 24, 2015 at 19:37

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.