Opened 15 years ago
Closed 14 years ago
#1977 closed bug (fixed)
spatialite layers disappear when enabling reprojection
Reported by: | pcav | Owned by: | nobody |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.4.0 |
Component: | Data Provider | Version: | Trunk |
Keywords: | Cc: | a.furieri@… | |
Must Fix for Release: | Yes | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
Load a SpatiaLite layer; enable on the fly reprojection; the layer is no longer shown on the canvas. If you load it again, all ok
Change History (8)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Right - if I do the same in a different projection, this does not appear.
comment:3 by , 15 years ago
I confirm the behaviour with qgis trunk and ubuntu 9.04.
The weird thing is that if OTFR is enabled *before* (regardless of the CRS) adding the spatialite layer, then it goes everything ok. If is enabled after adding it, then it disappears.
comment:4 by , 14 years ago
I have also noticed this problem. In QgsSpatiaLiteProvider::select() near the bottom of the function (about line 592) the valid variable is set false on a failed database request. This may occur if the extent requested is out of bounds for the layer's CRS.
Once valid is false the provider won't return any data.
I believe the valid variable should NOT be set false just because there is an error in the current database request.
I believe #2047 is another manifestation of this.
comment:5 by , 14 years ago
Must Fix for Release: | No → Yes |
---|---|
Platform: | Debian → All |
Priority: | minor: annoyance → major: does not work as expected |
This is still confirmed and I (only) now noticed that this is the same identical problem that we have now also with shapefiles (until a few days ago with shapefiles worked ok). See #2148.
Resuming:
Add a layer then enable OTFR and choose a crs for the project.
1) If the layer crs is equal to the project crs, than is all ok
2) if the layer crs is different from the project crs than it doesn't show in map canvas
You may also want to try this:
Open a new project, enable OTFR, choose a crs for project and then add a layer
1) Even if the project crs is different from the layer crs it seems to work fine, but...
2) If you then choose another crs for the project (different from the layer crs), then again the layer will not show in map canvas.
I will test also postgis and then repost back.
comment:7 by , 14 years ago
comment:8 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The fix for #2148 fixed also this one. Thanks.
not reproducable here. Are you projecting to the same CRS your data is in?