Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2148 closed bug (fixed)

shapefile layers disappear when enabling reprojection

Reported by: lutra Owned by: nobody
Priority: major: does not work as expected Milestone: Version 1.4.0
Component: Projection Support Version: Trunk
Keywords: Cc: pcav, gislab
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

Description

I'm seeing a problem with otfr and trunk on both linux and windows. On qgis 1.3 it works fine, but I'm pretty sure it worked fine also on trunk until a few days ago.

Take two vector layers with different crs, define the project crs and enable on the fly reprojection.

Try now "zoom to layer extent", it works only if the layer has a crs that matches the project crs, otherwise nothing show in the canvas.

Change History (6)

comment:1 by gislab, 14 years ago

Cc: gislab added

I confirm. Weirdly, if you remove the layer after it disappears after you "zoom to layer" and add it back via add vector - it will show up fine in reprojected form, until you do "zoom to layer" again.

comment:2 by lutra, 14 years ago

Summary: problem with on the fly reprojection/zoom with trunkshapefile layers disappear when enabling reprojection

This is the same problem that was already noticed for spatialite layers. See #1977.

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.

comment:3 by lutra, 14 years ago

Confirmed also for Postgis layers.

comment:4 by mhugent, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in r12318

comment:5 by lutra, 14 years ago

Hi Marco,

thanks for the fix. This solves just shapes or also postgis/SL?

thanks in advance

comment:6 by mhugent, 14 years ago

It is generic (on maplayer level), so should work for any layer type.

Note: See TracTickets for help on using tickets.