Opened 14 years ago

Last modified 13 years ago

#2337 new bug

Projection issue: freezes when reprojecting a csv file

Reported by: dr Owned by: nobody
Priority: minor: annoyance Milestone: Version 1.7.0
Component: Projection Support Version: Trunk
Keywords: Cc: dr, gislab, alexbruy
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

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.

Attachments (1)

54-22.csv (587 bytes ) - added by dr 14 years ago.

Download all attachments as: .zip

Change History (11)

by dr, 14 years ago

Attachment: 54-22.csv added

comment:1 by lutra, 14 years ago

Must Fix for Release: NoYes
Priority: major: does not work as expectedcritical: causes crash or data corruption

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

comment:2 by gislab, 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?

in reply to:  2 ; comment:3 by lutra, 14 years ago

Replying to 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(?).

in reply to:  3 ; comment:4 by gislab, 14 years ago

Replying to 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.

comment:5 by pcav, 14 years ago

Summary: Projection issueProjection issue: freezes when reprojecting a cvs file

comment:6 by jef, 14 years ago

Summary: Projection issue: freezes when reprojecting a cvs fileProjection issue: freezes when reprojecting a csv file

comment:7 by pcav, 14 years ago

Must Fix for Release: YesNo

comment:8 by pcav, 14 years ago

Milestone: Version 1.5.0Version 1.6.0

in reply to:  4 comment:9 by aghisla, 13 years ago

Replying to gislab:

Replying to 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

comment:10 by pcav, 13 years ago

Priority: critical: causes crash or data corruptionminor: annoyance
Note: See TracTickets for help on using tickets.