Bug report #2337

Projection issue: freezes when reprojecting a csv file

Added by dr - about 14 years ago. Updated about 11 years ago.

Status:Closed
Priority:Low
Assignee:Magnus Homann
Category:Projection Support
Affected QGIS version:master Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data:No Copied to github as #:12397

Description

1) Open attached csv file with delimited text plugin;

2) Set on the fly CRS transformation and set WGS84 /UTM zone 43N CRS (Projected);

3) Click on layer name and choose Zoom to layer extent;

4) Open any shapefile in lon/lat wgs84 projection;

At result QGIS freezes.

54-22.csv Magnifier (587 Bytes) dr -, 2010-01-02 07:26 AM

History

#1 Updated by Giovanni Manghi about 14 years ago

If the points you are importing are in the WGS84 /UTM zone system, then you need to configure the vector crs accordingly in the vector properties -> general tab. Alternatively save the imported csv as shapefile (right button in the legend -> save as shapefile) and qgis will ask you the crs of the vector.

In my case (Ubuntu linux, qgis 1.4), with OTFR enabled, the imported csv defined with the wrong crs and other layers, I'm not experiencing freezes, but I cannot see anything in the canvas.

But that is not the worst part:

define the correct crs (WGS84 /UTM zone 43N CRS) for the imported csv, enable otfr and define as project crs WGS84 /UTM zone 43N CRS. Add a wgs84 layer (example: http://thematicmapping.org/downloads/TM_WORLD_BORDERS-0.3.zip ), it will show fine.

Zoom out, at some point qgis crashes:

Fatal: ASSERT: "std::abs( r_d ) > SMALL_NUM && std::abs( r_n ) > SMALL_NUM" in file /home/gio/qgis/qgis_unstable/src/core/qgsclipper.h, line 270
Aborted

#2 Updated by Maxim Dubinin about 14 years ago

freezes for me too

that was the point probably, yes, trying to project already projected vector is bad, but is it possible to indicate it with more obvious error message and not just freeze QGIS on trying to continue working with it like nothing happened?

#3 Updated by Giovanni Manghi about 14 years ago

Replying to [comment:2 gislab]:

freezes for me too

that was the point probably, yes, trying to project already projected vector is bad, but is it possible to indicate it with more obvious error message and not just freeze QGIS on trying to continue working with it like nothing happened?

When importing csv files it would be enough to have the plugin ask for the CRS.

#4 Updated by Maxim Dubinin about 14 years ago

Replying to [comment:3 lutra]:

When importing csv files it would be enough to have the plugin ask for the CRS.

I think this would be a good solution.

#5 Updated by Anne Ghisla about 13 years ago

Replying to [comment:4 gislab]:

Replying to [comment:3 lutra]:

When importing csv files it would be enough to have the plugin ask for the CRS.

I think this would be a good solution.

With QGIS Trunk r 15304, and Options > CRS > Prompt for CRS, then in Project properties I set projection as WGS84 /UTM zone 43N and OFTR enabled, everything goes fine (load wgs84 layers and zoom out).

If I set as QGIS default Options > CRS > Global default CRS, I load the csv layer and see it with wrong coordinates, then I set Project properties as above. I zoom to layer extent and get a popup window titled "qgis " and with text "Could not draw 54-22 because" and an empty space. In the shell I read:

failed with error: latitude or longitude exceeded limits
Debug: /home/anne/src/qgis/src/core/qgscoordinatetransform.cpp: 490: (transformCoords) throwing exception
Debug: /home/anne/src/qgis/src/core/qgscoordinatetransform.cpp: 304: (transformInPlace) rethrowing exception
Debug: /home/anne/src/qgis/src/core/qgsvectorlayer.cpp: 1107: (draw) Failed to transform a point while drawing a feature of  type _. Rendering stopped. forward transform of
(10316.6, 23900.4)

This is almost OK, it's not a freeze and the user can safely remove the faulty layer and fix CRS settings. However the error message does not show up in the popup window.

Anne

#6 Updated by Giovanni Manghi over 12 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#7 Updated by Paolo Cavallini almost 12 years ago

  • Target version changed from Version 1.7.4 to Version 1.8.0
  • Crashes QGIS or corrupts data set to No
  • Affected QGIS version set to master

#8 Updated by Paolo Cavallini over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#9 Updated by Magnus Homann over 11 years ago

  • Assignee changed from nobody - to Magnus Homann
  • Pull Request or Patch supplied set to No

#10 Updated by Giovanni Manghi about 11 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

This does not happens any more on master.

Also available in: Atom PDF