Ticket #2337 (new bug)

Opened 3 years ago

Last modified 2 years ago

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
Platform Version: Platform: All
Must Fix for Release: No 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

54-22.csv Download (0.6 KB) - added by dr 3 years ago.

Change History

Changed 3 years ago by dr

  Changed 3 years ago by lutra

  • priority changed from major: does not work as expected to critical: causes crash or data corruption
  • must_fix changed from No to Yes

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

follow-up: ↓ 3   Changed 3 years ago by 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?

in reply to: ↑ 2 ; follow-up: ↓ 4   Changed 3 years ago by lutra

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 ; follow-up: ↓ 9   Changed 3 years ago by 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.

  Changed 3 years ago by pcav

  • summary changed from Projection issue to Projection issue: freezes when reprojecting a cvs file

  Changed 3 years ago by jef

  • summary changed from Projection issue: freezes when reprojecting a cvs file to Projection issue: freezes when reprojecting a csv file

  Changed 3 years ago by pcav

  • must_fix changed from Yes to No

  Changed 3 years ago by pcav

  • milestone changed from Version 1.5.0 to Version 1.6.0

in reply to: ↑ 4   Changed 2 years ago by aghisla

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

  Changed 2 years ago by pcav

  • priority changed from critical: causes crash or data corruption to minor: annoyance
Note: See TracTickets for help on using tickets.